Results 1 to 2 of 2

Thread: Custom Module with Line Items

  1. #1
    thamima is offline Senior Member
    Join Date
    Mar 2009
    Location
    Pretoria, South Africa
    Posts
    23

    Default Custom Module with Line Items

    Hi Everyone

    Please help, I need to create a custom module with line items line in the Quote Modules (Open Sales) that can add new line item when a button is clicked. Can anyone point me in the right direction?

    I have been search this forum for hours for guidance.

  2. #2
    crmbalah is offline A Prolific Poster
    Join Date
    Mar 2009
    Location
    chennai
    Posts
    418

    Default Re: Custom Module with Line Items

    HI
    The add new line function based on JavaScript
    In the quotes modules add new button call insertProductLine( ) function.
    Same as we create add new button and call some other function and
    Customize the function.
    Example
    Instead the php file create the table with id
    Code:
    <table width="100%" border="0" cellspacing="0" cellpadding="0" id="productLine"></table>
    Then create new button with on click function.
    Customize the function like this.


    Code:
    var a = document.getElementById('productLine').insertRow(-1);
    	var a1 = a.insertCell(0);
    	a1.innerHTML = "<table  border='0' cellspacing='0' cellpadding='0' name = 'prodservLine[]' id='prodservLine"+ln+"'></table>";
    	
    	
    	
    	var u = document.getElementById('prodservLine'+ln).insertRow(-1);
    	var u1 = u.insertCell(0);
    	var u2 = u.insertCell(1);
    	var u3 = u.insertCell(2);
    	var u4 = u.insertCell(3);
    	u1.innerHTML = "<div style='padding:4px;width:145px;'>your custome code</div>";
    	u2.innerHTML = "<div style='padding:4px;width:270px;'>your custome code</div>";
    	u3.innerHTML = "<div style='padding:4px;width:150px;'>your custome code</div>";
    	u4.innerHTML = "<div style='padding:4px;width:208px;'> your custome code </div>";
    	
    	u1.className="dataField";
    	u2.className="dataField";
    	u3.className="dataField";
    	u4.className="dataField";
    
    
    	ln++;
    	document.getElementById('addProductLine').onclick = function() {
    		insertProductLine(ln);

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 2009-02-23, 12:38 PM
  2. Quote Line Items problem
    By dlorenzetti in forum Developer Help
    Replies: 1
    Last Post: 2009-02-20, 07:03 PM
  3. Editing Line Items view under quotes
    By sunwaytravel in forum Help
    Replies: 1
    Last Post: 2008-08-01, 12:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •