Account entity I have one lookup Product Access which is pointing to the custom entity.
In Account entity I do have another lookup called Role Type which pointing to the Customer Roles custom entity.
In Customers Role entity I have one option set select role, Role A, Role B and Role C. and Name , Department fields in Customers Role entity I have created one record called Sales Person as Name and select role as Role B.
In Account entity if Product Access is not equal to null then I need to auto populate the Role Type as Sales person by default.
How to achieve this, I tried this by using the Fetch xml Query like below
"<fetch mapping='logical'>" +
"<entity name='new_customerroles'>" +
"<attribute name='new_name' />" +
"<filter type='and'>" +
"<condition attribute='new_customerroleid' operator='eq' value='" + new_customerroleid + "'/>" +
"<condition attribute='new_selectrole' operator='eq' value='100000002'/>" +
"<condition attribute='statecode' operator='eq' value='0'/>" +
"</filter>" +
"</entity>" +
"</fetch>";
Can someone please help me on this.
Thanks,
Rahul