I have an object name Rules__c and there is an approval process written over this object. We also have trigger over this object. Rules__c is common object refer by different Community.
we want this approval process to run only in condition that call is comming from internal community user so we have created one field called is_internal_Community_userrecord.
In my beforeTrigger on Rules__c i am doing like below
if(internaluser){
set is_internal_Community_userrecord=true;
}
in Approval process I am checking if(is_internal_Community_userrecord)==true
My Assumption was before trigger will set the value and in approval process will function accordingly but looks like approval process is firing first. Can you please tell me if Approval process will run first or Trigger and How can i set value on record before approval process fires.
Thanks