At the moment I have different deploy records for each sub that uses the scripts but each deployment record points to the same script. There's one script param on each deployment that loads a different config record that's sub specific.
b
battk
08/09/2021, 3:38 AM
If this was a user event script, i would consolidate all the scripts into one script if they are all using the same code
battk
08/09/2021, 3:38 AM
hardcode which configuration record in the code
battk
08/09/2021, 3:40 AM
or put which configuration record to load on the subsidiary record (or even put the configuration on the subsidiary record)
battk
08/09/2021, 3:41 AM
There is a cost to starting up a user event script, you dont want to pay it multiple times for the same code
c
Craig
08/09/2021, 1:55 PM
@battk they're map/reduce scripts
Craig
08/09/2021, 1:55 PM
They deal with either importing transactions from a third-party or sending trans to a third-party based on the contents of various saved searches
Craig
08/09/2021, 1:57 PM
It's a WMS integration - the idea is that each subsidiary wants to send and receive various transactions. I designed it to have a config record ID param on the deployment record so subs could go go live without editing the code. Also, having a execution log for each sub is helpful
Craig
08/09/2021, 1:58 PM
I just wanted to avoid lots of conditionals checking if various features are enabled or not in the config record, I don't think this is avoidable though.