You need to sign in to do that
Don't have an account?
iSfdc
Trigger not working in bulk mode
Hi,
I am writing a simple trigger, to replace 3 blank lines with 1 in the Description field.This Trigger is working fine in the Browser but not through Data Loader.Any Pointers on this.
Code:
trigger deletelines on Case (before insert,before update) {
for(Case objCase:Trigger.new){
if(objCase.RecordtypeId=='012200000004ajC'){
objCase.Description=objCase.Description.replace('\r\n\r\n\r\n','\r\n');
}
}
}
for(Case objCase:Trigger.new){
if(objCase.RecordtypeId=='012200000004ajC'){
objCase.Description=objCase.Description.replace('\r\n\r\n\r\n','\r\n');
}
}
}
Gani
Have you tried putting in some Debug code to see whether the IF statement is being correctly evaluated, and whether there is a \r\n sequence in the string?
Hi,
You are right the API is not recognising \r. I tried only with \n its working fine using Data loader, but not through browser.
Thanks
Gani