function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TheRealMarchandojTheRealMarchandoj 

How to update fields with calculations derived from a class

Hi
I've a scenario where, we have a class which calculates summary totals on the Order object based on values stored in an invoice object.
The invoice object only has a lookup relationship to Orders.
The  calculations derived from the apex class are then displayed on the Order, in a visualforce page
Note: no fields are being updated on the Order record during this time.

My problem is, that  I have been asked to display the same summary total information, in the edit page of each invoice.
What is the easiest way of achieving this?
Also, I am not a coder. I can read code and make small tweaks to code so need to be able to copy and paste ideally.
I am very proficient in visualwork flow, and am thinking this may be an option but have a very tight deadline to complete this work so do not want too complicated.

Thanks in advance,

Jane
Best Answer chosen by TheRealMarchandoj
Andy BoettcherAndy Boettcher
Jane,

There are two ways that you can approach this:

1) Try to reproduce the calculations that the Apex code is doing either in Flow or Process Builder, then save those calcuations in a field on the Order or Invoice object.

2) Find an Apex developer that will be able to retool/redevelop the code you currently have to save those fields on one of the objects.

All Answers

Andy BoettcherAndy Boettcher
Jane,

There are two ways that you can approach this:

1) Try to reproduce the calculations that the Apex code is doing either in Flow or Process Builder, then save those calcuations in a field on the Order or Invoice object.

2) Find an Apex developer that will be able to retool/redevelop the code you currently have to save those fields on one of the objects.
This was selected as the best answer
TheRealMarchandojTheRealMarchandoj
Thanks Andy - I recreated calc of this field using visual workflow