You need to sign in to do that
Don't have an account?
Jag Singh
Case Trigger to populate Lookup for Entitlements
Hi,
I'm building a trigger for the Case object... whereby every time a Case is created I need the Entitlement Lookup field to automatically populate to 'Default Entitlement'. I've written this code below but comes up with an error message:
1. trigger CheckFieldValues on Case (before insert) {
2. for (Case c : Trigger.new) {
3. if (c.Status == 'New')
4. c.Entitlement = 'Default Entitlement';
5. }
6. }
ERROR MESSAGE: Error: Compile Error: Illegal assignment from String to SOBJECT:Entitlement at line 4 column 13
Not an expert on Triggers so any help would be good!
Thanks,
J
I'm building a trigger for the Case object... whereby every time a Case is created I need the Entitlement Lookup field to automatically populate to 'Default Entitlement'. I've written this code below but comes up with an error message:
1. trigger CheckFieldValues on Case (before insert) {
2. for (Case c : Trigger.new) {
3. if (c.Status == 'New')
4. c.Entitlement = 'Default Entitlement';
5. }
6. }
ERROR MESSAGE: Error: Compile Error: Illegal assignment from String to SOBJECT:Entitlement at line 4 column 13
Not an expert on Triggers so any help would be good!
Thanks,
J
You can use below code:
If this solves your problem, kindly mark it as the best answer.
Thanks,
Vatsal
All Answers
You can use below code:
If this solves your problem, kindly mark it as the best answer.
Thanks,
Vatsal