You need to sign in to do that
Don't have an account?
Getting an error and not sure why?
Hi All,
I am getting an error and I cant see what in the APEX Trigger is cauing the error in the vlaidation rule.
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger Contact_Opportunity_Synch caused an unexpected exception, contact your administrator: Contact_Opportunity_Synch: execution of AfterUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id 0067000000NfCxeAAF; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Number of Contacts Purchased, NetProspex Product, Seats Purchased & Industry are required for any stage greater or equal to Proposal. THIS REPLACES THE CLOSED WON WIZARD!: []: Trigger.Contact_Opportunity_Synch: line 43, column1
here is the validation rule:
|
Number of Contacts Purchased, NetProspex Product, Seats Purchased & Industry are required for any stage greater or equal to Proposal..........................................Make sure you give all these fields in the for loop and update them too or give a stage lesser than "Proposal"
for(Opportunity o : [Select id, primary_contact__c,Primary_Contact_Title__c,Primary_Contact_Email__c,Primary_Contact_Phone__c,Primary_Mailing_City__c,Primary_Mailing_Country__c,Primary_Mailing_State__c,Primary_Mailing_Street__c,Primary_Mailing_Zip__c from Opportunity where primary_contact__c in :ContactMap.keySet() and isClosed = false]) {
All Answers
Number of Contacts Purchased, NetProspex Product, Seats Purchased & Industry are required for any stage greater or equal to Proposal..........................................Make sure you give all these fields in the for loop and update them too or give a stage lesser than "Proposal"
for(Opportunity o : [Select id, primary_contact__c,Primary_Contact_Title__c,Primary_Contact_Email__c,Primary_Contact_Phone__c,Primary_Mailing_City__c,Primary_Mailing_Country__c,Primary_Mailing_State__c,Primary_Mailing_Street__c,Primary_Mailing_Zip__c from Opportunity where primary_contact__c in :ContactMap.keySet() and isClosed = false]) {
Thanks for the info. I'm now looking thinking I might just kill that legacey APEX trigger. I can get the smae info it was getting with out of the box functionaility.
Thanks again!