Functional example of Customize Line Items at Quotes module

If somebody can help me via private this is my skype:

i could pay for personal accessory.

Did you just add that field through Studio, or did you make those PHP changes manually?

Both changes

i already solve the problems of the header but the big problem is that i cant connect that field with the Database = aos_products_quotes

and is already added

I almost have 100% functioning, I’ll post it as soon as I have it ,although it’s sad that in the forum there are people with so many years of experience developing in the system and even then they can not give me a good answer :pinch:

Please do post your solution, we need more of that here!

I personally don’t have years of experience developing projects for SuiteCRM, I only started developing one simple project. Then I learned the rest just helping out in the forums. But I often am left without enough expertise to help in coding problems.

I know it can be frustrating to ask and not get answers… we need to ask simple, partial questions, since developers normally don’t have enough time to really “dive” into other people’s problems and figure out what could be wrong.

With time, I hope we develop better community resources (Documentation, past forum threads, blog posts, etc), and get more competent developers on board, so it becomes easier to get help coding.

Thanks for your patience and thanks in advance for posting coding tips in the future.

Ok so first Step add the columns via studio

Check if is already in vardefs i know is cache but it dont delete dosent matter if u repair and compile again

Add the custom field in to line_items.js

1 Like

This is the header i put manual but you can try to use global labels

modify sql query in to line_items.php you dont need to repair and rebuild for see the changes on php files

The Header:

Calling the variable via JSON you have to modify correctly the query for get the information of custom fields

Check if the fields is in the Database-Table

1 Like

Final Results:

I hope this could help you

1 Like

Muchas gracias @Evancio, con seguridad esto sera muy útil para toda la comunidad.

Thanks a lot, this looks quite useful!

Did you manage to make these changes upgrade-safe? Are they all in the “custom” folder or did you need to edit the files in their original places?

I edited line_items.php from original folder and line_items.js from custom folder because i see this condition on line_items.php

if ($view == ‘EditView’) {
$html .= ‘’;
if (file_exists(‘custom/modules/AOS_Products_Quotes/line_items.js’)) {
$html .= ‘’;

If line_items.js is not already on custom folder then is necesary to copy the file from original folder.

And does it still work if your changes are only in


but not in

modules/AOS_Products_Quotes/Line_Items.php ?

I hope that file can be customized in an upgrade-safe manner, too…

the changes are in:


dont pass the file to custom folder because u cant make changes there i already tried.

Normally when you can’t get a customization to be picked up, it needs to be customized “one file before”, meaning, you need a custom version of the file that invokes that file.

So in this case you probably need custom versions of these vardefs:

/var/www/html/modules/AOS_Quotes/vardefs.php:346:                        'include' => 'modules/AOS_Products_Quotes/Line_Items.php'
/var/www/html/modules/AOS_Quotes/vardefs.php:555:                        'include' => 'modules/AOS_Products_Quotes/Line_Items.php'

/var/www/html/modules/AOS_Contracts/vardefs.php:420:                        'include' => 'modules/AOS_Products_Quotes/Line_Items.php'
/var/www/html/modules/AOS_Contracts/vardefs.php:627:                        'include' => 'modules/AOS_Products_Quotes/Line_Items.php'

/var/www/html/modules/AOS_Invoices/vardefs.php:256:                        'include' => 'modules/AOS_Products_Quotes/Line_Items.php'
/var/www/html/modules/AOS_Invoices/vardefs.php:463:                        'include' => 'modules/AOS_Products_Quotes/Line_Items.php'

Although maybe this mechanism could be improved - if we can find where these vardef “includes” are being evaluated, we could add a check for custom files there…

By the way, since vardefs are actual PHP that gets executed, you could try editing each of those like this:

modules/AOS_Quotes/vardefs.php:346:                        'include' => get_custom_file_if_exists('modules/AOS_Products_Quotes/Line_Items.php')

I never tried this sort of thing, I don’t know if it will work

Hi pgr thanks for the attention

I will review it more in detail as I am using it in different modules if something change in other modules i will post again B-)

Hi, Evancio, I´m added an fnew field on line items module, but i can´t visualize it the field added, I attach screenshots of the settings I made. I hope you can help me


I have attached a link with the screenshots since it does not allow me to upload images.

1 Like

Hello, Thanks for your help.

Can we speak by Skype or other way?

Thank you very much.

Sorry to dig up this topic, I think it is still relevant now.

Has someone the permissions to retrieve the attached screenshots ? I tried many times to add custom fields to line items groups but can’t succeed.

Thank you for the collaboration !