Undefined fields in Line Items

I want to add another dropdown field called ‘Delivery’ in Line Items.
I have already created the dropdown with its option, field and label through studio.
The changes that i have made in line_items.js are as follows :

function insertProductHeader(tableid){

var d=x.insertCell(4);
d.style.color=“rgb(68,68,68)”;
d.innerHTML=SUGAR.language.get(module_sugar_grp1, ‘LBL_DELIVERY’);
…}

function insertProductLine(tableid, groupid) {

var d = x.insertCell(5);
d.innerHTML = “” + prodln + “”;

}

Instead of the name delivery i am getting head as undefined and there is no options inside the select field. I have attached a screen shot of line items.
Please help.

You created the dropdown via studio? Which module was that in? You really need to create the dropdown field in the hidden module called AOS_Product_Quotes which is not available from studio, unless you have changed that?

I added the dropdown delivery_list using Admin>>Dropdown Editor>> Add Dropdown

Yes but that is only the list of options, you still have to add the field its self. This should be done in AOS_Product_Quotes extension vardefs.

Which module have you added delivery_c to?

Thanks Andy, after reading your post, i did edit the line_items.php and now i can see the fields but the header is still undefined can you help me with that?

For the last time: Which module have you added delivery_c to?

I have added deliery_c to line items module from studio.

if its just the header add the lable to the language files of AOS_Quotes and Invoices then clear your browser cache.

Yeah done that and got the results thanks…!!! :slight_smile: :slight_smile:

for my info:what is the use of line items marked in the pic inside studio?

Apologies line items used to be a hidden module but it has been made visible in the latest version of SuiteCRM. I had forgotten about that.

So you were correct on that :wink:

It is for adding new fields to the line items but You still have to edit line_items.php and the js file as you have done.

We
might make this more user friendly in a future version.

Thanks appreciate your help…!!!

I have installed New SuiteCRM version but unable to make changes in line items through studio ,So i edited in line_item.js file from aos_products_quotes and created field as Mark Up % (upon adding value into it should calculate % percentage from list price sum up to total cost ,opposite to discount field ) the calculation and everything is working fine but the problem is Upon Editing old quote(from quote module which has been created) the line item field Mark Up % field is getting blank where in previous the field was added and unable to display in detail view , Please some one help me Thanks!!

husain please share the code u have edited in lineitem.php as my dropdown values are not coming