There are two different onLoad events in the client-side XRM framework: OnDataLoad and OnLoad. OnDataLoad happens on initial page load, when formContext.data.refresh is called, or when the data is saved and there is a change. OnLoad is called on initial page load and when a new record is first saved. When specifying an event handler in the form designer, you are specifying the OnLoad event handler. It won't trigger when you call formContext.data.refresh, so if you need something to happen after the refresh, you may need to attach one more event from code using formContext.data.addOnLoad. The function you pass as an argument will be called right away (after the onLoad) and whenever you use formContext.data.refresh.
Login now to access my digest by 365.Training