You need to sign in to do that
Don't have an account?

Using IF statement in trigger on specific object type
I am trying to create a trigger action based on the type of object as the Attachment.ParentId. Specifically a custom object, Agreement, that always starts with a0g in the ID.
I want to write this type of logic:
trigger TRIGGNERNAME on Attachment (after insert) { for (Attachment a: trigger.new) { if(a.ParentId LIKE 'a0g%') { TRIGGER ACTION } } }
However, the LIKE option is not support and I cannot figure out what to substitute. Any ideas?
What about...
Regards
All Answers
What about...
Regards
That worked - thanks so much for the quick soution.