You need to sign in to do that
Don't have an account?
Can URL-typed field have more than one url?
I am developing this in SFDC.
I have a custom field whose type is URL.
I noticed that if I do the following, I can set the url of the case record.
myCase.customField = 'xxx.salesforce.com/recordid_of_othercase/d'
I would like to create 5 links of 5 different recordids in this custom field instead of having just one link for one recordid.
Q1. Can I do this in one custom field in some way or should I create 5 custom fields and fill each field with recordid?
Q2. I heard that I can change the way the url looks, having caseNumber field instead of a long url. What is the exact format of the code for this?
Thank you.
I have a custom field whose type is URL.
I noticed that if I do the following, I can set the url of the case record.
myCase.customField = 'xxx.salesforce.com/recordid_of_othercase/d'
I would like to create 5 links of 5 different recordids in this custom field instead of having just one link for one recordid.
Q1. Can I do this in one custom field in some way or should I create 5 custom fields and fill each field with recordid?
Q2. I heard that I can change the way the url looks, having caseNumber field instead of a long url. What is the exact format of the code for this?
Thank you.
All_Associated_Cases_URL__c is not URL data type anymore. It's Long Text data type with about 5 to 6 lines visiable to see.
in addition, whichever field you are storing Ids or links etc. would need to be a long text data type field because that's the only one which allows you to go above that 255 ch limit.
Above code will make all the associated cases URLs to line up one after another since it contains += and '\n' functions.
the image I have posted in above post is the final output you would receive.
You are going to have to use the whole URL and you can not just use the Case Numbers alone.
Lets say you are able to line up all the case numbers one by one in that Long Text field, how would they have link behind them. This happens only in reporting. Our Full URL field is a link itself which open up a child case in new window once you click it.
hope it helps!
All Answers
Hi Felix,
Please find my comments here
Q1. You can have any number of URL in one URL custom Filed ( Max Length is 255 )
Q2 . How you wanted to store the value and retrieve it again is the key consideration. lets suppose you store the complete URL in first and from second you can store only case number ( write custom logic to do it )
Thanks ,
Raj
I see what you are asking. Yes, it is possible with the Apex Trigger. I have thought about it via Process Builder but it is not possible in my opinion.
This is the behavior or output would the following trigger provides,
Object: Case
Fields: All_Associated_Cases_URL__c
Trigger Code:
Hope this helps and if it solves the query then please mark it as BEST ANSWER since it will help other users in community as well!
Thank You Sir!
Btw the code EveryParentCase.All_Associated_Cases_URL__c += 'https://na40.salesforce.com/' + str + '\n';
doesn't look like it works because they concatenate strings in one line instead of having several lines.\
Could you look into this?
URL fields can't display arbitrary text link an HTML <a> tag can. But you could do this with a formula field that uses the HYPERLINK function. If you put the case ids and case numbers into separate (hidden) text fields, you could create a single formula field that displays five different HYPERLINKs, each one using a different case number and URL. See this reference: https://help.salesforce.com/articleView?id=customize_functions_a_h.htm&language=en_US&type=0 and search for "HYPERLINK".
All_Associated_Cases_URL__c is not URL data type anymore. It's Long Text data type with about 5 to 6 lines visiable to see.
in addition, whichever field you are storing Ids or links etc. would need to be a long text data type field because that's the only one which allows you to go above that 255 ch limit.
Above code will make all the associated cases URLs to line up one after another since it contains += and '\n' functions.
the image I have posted in above post is the final output you would receive.
You are going to have to use the whole URL and you can not just use the Case Numbers alone.
Lets say you are able to line up all the case numbers one by one in that Long Text field, how would they have link behind them. This happens only in reporting. Our Full URL field is a link itself which open up a child case in new window once you click it.
hope it helps!
I want to have 2 or more url's in a single field. Can this be possible with in fields or do I need to do something else?
Thanks Sindhu