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)

{Portal} Update entity list view details link dynamically

(0) ShareShare
ReportReport
Posted on by 55,410 Moderator

Hi,

I have Customer Self Service portal where I am working n the Out of Box case entity list. I have created multiple page (copy of the case-edit) page.

case-edit-request

case-edit-problem

case-edit-question

I now need to dynamically assign these webpages to the view link based on the case type code. I am able to write a code to get the row but not sure how to update the "view detail" button link to wen page respectively.

case-type.png

Looking for suggestion/ help

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at

    Hi Ravi,

    I am assuming, you are having three Edit Web pages of Case Entity only in order to Edit the case of different case type.

    So if all the web pages referring to the same entity, then Instead of redirecting the user's to the different-2 edit web pages based on Case Type, Can't you keep a single edit webpage and Hide/Show Tabs/FIelds/Information based on Case Type? I don't know about your exact requirement though. You might have already tried.

    For Example- Onload of edit webpage check, If Case Type is A then show only Tabs/Fields related to A and so on.

    Though we can write a code also in order to fulfil your requirement. But as per my personal experience, we can easily achieve such type of requirements by using single form also and can reduce the customization and code effort.

    Hope it helps.

    If my answer helped to resolve your issue, kindly verify it by clicking 'Yes'. It would be helpful to the other community members seeking to resolve a similar issue.

    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.in

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Thanks Arpit. But in my actual scenario, the entity has 13 optionset values. I already have separate entity list & web pages for each of the type which are exposed as links on the portal. So for example, there are links such as "Case - Questions", "Case - Problem" & "Case - Request".

    Now the requirement is to have a common list where they can see all the records and then click on view details which opens the respective web page.

    The fields/ customization for each is very different so it would be more time consuming to write a script to show/ hide values. Also, each type has their own functionality. Because of these I was avoiding having a common page and use JS to show/ hide.

    I was able to achieve this requirement by the below JS but not sure if this is the best way to acheive it.

    ================

     $(document).ready(function (){

       $(".entitylist.entity-grid").on("loaded", function () {

         $(this).children(".view-grid").find("tr").each(function (){

           var caseTypeCode;

           $(this).find("td").each(function (){  

             var elm = $(this).attr("data-attribute");

             if(elm === "casetypecode")

             {

               caseTypeCode = $(this).text();              

             }

           });

           // Find the path

           var currentPath;

           $(this).find("td").each(function (){        

             $(this).find("a").each(function (){

              var currentPath = $(this).attr('href');

              if(caseTypeCode === "Problem")

              {

                currentPath = currentPath.replace("edit-case", "edit-case-problem");          

                $(this).attr('href',currentPath);            

              }

              else if(caseTypeCode === "Question")

              {

                currentPath = currentPath.replace("edit-case", "edit-case-question");          

                $(this).attr('href',currentPath);

              }

              else if(caseTypeCode === "Request")

              {

                currentPath = currentPath.replace("edit-case", "edit-case-request");          

                $(this).attr('href',currentPath);

              }

              $(this).prop('target', '_blank');

             });

           });

         });

       });

     });

    ================

  • Vkas Profile Picture
    15 on at

    Hi Arpit,

    I am very new to this and struggling to get this done.

    I have few columns in my portal page where one column is showing full hyperlink of a site. I want to show just a link instead of full URL.

    pastedimage1592292314394v1.png

    As per above image, is there any way I can show just a clickable link in Address instead for URL. or if I can make SearchEngine values as clickable with given links

    Thanks

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