Activity Forums Salesforce® Discussions How do we unit test a trigger when we don’t know the required fields in salesforce?

  • Manpreet

    Member
    May 22, 2017 at 5:55 am

    Hi saurabh,

    Customers can have validation on custom fields via validation rules and triggers, so handling that in your unit tests without customer intervention is next to impossible. The first step to reducing issues is to have your test data populate all standard fields and ensure the data uses the most common formatting for your customer base (US style phone numbers and addresses for the US for example).

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos