You need to sign in to do that
Don't have an account?
Madhu Dk
how to check Id is of which object/Sobject in Flow
Hi All,
i want to mimic this condition in Flow
if(m.UserOrGroupID.getsObjectType() == Schema.User.sObjectType){
tList.add(m.UserOrGroupId);
}
i am not getting the option to check 'getsObjectType' or Schema.User.sObjectType in my flow decission
please can any one guide me on this.
Thank you.
i want to mimic this condition in Flow
if(m.UserOrGroupID.getsObjectType() == Schema.User.sObjectType){
tList.add(m.UserOrGroupId);
}
i am not getting the option to check 'getsObjectType' or Schema.User.sObjectType in my flow decission
please can any one guide me on this.
Thank you.
All Answers
Greetings!
I don't think this is possible as the Flow can be created based on one Object and fires whenever the record is created,edited or when invoked by any other process.
You might need to use an apex class to achieve this and then invoke the same on process builder by using the invocable methods.
Example:https://www.desynit.com/dev-zone/salesforce-development/replacing-apex-triggers-processes-invocable-actions/
Kindly mark it as best answer if it helps so that it can help others in the future.
Warm Regards,
Shirisha Pathuri
Each object has a specific prefix (see here (https://www.salesforceben.com/salesforce-object-key-prefix-list/)) which can be incorporated into your Flow in various ways.
One option is to build these Object prefixes into a Custom Metadata Type (CMT) and then reference this CMT in the Flow using the Get Records Element. You would then loop over the CMT object to check your current RecordId against the table of prefixes.
Of course, you'll need to update the CMT if you have a need to reference new objects created after the CMT.