You need to sign in to do that
Don't have an account?
VAHB
Test for Cases
I am creating a test case on a Trigger that acts on Cases Object
I am creating an object
Case abc = new Case ();
when I do system.debug ('The case created date is: ' + abc.CreatedDate);
In the output I see null for the created data, isn't this automatically generated how can it be null? its a not writable field
If it is a before trigger the record is not inserted, thats why there is no ID or createdDate.
All Answers
Same thing for Id, doing abc.ID gets me null, but if the Case was created all of this should be automatically created
If it is a before trigger the record is not inserted, thats why there is no ID or createdDate.