web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to show Web Resource in Portal

(0) ShareShare
ReportReport
Posted on by 5

Hi,

We've developed a custom solution which includes web resources. The web resources include custom js/css to render custom entities. Now Client wants to share the custom entity via CRM Portal and would like to use the same web resource rendering in Portal. 

So far this is what we've tried without any success:

  1. Created a custom entity form where we've embedded our web resource which is working fine in CRM Sales module.
  2. Exposed the custom entity form via Portal. But not rendering properly as the references to css/js files are missing in portal.

Can anyone please suggest if it's possible or best practices around using custom web resources (with css/js referencces in it) in CRM Portal?

Thanks

Sohel

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at
    RE: How to show Web Resource in Portal

    You can't access webresources of CRM in Dynamics portal. You need to create new webfiles and access it in your webpages.

    docs.microsoft.com/.../web-files

    https://community.dynamics.com/crm/b/briteglobalsolutions/archive/2018/05/02/javascript-web-files-in-crm-portals

  • Sohel Rana Profile Picture
    5 on at
    RE: How to show Web Resource in Portal

    Hi Arpit,

    Thanks for your reply. We are using regular css/js reference like <Script Src="a.js" />. What I've found the <head> section of the web resource doesn't get rendered at all, where some of our js/css references are included. Also can you please elaborate a bit on "CRM web resource does support on portal unless any XRM script being written in the code". By 'code' do you mean server side code?

    we are using angularjs and dynamic loading of scripts (using typescript module loader) which all work fine inside CRM but not working in protal as the referenced css/js files not found in portal.

    Basically I'm looking for any guidelines or official documentation on how to use web resources in portal. If you can please guide me to any sample on github or Microsoft documentation on developing web resources for portal, that'll be great.

    Thanks

    Sohel

  • Suggested answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at
    RE: How to show Web Resource in Portal

    Hi Sohel,

    CRM web resource does support on portal unless any XRM script being written in the code. It also depends on what type of CSS/JS you are referring in the code, try putting it in web file and refer it in your custom javascript. Like below:

    $.getScript("~/myJS.js", function() {

     //your portal code.

    });

    Hope it helps.

    Mark the answer Verified if it helps.

    Regards

    Arpit

    arpitmscrmhunt.blogspot.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

Responsible AI policies

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

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#2
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans