Run a Field Update Using a Custom Button - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Luis MurilloLuis Murillo 

Run a Field Update Using a Custom Button



Background:
Our organization has recently set up RougeIT Chargent Billing app to use as our order processing and payment gateway.  We have created Two custom Objects:
  1. Orders (Parent)
  2. Transactions (child)

New orders can be created from the opportunity object. 

When a new order is created, data are mapped from the account and opportunity object to the order object by Chargent®.  

The order object has a managed field called, charge amount which sums data from 2 opportunity fields, (A, B).  We currently have a workflow rule and field update  to calculate the 'charge amount'. 

The Problem:
When a new order is created, the 'charge amount' field is not updated upon the first 'save'.  To have the field update, the user has to do the following:

1.Create new order
2.Click save
3.Click edit
4.Click save again

Objective:
I'm trying to create a custom button called "Calculate Total" which will calculate the 'charge amount', which is not dependent of weather or not the user clicks 'save'.

Note: Chargent® is a managed package which only allows very limited customization to its fields