Created a trigger on FeedItem
where it creates a new record on a custom object called Internal Request
. I've mapped the Body
of the Chatter post to the Description__c
field in the Internal Request
custom object. It is mapping correctly, except that it adds <p>
before and after the body content of the chatter post into the Description__c
field on the newly inserted Internal Request
record.
Does anyone know why this is happening and how I can remove the <p>
?
for(FeedItem cg : lGroupFeed){
Ops_Priority_List__c i = new Ops_Priority_List__c(
OwnerId = mpostUserId.get(cg.Id),
Description__c = cg.Body + ' ' + URL.getSalesforceBaseURL().toExternalForm() + '/_ui/core/chatter/groups/GroupProfilePage?g=0F93B0000004VGm&fld=' +cg.Id,
Name = 'Questions from Chatter',
Status__c = 'New',
RecordTypeId = internalRequestQuestionRecordTypeId);
newIRtoInsert.add(i);
}