Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

HTML - Microsoft Dynamics 365/CRM web resource URL is invalid

(0) ShareShare
ReportReport
Posted on by 1,320

Hi Friends,

I have an issue with code analysis in HTML code. I have below reference files in my script tags.

<script src="../WebResources/po_Json2.js"></script>
<script src="../WebResources/ctas_XrmUtilityCommon"></script>

Instead of this, i have to write with full URL of webresource file like below dynamically for all instances.

<script src="myorganization.crm.dynamics.com/.../po_Json2.js"></script>

<script src="myorganization.crm.dynamics.com/.../ctas_XrmUtilityCommon"></script>

Please help me how to do this?

Thanks,

Suresh.

*This post is locked for comments

  • Suggested answer
    Shaminderpal Singh Profile Picture
    Shaminderpal Singh 1,565 on at
    RE: HTML - Microsoft Dynamics 365/CRM web resource URL is invalid

    Hi Suresh,

    Just refer to your webresource by following:

    <script src="..//WebResources/po_Json2.js"></script>

    <script src="..//WebResources/ctas_XrmUtilityCommon"></script>

    -Shaminder

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: HTML - Microsoft Dynamics 365/CRM web resource URL is invalid

    I recently noticed that for some reason in Dynamics 365 (even you create one directly inside Dynamics 365), the URL generated by the platform contains a double slash before "Web Resource"

    For example, "https://<CRM ADDRESS>//Web Resources/new_test.html. I assume this is a bug introduced by Microsoft in the latest version of Dynamics 365 and it is causing problems for implementation.

    Kind Regards,

    Jaimie

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: HTML - Microsoft Dynamics 365/CRM web resource URL is invalid

    Hi Suresh,

    if you solved the problem thanks to an answer, please mark it as verified to encourage the community to provide more and more a better support. Thank you. Francesco

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Suggested answer
    Abdul Wahab Profile Picture
    Abdul Wahab 12,081 Moderator on at
    RE: HTML - Microsoft Dynamics 365/CRM web resource URL is invalid

    Hi Suresh

    Use below code to get the server URL:

    var serverURL = Xrm.Page.context.getClientUrl()

    and concatenate it with as shown below

    "https://" + serverURL + "/WebResources/po_Json2.js"

    If you have any queries do let me know.

    Thanks

    Regards,

    AW

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: HTML - Microsoft Dynamics 365/CRM web resource URL is invalid

    Hi Suresh,

    if you solved the problem thanks to an answer, please mark it as verified to encourage the community to provide more and more a better support. Thank you. Francesco

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: HTML - Microsoft Dynamics 365/CRM web resource URL is invalid

    Hi Suresh,

    simply go to Settings > Customizations > Customize the system (or any solution when you added the script filtes "json2" and "xrmutilitycommon").

    Then open with double click each resource.

    At the bottom of the window you will find the fullurl of each webresource.

    Please let me know if you solve.

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans