You need to sign in to do that
Don't have an account?
jjjjjjjjjjjjjjj
Creating workflow rule involving two objects
Hi ,
I am trying to create a workflow rule where when i change the status of a task , the status field of the custom object (which i have created ) should automatically change . But I cannot do a field update for the custom object as the Object name is hardcoded (Task) .Any pointers to this ????.
Hi,
You may create Apex Trigger (After update trigger on Task) here. Once Task status is updated, after update trigger will fire.
Then in that trigger you can update status in custom object as you mentioned.
Hope this will help you.
Hi ,
Thanks a lot . I am very new to salesforce, java and apex .This is the code I wrote for the trigger , where LLL is the new custom object created by me.
but the compilation error does not recognize the custom object.
The error i get is Compile Error: Invalid type: LLL at line 8 column 4
Here is the code :
trigger TaskCompleted on Task (after update )
{
if (Trigger.new.Status.equals('Completed') )
{
sObject s = new LLL();
LLL f = (LLL)s;
f.status = 'Completed' ;
}
}
So, your code should read something like this:
LLL_c f = new LLL__c();