0
votes

We're using CRM 2011 here, soon upgrading to 2016. We have a deployment issue right with 2011. We have a way to export & import custom JavaScript for several of our Forms. However, one of them is missing an OnSave event handler. I don't know how to explain this without getting down into the weeds, so here goes.

In CRM 2011, if you open up a new form and go to the Customize tab on the ribbon, you can select "Form" from the ribbon. Clicking that opens up a new page. On that page, there is a "Form Properties" button. Clicking that opens a Form Properties dialog. Under "Event Handler", you can specify JavaScript methods for particular events. In our case, it's the OnSave event we want to assign to a JavaScript function. Doing that is not a problem (in a new dialog, you just enter the function name). But we haven't found a way to Export that selection.

We can export the page in a solution. But that just exports the JavaScript (and maybe some other settings on the form), but it doesn't save this one setting. Is there a way to export the setting so it can be imported?

The deployment guys just want us to include instructions on how to do it manually, but I figure there must be some way to export/import this selection. After all, there are dozens of forms, all with their own settings.

1
I found this and am attempting to do what it says for "Export the Default Solution to create a backup". We'll see if that works...Frecklefoot

1 Answers

2
votes

Things to keep in mind and also a few best practices:

  • Always use a solution for all of your customizations, even if the change is as small as the one you have listed, refrain from making changes to the default base solution.
  • After you customize your form (adding event handlers, adding removing fields) always save and publish so your solution when exported has the latest changes.
  • Keep an eye on the import order while importing unmanaged solutions as the last one always wins (overwrites the changes of the previous solution).
  • Upon importing the solution to the target system, always publish to ensure the changes are promoted right away.

Updating the answer based on the comment history:

You need to export the entity form for the event handlers to end up in the target system. Create a new solution, add the entity and the form, export the solution and import it to your target system