Capture Previous values using Formula URL button & Pipeline
I am looking for a solution that can assign value on click of a button and then saves the record, so that the pipeline can capture the previous values a record.
I have different formula URL buttons that updates stage (submitted, rejected, approved) and this change is captured in Audit table through pipeline.
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&apptoken=XYZ"
& "&rid=" & [Record ID#]
& "&_fid_49=Approved" //Stage = Approved
& "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#] & "&dfid=2&z=" & Rurl())
I also need to capture the current and previous values of fields that were modified when Approved. The above formula did not work because QB saves the record first, then applies the field changes. This means that by the time a pipeline is triggered, the "previous values" are already overwritten.
As an alternative, I excluded fid_49 assignment in the formula, which worked as standard save and updated pipeline to trigger when any of field in the form is modified. This carries the previous values to capture the audit. The problem with this approach is that the pipeline runs every time a record with fields defined in the pipeline is modified and saved either through grid edit or using standard save button.
Please let me know if there is any other solution that I can try.