Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Problem with publishing customisation (JavsScript)

Posted on by 75

Hello,

We recently upgraded our client from CRM 2011 to Dynamics 365. We are now in the process of applying custom code and making JavaScript changes. What we have come across till now is that if we publish a particular change of JavaScript, the Dynamics 365 code does not take in the new code applied.

Scenario: We were working on a JavaScript in contact entity to detect duplicate SSN numbers. We applied the code by putting in alert boxes to check if the function was getting correctly called. Once we were sure that we were getting desired results, we removed the alert boxes and then "Published" the customisation's. 

Then on checking the contact entity, it executed old code (with alert boxes). This shouldn't have been the case as we had removed the alert boxes and they should not have appeared. We tried refreshing the browser, but it did not work. We closed the browser, waited for 5mins and then reopened. On checking again, it showed us correct results (no alert boxes). The same thing happened next day when we first opened the contact. It again started showing is alert boxes when there were none in the code as the code wasn't touched overnight. 

Closing and re-opening the browser gave us correct results again.

This is happening with other entities as well. We are unable to to understand or determine the cause of this. 

So does this mean that our "publish" is not working? Or are there any delays for the script to run after we "publish" ? Or is it anything else?

We tried to clear the cache of the explorer and that did work. But telling the client to clear cache before using the JavaScript each time is a bit too much.

Any help or explanation or solution for this is highly appreciated.

Thanks & Regards,

Sudeep

*This post is locked for comments

  • Sudeep Profile Picture
    Sudeep 75 on at
    RE: Problem with publishing customisation (JavsScript)

    Ok thanks. Is there any setting as such that i need to check in D 365 which might help resolving this issue?

  • MNarmeen Profile Picture
    MNarmeen 1,846 on at
    RE: Problem with publishing customisation (JavsScript)

    No, I don't think so.

    I have implemented various JavaScript codes on D365 but this has not happened to me at-least or reported on community before.

  • Sudeep Profile Picture
    Sudeep 75 on at
    RE: Problem with publishing customisation (JavsScript)

    Hi Narmeen,

    We did try this out with IE 11 as well as Chrome. Its the same with both the browsers.

    Also, we confirmed that the code did get saved and got published. We tried publishing twice before we checked the functionality and that too had same results.

    Is this any bug with Dynamics 365?

  • MNarmeen Profile Picture
    MNarmeen 1,846 on at
    RE: Problem with publishing customisation (JavsScript)

    Hi Sudeep,

    This is quiet strange behavior and might be caused

    a) the cache is not refreshing b) the entities and code is not saved and published.

    Try using different browsers to test before deploying at client's end.

    Please make sure the code files are not duplicated.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans