function onChangeTipologiaintervento(executionContext)
{
debugger;
var formContext=executionContext.getFormContext();
if(formContext.getAttribute("new_tipologiaintervento").getValue!=null){
var tipologiaintervento= formContext.getAttribute("new_tipologiaintervento").getValue();
if (tipologiaintervento == 1 )
{
//formContext.getControl("msdyn_workordertype").addPreSearch(filterlookup);
var fetchxml= "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>"+
"<entity name='opportunity'>"+
"<attribute name='name' />"+
"<attribute name='customerid' />"+
"<attribute name='estimatedvalue' />"+
"<attribute name='statuscode' />"+
"<attribute name='opportunityid' />"+
"<order attribute='name' descending='false' />"+
"<filter type='and'>"+
"<condition attribute='msdyn_workordertype' operator='in'>"+
"<value uiname='Intervention' uitype='msdyn_workordertype'>{03A27F86-75C7-EB11-BACC-000D3A26E00B}</value>"+
"<value uiname='Sopralluogo' uitype='msdyn_workordertype'>{E4997BC9-6DBC-EB11-BACC-000D3A4980A5}</value>"+
"</condition>"+
"</filter>"+
"</entity>"+
"</fetch>";
formContext.getControl("msdyn_workordertype").addCustomFilter(fetchxml);
}
}
}
it not working and no error is coming
Any help would be great!!!!!