You need to sign in to do that
Don't have an account?
Philip Mempin
Try and Catch exception
Hi,
I am trying to create a trigger to update fields into opportunity object from Recurring Donation object only if the Recurring Donation record exist otherwise it will not take any action. I am new to Apex coding and I saw the "try" and "catch" exception. How can I incorporate these coding for SOQL like "Select ID from npe03_recurring_donation__c where name = 'as defined'".
Thanks for your help.
Philip
I am trying to create a trigger to update fields into opportunity object from Recurring Donation object only if the Recurring Donation record exist otherwise it will not take any action. I am new to Apex coding and I saw the "try" and "catch" exception. How can I incorporate these coding for SOQL like "Select ID from npe03_recurring_donation__c where name = 'as defined'".
Thanks for your help.
Philip
Could you refere below code and update ur code with ur objects and fields(use relationship field carefully)
All Answers
can you provide me what relationship exist between opportunity and Recurring Donation objects.
Thanks for your reply.
Recurring Donation can have one or more Opportunity records. There are fields in Recurring Donation object I need to fetch into the Opportunity record before update/insert of Opportunity object. But I need to do fetch it only on certain criteria like if Recurring Donation name is a certain value and do not do any action if the value of the Recurring Donation field name does not exit.
Thanks,
Philip
Could you refere below code and update ur code with ur objects and fields(use relationship field carefully)
I got it. Again many thanks for your assistance and I can proceed now in creating this trigger.
Philip