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
Dilyan DimitrovDilyan Dimitrov 

Get data from custom field in proper format


Hello,

There is the following custom field called Url__c of type Account and the data added to the field is mainly urls and websites.
The problem is that the field is rich text and the data entered in the field Url__c is not the proper format. What I mean by not a proper format is: <span style="color: #5f604b;"><span style="font: signacondcolumn-book;"><span style="font-size: 8.0pt;">https://www.merchant.com/store</span></span></span><br><a href'="www.account.com">Account</a>.
Could you please advise what can be done in order to be able to get the urls in the proper format. I'll only need to use the urls for instance www.merchant.com or www.account.com. I was wondering if I can use a parser but I can't find an appropriate one in Salesforce. Could you please advise if you came across to such problem and how it can be resolved?
Bezbozhnyi V.Bezbozhnyi V.
Hello Dilyan,
I think if you want use custom field URL__c to store only URLs and websites you should use appropriate custom field type.
 
User-added image
 
More information about custom field types you can find here: https://help.salesforce.com/apex/HTViewHelpDoc?id=custom_field_types.htm&language=en
Dilyan DimitrovDilyan Dimitrov
Hi,

I know it is better to use appropriate custom field type but the custom field URL__c field was not created by me and it is not possible to change the type either so could you please advise what can I do in order to find a solution to the problem described in my previous comment?

Regards,

Dilyan