You need to sign in to do that
Don't have an account?
Rich text area filed - null check
Hi.
I am updating a rich text area field from an Apex class. I would like to have the field to be appended with some value every time the class is called .
I am using rich_txt_field__c+= rich_text_field__c + some content. since the first time there will not be any value I am getting null + some value. though I used if(rich_text_field__c !=null), that seems not working. I dont want to get null value on the first time update.
Any views on this?
I am updating a rich text area field from an Apex class. I would like to have the field to be appended with some value every time the class is called .
I am using rich_txt_field__c+= rich_text_field__c + some content. since the first time there will not be any value I am getting null + some value. though I used if(rich_text_field__c !=null), that seems not working. I dont want to get null value on the first time update.
Any views on this?
I have used replaceAll method to get rid of the issue,
like
rich_text__c += rich_text__c + value;
rich_text__c = rich_text__c.replaceAll('null','');
All Answers
Please try this Let me know if you still face issue.
Thanks,
Gaurav
Skype: gaurav62990
I have used replaceAll method to get rid of the issue,
like
rich_text__c += rich_text__c + value;
rich_text__c = rich_text__c.replaceAll('null','');
Thanks,
Gaurav
Thanks.