You need to sign in to do that
Don't have an account?
Naofumi Kun
Creating a Catch for the error: External entry point
There is validation that I made but not using a Validation Rule.
Entries with the same Product Name within its Parent Object will be prevented. So for example, a user cannot input 2 ProductA within the Company.
I created this by creating a UNIQUE text field, and have a WF populate this using the LookupID+ProductName.
I already have an existing catch for custom validations, any ideas on how would I insert a catch for this?
Entries with the same Product Name within its Parent Object will be prevented. So for example, a user cannot input 2 ProductA within the Company.
I created this by creating a UNIQUE text field, and have a WF populate this using the LookupID+ProductName.
I already have an existing catch for custom validations, any ideas on how would I insert a catch for this?
public void Product(){ try { upsert revenueSchedules; } catch(System.DmlException e) { String S1 = e.getMessage(); S1 = S1.substringBetween('FIELD_CUSTOM_VALIDATION_EXCEPTION, ' , ': ['); ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR,S1 )); } }