Is it possible to pass a parameter to GlobalCounter?

I’m trying to achieve “GlobalCounterPerAccountPerModule” functionality.

Following the examples here:

https://docs.suitecrm.com/user/advanced-modules/workflow-calculated-fields/#_globalcounterpermodule

I’m assigning the related account id to a relation parameter. If I leave it as per the examples, it works as a per module global counter.

If I replace “myName” with {R0} it returns, for example “ANI{GlobalCounterPerModule({R0}; 4)}”…

…it returns “ANI{GlobalCounterPerModule({R0}; 4)}”

When I manually change “myName” in the formula to the GUID of an account,

{R1}{GlobalCounterPerModule(1b7f29e7-c156-085e-86fb-6033fb42a78c; 4)},

I can see it tracking the counter in config_override.php:

<?php
/***CONFIGURATOR***/
$sugar_config['disable_persistent_connections'] = false;
$sugar_config['aos']['lineItems']['enableGroups'] = false;
$sugar_config['SweeterCalc']['GlobalCounterPerModule']['custm_submission']['myName'] = 1;
$sugar_config['SweeterCalc']['GlobalCounterPerModule']['custm_submission']['bob'] = 4;
$sugar_config['SweeterCalc']['GlobalCounterPerModule']['custm_submission']['fred'] = 1;
$sugar_config['SweeterCalc']['GlobalCounterPerModule']['custm_submission']['1b7f29e7-c156-085e-86fb-6033fb42a78c'] = 2;
/***CONFIGURATOR***/

This would achieve the functionality I’m looking for but I think the clues in the name:

Can anyone confirm if it’s possible or not to pass in a parameter?

pretty interesting.

did you find it out?

@crmspace do you know about this?

1 Like

No, afraid not. It would still be very useful to me if anyone knows how it can be done.

1 Like