Test an event script

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2013, Dynamics CRM 2015, Dynamics CRM Online, Dynamics CRM 2016

Before you publish any customizations, you should thoroughly test your scripts. You can perform customization tasks only while you’re online.

  1. Make sure you have the System Administrator security role or equivalent permissions in Microsoft Dynamics 365.

    Check your security role

    • Follow the steps in View your user profile..

    • Don’t have the correct permissions? Contact your system administrator.

  2. Go to Settings > Customizations.

  3. Choose Customize the System.

  4. Choose Components > Entities, and then expand the entity you want.

  5. Choose Forms. In the list, choose a form to edit if it has a form type of Main.

  6. On the Home tab, choose Preview, and then select Create Form, Update Form, or Read-Only Form.

    • If you have added an OnLoad event for the form, open the form in each mode, and verify that your event executed as expected.

    • If your code depends on data existing in the form when it loads, test your script in an OnChange or OnSave event to enter sample data into the form. The Update Form will open with no data.

      • If you have added an OnChange event for a field, for create and update modes, enter the data in the field and verify that your event executed as expected.

      • If you have added an OnSave event for a field, for create and update modes, choose Simulate Form Save and verify that your event executed as expected.

  7. Choose File > Close.