refreshCalcFields necessary to pass test

#1

I have a metric that relies on the following two fields:

@db(timedValueHistoryField=‘actualItemsReceivedHistory’)
actualItemsReceived: ExactDimensionTimedValue

actualItemsReceivedHistory: [PurchaseOrderActualItemsReceivedHistory] (parent)

(actualReceivedHistory is type that mixes TimedValueHistory with the value field set to be ExactDimension)

When running my test in console, actualItemsReceived will remain blank after setting up all of the objects. No matter how long I wait, it will remain blank. It is not until I run refreshCalcFields that it will populate.

Why is this happening?

0 Likes

#2

Async processing might have been disabled. You can check
[was: TenantConfig (id =‘AsyncProcessingDisabled’)]

TenantConfig.fetch({filter:Filter.eq('id', 'AsyncProcessingDisabled')}).objs[0].value

to see it is disabled.

1 Like

#3

What would be the command to enable it?

0 Likes

#4

TenantConfig.upsert({id:‘AsyncProcessingDisabled’, value:‘false’})

0 Likes