You need to sign in to do that
Don't have an account?
P.J Maman
apex trigger error on opportunity.
I stepped into an ORG which had an trigger done on Opportunity, now producing the attached error. Here is the Trigger.
------------------------
1
2
3
4
5
6
7
8
9
trigger OpportunityUpdate on Opportunity(after insert)
{
list<opportunity> lstOpp = [Select id,account.type,Client_Type__c from opportunity];
for (opportunity o : lstOpp)
{
o.Client_Type__c = o.account.type;
}
update lstOpp;
}------------------------------
------------------------
1
2
3
4
5
6
7
8
9
trigger OpportunityUpdate on Opportunity(after insert)
{
list<opportunity> lstOpp = [Select id,account.type,Client_Type__c from opportunity];
for (opportunity o : lstOpp)
{
o.Client_Type__c = o.account.type;
}
update lstOpp;
}------------------------------
It looks like you have fields called Opportunity_Approved_Date__c on opportunty which is mandatory hence you are getting the error called required field missing, to resolve this please try adding values in this field.
Thanks,
Amol, www.cloudwaale.com
I did do away with the field that created the issue prior to posting this issue. I wanted to make sure the trigger was valid.