crm2013 - Onsave error on appointment RRS feed

  • Question

  • Hello,

    We upgraded crm2011 to crm2013 and are using an on-premise system.

    currently, we can not save new Appointments. You can see the error below.

    On customizations.xml of appointment, there is an internalhandlers tag. When ı comment out this tag and import the solution again, it can be saved but there is no action on screen. I mean, save button looks like there is no action but ı can find the saved appointment record by using advanced find.

    After doing this, ı finally  compare  content of Appointment_main_system_library.js  for upgraded CRM2013 and a fresh CRM 2013 setup (not an upgrade).

    • upgraded CRM2013 has "Type.registerNamespace("Mscrm");Mscrm.Form_onload=function(){!IsNull(Mscrm.RecurrenceUtil)&&Mscrm.RecurrenceUtil.addCustomGridRefreshHandler();var wrapper=Xrm.Page.data.entity.attributes.get("seriesid");if(wrapper){seriesId=wrapper.getValue();APPOINTMENT_SERIES_ID=seriesId;try{refreshRibbon()}catch(e){}}!IsNull(Mscrm.EntityPageHandlerFactory)&&Mscrm.EntityPageHandlerFactory.create();!IsNull(Mscrm.AppointmentNotifications)&&Mscrm.AppointmentNotifications.registerExchangeSyncNotifications();initDates()};Mscrm.isalldayevent_onchange=function(){Xrm.Page.data.entity.attributes.get("scheduledstart").setSubmitMode("always");Xrm.Page.data.entity.attributes.get("scheduledend").setSubmitMode("always")}"
    • a fresh CRM2013 has "Type.registerNamespace("Mscrm");Mscrm.Form_onload=function(){!IsNull(Mscrm.RecurrenceUtil)&&Mscrm.RecurrenceUtil.addCustomGridRefreshHandler();var wrapper=Xrm.Page.data.entity.attributes.get("seriesid");if(wrapper){seriesId=wrapper.getValue();APPOINTMENT_SERIES_ID=seriesId;try{refreshRibbon()}catch(e){}}!IsNull(Mscrm.EntityPageHandlerFactory)&&Mscrm.EntityPageHandlerFactory.create();!IsNull(Mscrm.AppointmentNotifications)&&Mscrm.AppointmentNotifications.registerExchangeSyncNotifications();initDates()};Mscrm.isalldayevent_onchange=function(){Xrm.Page.data.entity.attributes.get("scheduledstart").setSubmitMode("always");Xrm.Page.data.entity.attributes.get("scheduledend").setSubmitMode("always")};Mscrm.Form_onsave=function(context){}"

    The difference is the "Mscrm.Form_onsave=function(context){}".. But after adding this code to web resource, it didnt work...

    Any ideas?



    Thursday, April 3, 2014 8:52 AM

All replies

  • Hi there,

    It seems you have a Script that uses the old CRM 4.0 SDK, It worked properly on the CRM 2011.

    But by doing the upgrade to CRM 2013 you need to convert all your developments to the 2011 SDK(a lot changes check this post).

    I suggest you run the CRM Legacy Checker tool to confirm all your code is updated. (Tutorial).

    Good Luck

    Thursday, April 3, 2014 9:20 AM
  • Hi Tiagolvsantos, thank you for your reply.

    I tried your suggestion, but there is no issue :(  Any other solution???

    Thursday, April 3, 2014 12:04 PM
  • first time I see someone disable the javascript functions changing the customizations.xml file.

    First of all the legacy tool suggested by tiagolvsantos is useful, but it doesn't cover all the possible issues when a CRM is updated.

    Your xml file shows that you have a javascript library called Appointment_main_system_library.js, normally this kind of name indicates CRM 4.0 code upgraded to CRM 2011.

    You need to go to customizations and open the appointment form (here you can find a tutorial, it shows how to add, but it's the same position to check for existing libraries: http://happycrm.blogspot.com/2010/11/ms-crm-2011-my-first-experience-adding.html)

    after check if there are onsave methods attached to the onsave event from the Appointment_main_system_library.js.

    You can also post the code of Appointment_main_system_library.js file here so can check what need to be done for update the library and make it compatible with 2013

    My blog: www.crmanswers.net - Rockstar 365 Profile

    Thursday, April 3, 2014 12:21 PM