Hi,
iām tryng to change sqs in line_items to add where condition for cutsom field present in aos_products_cstm
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", "promo_c", "max_disc_amt_c", "max_disc_unit_c", "aos_product_category_name"],
"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 + "]", "product_promo_c[" + prodln + "]", "product_max_disc_amt_c[" + prodln + "]", "product_max_disc_unit_c[" + 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"
};
Adding custom WHERE clause like below:
"conditions": [{
"name": "promo_c",
"op": "like_custom",
"end": "%",
"value": "1"
}],
thrown a an error in mysql cause it prepends aos_products table instead aos_products_cstm
see below:
MySQL error 1054: Unknown column āaos_products.promo_cā in āwhere clauseā
If i prepend table name like this:
"conditions": [{
"name": "aos_products_cstm.promo_c",
"op": "like_custom",
"end": "%",
"value": "1"
}],
It still prepend aos_products table:
MySQL error 1054: Unknown column āaos_products.aos_products_cstm.promo_cā in āwhere clauseā
Is there any way to achieve this?
Many thanks to all for any hint!