+ Start a Discussion
Dave ScottDave Scott 

Help with editing trigger on Round Robin Record Assignment app

Hi folks, hope you can help.

I'm trying to edit a trigger on the case object that forms part of the Round Robin Record Assignment app from the Appexchange however I'm having issues with it and could do with some help.

In the comments listed here: https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000178fsEAA&revId=a0S30000000fPTLEA2&tab=r (https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000178fsEAA&revId=a0S30000000fPTLEA2&tab=r) it provides instructions on how to edit the trigger to prevent having to change the record owner twice when having to manually reassign a record to another user.

When editing the trigger in Sandbox I get the following error and I don't know why:
Error: Compile Error: line 87:44 no viable alternative at character '”' at line 87 column 44
Please can you help me understand what I'm doing wrong.

The only thing I'm changing in the trigger is:
Trigger.new[i].TempOwnerId__c = ag.User__c;
and changing it to:
Trigger.new[i].TempOwnerId__c = ”;

Really hope you can help folks, thanks for your help in advance.

Many thanks,
Dave
Best Answer chosen by Dave Scott
James LoghryJames Loghry
You just have the wrong characters in your code is all.  Sounds like maybe your operating system tried changing the single ticks to the incorrect characters.  Try copying and pasting this again, otherwise use the single quote on your keyboard to replace them.
 
Trigger.new[i].TempOwnerId__c = '';

(Note how in my example the characters are pretty much straight up and down, and yours look more like quotation marks)

All Answers

James LoghryJames Loghry
You just have the wrong characters in your code is all.  Sounds like maybe your operating system tried changing the single ticks to the incorrect characters.  Try copying and pasting this again, otherwise use the single quote on your keyboard to replace them.
 
Trigger.new[i].TempOwnerId__c = '';

(Note how in my example the characters are pretty much straight up and down, and yours look more like quotation marks)
This was selected as the best answer
Dave ScottDave Scott
Thanks for this James, I've just tried this and it's allowed me to save without errors!

I knew it'd be something simple.

I'll go ahead and now attempt to deploy to production.

Thanks once again,
Dave
varun_vatsavarun_vatsa
First thing : have you copied these quotes from some other app and are trying to paste it here? 
Secondly: you may simply assign a null value, that's how we assign nothing to a refrence field, '' are considered string!