Trigger to update Base Currency field values

Posted by Rollbase User on 30-Aug-2013 10:02

Is there a trigger to update Base Currency field values when/after a record is updated? Currently it only happens you hit save on an Edit page, but not when you edit currency values in list view or they are Expression Currency fields. I suspect that when currency field data is mapped to an object, that would also need a trigger running to update bas currency values also. I can see how it should be possible with some server-side JavaScript but that seems overly complicated compared to everything else.

All Replies

Posted by Admin on 30-Aug-2013 14:44

Hello Surferking,



to achieve your goal of a Trigger to update at least one Field Value whenever a record is updated, manipulating a 'Trigger's Trigger Timing' is important. More specifically, the 'AfterUpdate' option of the 'Trigger Timing' listens for any change, while the 'On Field Change' selection will run the 'Trigger Condition Formula' once a certain field is changed. Refer to Page 253, "Chapter 10: Workflow and Triggers", of our official documentation Rollbase in Action.



Of the different triggers, the most useful which come to mind are the types 'Object Script', in which Javascript would be utilized to manipulate fields and objects, and the 'Update Field Value' type, which could update a field of a record or it's related records.



I hope I'm not misunderstanding your question. Could you be asking of how a field acting as an accumulator for another field become updated via record view, whenever the dependent field is updates

Posted by Admin on 02-Sep-2013 02:22

Hi Corey,



Yes, you understand correctly, I can see it would need to be done with some server-side JavaScript and that would be the correct approach for the current functionality available.



I was hoping, that because it is a slight inadequacy in the working of the Base Currency field type, that there might be a trigger functionality to solve this problem, and if there isn't, if it could be added as an improvement request.



Thanks!

This thread is closed