Hi,
I’m trying to add a condition in file line_items.js in the function insertProductLine() in the sqs_objects, but it dosen’t work…
I’ve read that you can’t add a condition on custom field… Is that right? If not, can someone help me to solve my problem?
(I’ve created a checkbox field in the product module. The name is activ_c, it checks if the product is activated or not)
My code is the following :
sqs_objects["product_name[" + prodln + "]"] = {
"form": "EditView",
"method": "query",
"modules": ["AOS_Products"],
"group": "or",
"field_list": ["name", "id","part_number", "cost", "price","description","currency_id"],
"populate_list": ["product_name[" + prodln + "]", "product_product_id[" + prodln + "]", "product_part_number[" + 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": ""
},
{
"name": "actif_c",
"op": "like_custom",
"end": "%",
"value": ""
}],
"order": "name",
"limit": "30",
"post_onblur_function": "formatListPrice(" + prodln + ");",
"no_match_text": "No Match"
};
Thanks for help!
Soraia