You need to sign in to do that
Don't have an account?

Process builder vs Apex for this functionality
Hi All ,
I am hoping you can help me.
Requirements;
Once the Obligiations is complete, the ‘Complete Obligiation’ button should be clicked by the User and the following should happen:
I am hoping you can help me.
Requirements;
Once the Obligiations is complete, the ‘Complete Obligiation’ button should be clicked by the User and the following should happen:
- The "Obligation Next Due" field should never fall on a weekend or any date which is referenced in the "business hours"
- The "Obligation Next Due" field should calculate the next "date value" based on the Frequency and
Deadline Date - Update the ‘Obligation Last Completed on" with the data of the button execution.
Object Name Client_Obligations
API Name Client_Obligations__c
field: frequency
api : Frequency__c
data type : picklist
value : Monthly_BD
Business hours name : Client Obligations
id : https://emea.salesforce.com/01m200000000VjK
Expected out come :
frequency : Monthly_BD
Deadline Date 9/16/2016 (12th business day of september)
User pushes the button "Complete Obligiation’ the "Obligation Next Due" should be "10/17/2016" (12th business day of october)
Really appreciate your help and advice
As I unerstand, you will need Apex to complete this requirement. Since this activity is needed on click on Button, you will have to compelte this by creating a custom button which calls the Apex controller to implement the requirement.
Let me know if this helps to proceed ahead .
Thanks.
How comfortable are you with Apex?
Check out the below mentioned link for creating Custom button and calling apex controller.
https://developer.salesforce.com/docs/atlas.en-us.workbook.meta/workbook/button_1.htm
Thanks.
Are you at all familiar with Visual Workflow? Visual Workflow can be fired from Process Builder, handle complex logic, lookup other records, use formulas, and many other things, and I believe the scenario that you're trying to accomplish. It can also be launched from a custom button.
Here's some good resources about Visual Workflow that may help you:
https://developer.salesforce.com/docs/atlas.en-us.workbook_flow.meta/workbook_flow/
https://developer.salesforce.com/docs/atlas.en-us.salesforce_vpm_guide.meta/salesforce_vpm_guide/
Regards,
Parker