You need to sign in to do that
Don't have an account?
Mike Soudee
Before trigger to copy Case custom field to Account AccountId field
Hello,
I want to populate the Account.AccountId field with a value submitted by the web-to-case form. AccountId is not available to web-to-case, so I am trying to implement the solution proposed here: https://developer.salesforce.com/forums/?id=906F0000000g09HIAQ
What does a trigger to copy Case.customField into Account.accountId look like?
I want to populate the Account.AccountId field with a value submitted by the web-to-case form. AccountId is not available to web-to-case, so I am trying to implement the solution proposed here: https://developer.salesforce.com/forums/?id=906F0000000g09HIAQ
What does a trigger to copy Case.customField into Account.accountId look like?
Please refer the trigger format and let me know if you are facing any dificulty with it
rounak kumar sharma 2:55 PM
for(case cas:trigger.new) { account acc=[select id, ownerid from account where id=:cas.accountid ];
If(cas.origin =='EmailToCase') {
case cs = new case();
cs.id = cas.id;
cs.ownerId = acc.ownerId;
caselist.add(cs);
}
}
if(caselist.size()>0)
update caselist;
Please let me know if it helps
thanks