function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Malik Butler 5Malik Butler 5 

Adding a hyperlink to an asset

Is there a way to add a hyperlink to an asset object?
Jonathan A FoxJonathan A Fox
Do you mean in terms of lookup froma . different object and havign it display as a related object which you can click?
or
As a link/button on an object that takes you to said asset record?
Jonathan A FoxJonathan A Fox
So SOQL the asset, retrive the ID and append it to the URL?
Ajay K DubediAjay K Dubedi
Hi Malik,

As I understand your requirement, you want when to click on any asset record, the detail page should be open for that record.
You Want to make Your asset record clickable. I guess you have a visual force page and you want to use the reference ID of the asset.

You can Query the ID of that record with SOQL and put it where you required.
Or
You can use <apex:commandLink /> in you vf Page.

Ex-

 <apex:dataTable value="{!Aseets_List}" var="as"  >
<apex:column headerValue="ID" >
<apex:commandLink value="{! as.id}" action="/{! as.id}" />
</apex:column>

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com