How to create a link on a field in a table component

HI community, I have a text field (Asset_id__c) which generates a unique string when a record is created. I have a table which shows the Asset_id__c text field on it. Now this just a custom field and doesn’t act a link to navigate to the detail view of the record. Is there any way to show it as a link and navigate to the detail view of the record when clicking on the link. thank you

Avinash,
Have you tried a template field in it’s place with the {{ }}?

Double “{{  }}” - subject to Field Rendering Code. Will display as a link

Triple   “{{{ }}}” - Not subjected to Field Rendering Code. Just shows the data (no link)

– Tom Scalzo

I tried it. But it is not working The unique code field is not working as a link

Building on Tom’s suggestion, if the field’s metadata wouldn’t normally result in a link to your desired page (which may be what’s getting in your way here), you would need to wrap the triple brackets in an HTML tag, like this:

{{{Asset_id__c}}}

You’ll want to make sure you check the box in the template’s properties to “Allow HTML” too.

-Mark DeSimone

Hi Mark,

It din’t work. I used the following tag

when i preview the page the whole column is not populating any values.


Can you tell me where am i going wrong?

thank you

Avinash,

Question: Is there a Skuid page called Asset_Detail (exact spelling)?

The id is missing from the syntax. Here is the formula (assuming you’re passing the ‘id’ parameter in this example)

{{{name you want displayed}}}

Does this help?

--Tom

Yes. There is a skuid page called Asset_Detail and that is the detail page i wanted to redirect from this field. Correct me if i am wrong. {{{[local Id field name]}}} → here within these brackets i am going to have the field API Name which is Asset_Id__c. and in this area {{{name you want displayed}}} i will populate the Label of that field. On the whole my href tag looks like this. {{{Asset id}}} is this correct?

Correct, however the displayed name should also point to a field.
Here’s an example of passing Account Details to a page.

{{{Account_vod__r.Name}}}

I used this HTMl. {{{Asset_id__c.Asset Id}}} Nothing worked. I want to mention a point here. The string populated on this field is generated by trigger behind it. Is that causing any issue?

Hmm, that is a possibility.  The Template is taking the current value of field and passing it as an argument.  If the trigger is changing this value when the Detail page is rendered, then it is possible.
Here’s some things we can check:
1) What is the URL results when clicking the displayed link?
2) If you inspect the model  (inspect page, console, skuid.model.map()), look at the data, what is an example value that you are seeing for this field?

Once you have this value, are you able to insert this into the URL to see that the value is actually a detail record?
Example: if your SF URL Prefix is na99, and the field value is ‘000999888’ you would go to:
https://na99.visual.force.com/000999888?nooverride=1

There is only one string generated on a record and it will not change. So the trigger i have before insert trigger. I exactly did not understand what do you meant by displayed link. Can you explain me about it?

Avinash, as has already been mentioned above, you will need to use a template an
[URL\_to\_link\_to\>{{](<i)_ Field_you_want_the_link_display_name_to_be _ }} type structure.

**URL_to_link_to: ** Dependent on whether you have set up a visualforce page to redirect to your detail page or not this will change what you write here. If you have set up the visualforce redirect, all you will need to place here is /{{{Id field of your record}}}. If you have not setup the redirect, then you will need something like Tom wrote above: /apex/skuid__UI?page=[name of page]&id={{{Id field of your record}}}

_ **Field_you_want_the_link_display_name_to_be: ** _This will be a field you have in your model, or simply text, that you would like the link to show up as.

For example: When we generate quotes from our opportunity pages we use this. We have a Skuid page called Quotes_View (that we needed because Salesforce used to not have their own Quote View that you could redirect). We had this template running on a table for our Quote model:

{{{Name}}}

It redirects us to the Quote View page of the quote we selected but the link shows up in the table as the name of the quote.

Working. Thank you so much guys!!!

Great :slight_smile: