web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    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

  • Suggested answer
    Community Member Profile Picture
    on at

    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
    12,119 Moderator on at

    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
    on at

    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

  • Community Member Profile Picture
    on at

    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
    Shaminderpal Singh Profile Picture
    1,565 on at

    Hi Suresh,

    Just refer to your webresource by following:

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

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

    -Shaminder

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans