Skip to main content

Notifications

Announcements

No record found.

Hyperlink on Lookup Values in CRM Portal

Arpit Shrivastava Profile Picture Arpit Shrivastava 7,518 User Group Leader



Hello Friends,

From last couple of days, I came across so many forums and communities and found so many folks are looking for a way to open lookup selected values in Portal so that users can see easily the details of lookup selected values.

Extending CRM lookup functionality to ADX portal gives users an rich experience in terms of user interface/functionality. However not all fields behave same in Dynamics CRM and ADX portal, look-up control being one such example. When viewed on ADX Portal form, look-up doesn't allow users to open up a new window giving details about the selected lookup value like CRM.

Today In this article I am going to share the code through which we can open the lookup selected value in portal.


Step 1 - Download the JS file from this link.

Step 2 - Create a Web File record (Portals > Web Files) with below details. And attach JS file (downloaded in Step 1) in Notes.




Step 3 - Create Entity Form in Edit Mode to view the lookup value. See below link to create Entity Form in Edit mode.

https://community.adxstudio.com/products/adxstudio-portals/documentation/configuration-guide/entity-form/


Step 4 - Use below code on Webpage Custom JavaScript section to Open Lookup Selected Values.


$(document).ready(function () {

//Parameter Description:

//Parameter 1   -   Lookup Html input element which store lookup text (can get it by doing F12)
//Parameter 2   -   Lookup Html input element which store lookup guid (can get it by doing F12)
//Parameter 3   -   Partial Name of webpage which is associated with Entity Form (Created in Step 3 Edit Mode)
//Parameter 4   -   location where you want to open new window to view lookup record (_self/_blank)


















 $.getScript('~/openlookuprecord', function () {

 openLookupRecord("case_name","case","Edit-Entity-Form-Webpage","_blank");
     
});

});





Step 5 - Open the webpage On Portal. As soon as you will select the lookup value, you will get Hyperlink over the value. Now when you click on Lookup value you will be redirected to Details Page.













Best part of this code is, its totally configurable. After attaching the JS file in Web File record, you just need to call openLookupRecord function.

Please feel free to get in touch in case of any query. Cheers

This was originally posted here.

Comments

*This post is locked for comments