You need to sign in to do that
Don't have an account?
Raymond Mortu
trigger on a lookup field
Hi, I'm new to triggers.
can someone help me with the below trigger.
NCT Object
query owner(owner) which is a lookup field.
should be Queue (1) and the next field should be NCT queque (2) Below:
This is what I did to change the Owner to NCT queue and got an Error
can someone help me with the below trigger.
NCT Object
- if field – (Process 8a case) Court process field is NCT
- Change case/query owner to NCT queue
- Open an NCT object
- Complete client full name in NCT object from case field
query owner(owner) which is a lookup field.
should be Queue (1) and the next field should be NCT queque (2) Below:
This is what I did to change the Owner to NCT queue and got an Error
Before I help you with the code, I advice you to go through the best practices for the triggers and how to bulkify them. It's really important, a little research will help you a lot.
As a general rule, always avoid SOQL in the for loop.
Now, here is how you get the ID of the queue,
and also you can paste the code here via 'Add a code sample' :-).
Mark it gree if it soves your problem.
Cheers,
Dev
All Answers
You need first query the record Id of your 'NCT Queue' and then assign that id to owner id field of ur case.
Please mark this post green if it helps. Cheers, Dev
i greatly appreciate it.
How do I query the Id of 'NCT Queue'.
This is where the Queue and the NCT Queue is:
Before I help you with the code, I advice you to go through the best practices for the triggers and how to bulkify them. It's really important, a little research will help you a lot.
As a general rule, always avoid SOQL in the for loop.
Now, here is how you get the ID of the queue,
and also you can paste the code here via 'Add a code sample' :-).
Mark it gree if it soves your problem.
Cheers,
Dev