You need to sign in to do that
Don't have an account?
Felix Jong Seok Chae
Get a record that has been updated from apex trigger
So I have rest api written in java and it can update a case record.
The problem is in the "after update" trigger, I don't know the command to get a update case record.
For "after insert" trigger, I knoew I can simply have "Case c = Trigger.New[0]" to get a new inserted case record.
Any help would be appreciated.
The problem is in the "after update" trigger, I don't know the command to get a update case record.
For "after insert" trigger, I knoew I can simply have "Case c = Trigger.New[0]" to get a new inserted case record.
Any help would be appreciated.
It's like when you put your DML on List of records who are subject to update, those are the records are part of After Update.
so one of the functions in java rest will take a casenumber for the case I want to update as an input, but I don't know how Apex trigger can receive that case number. Like you mentioned, my plan was to write sql command like Case c = [select caseid from case where casenumber = casenumberFromJava][0], but don't know how I can bring casenumberFromJava from java.
Let's say you are counting Case Records on Account and Contact such as Number of Cases on Account and Number of Cases on Contacts.
see the trigger below, Did you notice the lists AccountListToUPdate and ContactListToUpdate are the lists who contains the records who are about the get updated.
So, you can say something like And same thing for the contact list such as
Hope this helps!