How to filter regarding entity in dynamic CRM using JavaScript

 //filter regarding

function regardingFilter (executionContext) 

{

var formContext = executionContext.getFormContext();

var regarding = formContext.getControl("regardingobjectid") ? formContext.getControl("regardingobjectid") : null;

if (regarding.getEntityTypes().length >= 1) 

           {

               regarding.setEntityTypes(['opportunity']);

          }                       

}

Screenshot: 

After filter:

Before filter :



Comments

Popular posts from this blog

latest dynamics 365 interview questions for more than 2 years of experience

difference between enable rule vs display rule in ribbon workbench

If i create one record that created record date is older than 3 days, then I want to perform some operation with the help of business rule.