You need to sign in to do that
Don't have an account?

String.difference
trigger TimestampFields on Survey__c (before update, before insert)
{
for (Survey__c c : Trigger.new)
{
Survey__c oldSurvey = Trigger.oldMap.get(c.ID);
if (c.Field1__c != oldSurvey.Field1__c) {
String new1 = c.Field1__c;
String old1 = oldSurvey.Field1__c;
String newStuff1 = old1.difference(new1);
Error: Compile Error: Method does not exist or incorrect signature: [String].difference(String)
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_string.htm
Hi,
The 'difference' method is part of Winter'13 Release. You might need to refresh your org to get the latest features.
WInter '13 Release Notes can be accessed at -
http://developer.force.com/releases/release/Winter13
All Answers
Hi,
The 'difference' method is part of Winter'13 Release. You might need to refresh your org to get the latest features.
WInter '13 Release Notes can be accessed at -
http://developer.force.com/releases/release/Winter13
And on that note, I thank salesforce.com for finally implementing over half of my Data utility class as standard functions.