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
Abhirams470Abhirams470 

need help in trim the string

Lead comments field:  hakke&trade, polylab&trade
actually fron end sending hakke with trade mark(TM) symbol, the value is diplaying in salesforce field value as hakke&trade

i want remove the &trade after the hakke and the value should be display as "hakke".

please help me out solve the problem

thanks for your help in advance.

Chandra PrakashChandra Prakash
Hi Abhirams,
Please save your sting  below format
hikke™
User-added image

Regards,
Chandra Prakash Sharma
Bisp Solutions Inc.
http://bisptrainings.com
Chandra PrakashChandra Prakash
Hello ,

if you want to remove &trade value please use below function.
<script>
function myFunction()
{
var str = "hakke&trade";
var res = str.slice(0,5);
document.getElementById("demo").innerHTML=res; // this is lable name you can change it id ...
}
</script>
User-added image



Regards,
Chandra Prakash Sharma
Bisp Solutions Inc.
Abhirams470Abhirams470
Hi Chandra,

am not using any java script functionality, it is standard page.

have the apex class custom field  lead_mark__c, the product is displaying like HAAKE&trade;
is it possible to using collection to change all records &trade for that field?

Thanks