You need to sign in to do that
Don't have an account?
How to remove the string from the rich text box?
Hi,
Field name called - To be scheduled. At present im using a rich text box to enter the list of class names
Field name called - scheduled classes. Here im using a normal text box to enter one of the value from (To be scheduled)
Both fields are in same object and,
Once i saved a record the selected value in scheduled classes will remove from the richtext box(To be scheduled)
Example:
To be scheduled contains
Value 1
value 2
value 3
Scheduled class contains
value 2
Once saved the record "value 2" should be remove from the To be scheduled field
So it looks like
To be scheduled contains
Value 1
Value 3
Thanks
Any help will be appreciated greatly
Hi,
You have to write a trigger to achieve this. Try the below code as reference(This trigger is on contact object made changes accordingly):
trigger RemoveFromRichText on Contact (before insert)
{
string st=trigger.new[0].To_be_scheduled__c;
string st1=trigger.new[0].scheduled_classes__c;
string new1=st.replace(st1,'');
trigger.new[0].To_be_scheduled__c=new1;
}