Salesforce For YOU
ads
Wednesday, 29 August 2018
To set created date for a test record in test class in Salesforce
Code Format:
Student__c stud = new Student__c(Student_Name__c = 'Testing');
insert stud;
Test.setCreatedDate(stud.Id, DateTime.newInstance(1000,20,20));
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment