An nlobjSearchFilter contains an invalid operator,...
# suitescript
s
An nlobjSearchFilter contains an invalid operator, or is not in proper syntax: custentity_practice." var a_revenue_cap_filter = [[['custrecord_revenue_share_project.custentity_projectmanager', 'anyof', user], 'or', ['custrecord_revenue_share_project.custentity_deliverymanager', 'anyof', user], 'or', ['custrecord_revenue_share_project.custentity_clientpartner', 'anyof', user], 'or', ['custrecord_revenue_share_project.custentity_practice','anyof',a_practice_list],'or', ['custrecord_revenue_share_cust.custentity_clientpartner', 'anyof', user]], 'and', ['custrecord_revenue_share_approval_status','anyof',3]];
m
custentity_practice doesn't exist in the account or is not a list/record type field and should not use the 'anyof' operator
s
@mbrewer if(pract_search) { for(var i_prac=0;i_prac<pract_search.length;i_prac++) { a_practice_list.push(pract_search[i_prac].getValue('internalid')); } nlapiLogExecution('DEBUG','if inside pract_search :',pract_search); nlapiLogExecution('DEBUG','if inside a_practice_list :',a_practice_list); } nlapiLogExecution('DEBUG','if outside a_practice_list :',a_practice_list); nlapiLogExecution('DEBUG','if 0utside pract_search :',pract_search); var a_get_logged_in_user_exsiting_revenue_cap = ''; var a_project_search_results=''; var a_revenue_cap_filter = [[['custrecord_revenue_share_project.custentity_projectmanager', 'anyof', user], 'or', ['custrecord_revenue_share_project.custentity_deliverymanager', 'anyof', user], 'or', ['custrecord_revenue_share_project.custentity_clientpartner', 'anyof', user], 'or', ['custrecord_revenue_share_project.custentity_practice','anyof',a_practice_list],'or', ['custrecord_revenue_share_cust.custentity_clientpartner', 'anyof', user]], 'and', ['custrecord_revenue_share_approval_status','anyof',3]]; //approved
//pract_search coming null so var a_practice_list also null this practice_list passing to //custrecord_revenue_share_project.custentity_practice','anyof',a_practice_list so it will affect bcz they are using or condition