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

Update problem
Hello friends
I have a very urgent requirement. Plz help me with an idea....
Under a standard Account object i have a custom object called ABC.
I need to loop through all the custom objects(ABC) including the one i created now(if i am inserting a new record) and check
weather the field on custom object(ABC) called Provider is true.
if it is true then i need to update Status field on Account object with a value "XYZ".
My idea is, to execute a trigger on the save button of the custom object(ABC).
Plz friends suggest me a solution (how to check provider value in all custom objects) as this is a very immediate requirement............... Thank you
Hello did any one know the solution.... I would appriciate all the suggestions. plz reply with a solution.....Thanks
I tried the following way.
trigger xyz on ABC__C(after update) {
if(trigger.isupdate)
{
List<Account> acctList = new List<Account>();
for( ABC__C o: Trigger.new)
{
ABC__C[] a=[select Id,Provider__c from ABC__C where Accounting_id__c=:o.Accounting_id__c ];
for(ABC__C b:a)
{
if(b.Provider__c==true)
{
Account ac = [select Id from Account where Id= o.Accounting_id__c];
ac.Status__c='XYZ';
acctList.add(ac);
}
update acctList ;
}}
}
}
Message Edited by renu on 06-17-2008 04:31 PM
Message Edited by renu on 06-17-2008 05:38 PM