Quantcast
Viewing all articles
Browse latest Browse all 79901

Issues in some javascripts after upgrading to Dynamics CRM Online 2016

Hi,

We have just upgraded one of our Dynamics CRM instance from CRM Online 2015 to CRM Online 2016.

While I could see rest of the functionalities working properly, there is a major show stopper for us in a particular scenario:

Following is the code from a java script function which gets called during page load:

function SetDefaultValuesInLookup()
{
Xrm.Page.getAttribute("new_applicationcontactid").setValue([{ id: records.new_Contact.Id, name: records.new_Contact.Name, entityType: records.new_Contact.LogicalName }]);
........<<some code here>>.......
Xrm.Page.getAttribute("new_applicationtype").setValue(1000002);
}

function ShowHideFields()
{
var applicationtype = Xrm.Page.getAttribute("new_applicationtype").getValue();
........<<some code here>>.......
}



To summarize SetDefaultValuesInLookup function sets a value for the lookup field "Application Contact Id" in the form, and also sets "new_applicationtype" based on some condition.
This two functions are registered in the form load to get executed in an order.

however, the problem is that - sometimes the method SetDefaultValuesInLookup abruptly terminates after executing first getAttribute value, or if the method completes its execution, then we don't get value in new_applicationtype field. Or sometimes, both the method works properly.

I tried debugging the code, and could see we are getting Id, Name, and LogicalName properties are getting populated everytime, so there is no issue at that level.

I am wondering if there is something here which is not supported in CRM 2016? Also, this functionality still perfectly works in Online 2015.

Can anyone please suggest here?

Thanks and Regards,

Nirman


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>