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