You need to sign in to do that
Don't have an account?
Triggers to Fire Dependent Approval Processes
I have two triggers-the first populates an object "loan application" from an XML document stored in my organization. The second takes some of the values (Specifically Approver1, Approver2, Approver3, and Approver4) and sees if they are null or not. Based on this, the second trigger knows what approval process must be fired off-additionally, there is a special case in which an alternate protocol is followed should the loan application have "Johnny Good" stored in its name field. The first trigger works beautifully but the second is not starting any approval processes-I've double-checked to make sure the logic matches the Approval Process entry criteria; any ideas? Thanks!
trigger fillApprovers on Loan_Application__c (before insert, before update) {
trigger Approval_Process on Loan_Application__c (after insert, after update) {
Note: I received a warning about non HTML friendly text being removed, both triggers save; but the second does not work at run time (no errors though) so if you notice a typo I think it's b/c the forum removed it....
|
Code looks ok to me. However, I have trimmed the 2nd trigger code here, for better debugging/understanding.
Hope that helps.
Afzal
Good idea on extracting the logic; I'll update my code. Unfortunately I'm still having issues though, thanks for the help!