You need to sign in to do that
Don't have an account?
Marco Pollastri 1
Trigger trying to get Account information
Hi, this is the trigger I have developed, I need to get accounts information, I need to reach a field called Type on the accont.
trigger Error_Opp on Opportunity (before insert) {
for( Opportunity oppsupplier: trigger.new ){
if(oppsupplier.Opp_Count__c == 1 && oppsupplier.type == 'Supplier')
{
oppsupplier.addError('This is a Supplier Account, it can have only one Opportunity.');
}
}
}
Thanks
trigger Error_Opp on Opportunity (before insert) {
for( Opportunity oppsupplier: trigger.new ){
if(oppsupplier.Opp_Count__c == 1 && oppsupplier.type == 'Supplier')
{
oppsupplier.addError('This is a Supplier Account, it can have only one Opportunity.');
}
}
}
Thanks
Please find the Working code.
Please Mark it As Best Answer If the solution helps you.
Thanks,
Vijay Nagella,
Solution Architect,
Steadfast Consultancy Services
All Answers
You can take reference from this below code.
In case you find any other issue please mention.
If you find your Solution then mark this as the best answer.
Please find the Working code.
Please Mark it As Best Answer If the solution helps you.
Thanks,
Vijay Nagella,
Solution Architect,
Steadfast Consultancy Services