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 kumar

    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