SQS_Objects and line items question: Howto add custom fields from AOS_Products_cstm table into SQS objects

I have been trying to add (custom) fields from the table AOS_Products_cstm into AOS_Products_Quotes line items .
I have edited line_items.js and the sqs_objects var in the function insertLineItems like so (my custom field is ‘variant_c’ from the table ‘AOS_Products_cstm’):

sqs_objects[“product_name[” + prodln + “]”] = {
“form”: “EditView”,
“method”: “query”,
“modules”: [“AOS_Products”],
“group”: “or”,
“field_list”: [“name”, “id”,“part_number”,“variant_c”, “cost”, “price”,“description”,“currency_id”],
“populate_list”: [“product_name[” + prodln + “]”,
“product_product_id[” + prodln + “]”,
“product_part_number[” + prodln + “]”,
“product_variant_c[” + prodln + “]”,
“product_product_cost_price[” + prodln + “]”,
“product_product_list_price[” + prodln + “]”,
“product_item_description[” + prodln + “]”,
“product_currency[” + prodln + “]”],
“required_list”: [“product_id[” + prodln + “]”],
“conditions”: [{
“name”: “name”,
“op”: “like_custom”,
“end”: “%”,
“value”: “”
“order”: “name”,
“limit”: “30”,
“post_onblur_function”: “formatListPrice(” + prodln + “);”,
“no_match_text”: “No Match” };

and then inserted the extra cell with the following code:
var bb = x.insertCell(3);
bb.innerHTML = “”;
And i have modified insertProductHeader so the table header matches the new field added.

However I am getting no data for the custom field when i select a product to add to line items. I have not been able to find any documentation that adequately explains the steps necessary to make this work and I have not been able to find any help on how to modify SQS objects to include custom variables in the related XXXX_cstm tables.

If it were just this one field that i need to add to line items; I could have seconded a field from the main AOS_Products table, however, I have a few more custom fields to add to line items, so I need a better method.
Thanks in advance

After much experimentation , I got things working.
The simple answer is Yes.
Yes you can get data from the AOS_Products_cstm table via sqs objects. There should be a corresponding field in AOS_Products_Quotes_cstm table as well.
Just remember to also update the datastructure: ‘field_to_name_array’ in function setProductReturn(popupReplyData) in line_items.js too.
Thanks for your help.
I hope this answer helps others too.

Sorry i am new to this, but where did you insert this code? do you still add that to the line_items.js ?

Yes… this all occurs within line_items.js

Тhanks for the post. Very useful.
I also try to do it, but with Dropdown.
I tried as a custom fields in both modules, even tried with defining the fields in vardefs. php, but so far it is waking only from the popup window.
Can’t mange to do it with the sqs_objects.

Can somebody help me, with some directions.

Thank you!

did you achieve your task? me too facing the same issue can you help me please.