Activity Forums Salesforce® Discussions When to use Test.setCreatedDate in a test class in Salesforce?

  • Anuj

    Member
    July 31, 2020 at 1:39 pm
  • Shweta

    Member
    July 31, 2020 at 2:37 pm

    Test.setCreatedDate is used when you want to set CreatedDate for a test-context sObject. This method takes two parameters—an sObject ID and a Datetime value—neither of which can be null.

  • Sumit

    Member
    August 3, 2020 at 5:04 am

    Test.setCreatedDate is used when you want to set CreatedDate for a test-context sObject. This method takes two parameters—an sObject ID and a Datetime value—neither of which can be null.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos