You need to sign in to do that
Don't have an account?
Nitin Kunal
trigger
trigger on opportunity to delete product record of opportunity in salesforce
Please tell me how to do this
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
trigger on opportunity to delete product record of opportunity in salesforce
Please tell me how to do this
Hi
Below is simplest trigger I can think of for this:-
Let me know if you have any specific question about this.
Happy to help you!
HI u can try some thing like this...
trigger Deleteopp on Opportunity (after update)
{
set<id> ids=new set<id>();
for(Opportunity opp:trigger.old)
{
ids.add(opp.id);
}
list<OpportunityLineItem > deleteproduct1 =new list<OpportunityLineItem >();
for(OpportunityLineItem getproductid: [select id from OpportunityLineItem where Opportunityid=:ids])
{
OpportunityLineItem ooo =new OpportunityLineItem(id=getproductid.id);
deleteproduct1.add(ooo);
}
delete deleteproduct1;
}
Thanks,
jaba