Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
I am not understanding what is the use of newMap,oldMap and how it used.
please give me explanation with example
NewMap - Map of the new values of the records. While creating or eiting. The values after edit is stored here.
OldMap - Map of the oldValues of the record. The record that already exists in the database.
Example : Creating a New Case record :
CaseNumber =1;
Description = 'Test Case';
In this case there will be no oldMap, as there is no old values of this record.
NewMap will hold values : 1,'Test Case'
Let's say we made a change to the description (editied it)
Old Values :
NewValues:
Description = 'Test Case edited';
OldMap : 1,'Test Case'
newMap: 1,'Test Case edited'
Hope did not confuse you...
Thanks you sir....
NewMap - Map of the new values of the records. While creating or eiting. The values after edit is stored here.
OldMap - Map of the oldValues of the record. The record that already exists in the database.
Example : Creating a New Case record :
CaseNumber =1;
Description = 'Test Case';
In this case there will be no oldMap, as there is no old values of this record.
NewMap will hold values : 1,'Test Case'
Let's say we made a change to the description (editied it)
Old Values :
CaseNumber =1;
Description = 'Test Case';
NewValues:
CaseNumber =1;
Description = 'Test Case edited';
OldMap : 1,'Test Case'
newMap: 1,'Test Case edited'
Hope did not confuse you...
All Answers
NewMap - Map of the new values of the records. While creating or eiting. The values after edit is stored here.
OldMap - Map of the oldValues of the record. The record that already exists in the database.
Example : Creating a New Case record :
CaseNumber =1;
Description = 'Test Case';
In this case there will be no oldMap, as there is no old values of this record.
NewMap will hold values : 1,'Test Case'
Let's say we made a change to the description (editied it)
Old Values :
CaseNumber =1;
Description = 'Test Case';
NewValues:
CaseNumber =1;
Description = 'Test Case edited';
OldMap : 1,'Test Case'
newMap: 1,'Test Case edited'
Hope did not confuse you...
Thanks you sir....