Undocumented behavior of Expressions across Charts, APIs and

Posted by cohezive on 07-Mar-2015 23:53

I have an expression that counts days in a status.   According to the documentation, expression values are only updated when the object is updated. 

When generating a Chart based on this expression, the Day Count is correct in its calculation - however, no updates occurred on these records until their status changed..

When I create a batch job to update (increment) a field, an API update does not trigger an Expression value update.

When I update the object via the UI, the Expression value is re-calculated.

For a work-around, I can move the expression code to the batch job and use an integer value for the job update.

But, the update process appears to differentiate between UI vs. API with respect to Expression Value.  

And Charts, those appear to calculate expressions on each request,  

Does the same API limitation on Expression Values updates apply to REST and JAVA calls too?.

Posted by Orchid Corpin on 18-May-2015 10:32
Defect has been fixed and will be available for 4.0.0.0 release. Regards, Orchid

All Replies

Posted by cohezive on 08-Mar-2015 00:25

Oh - and for that work-around, do not use a LOOP (with or without a view) because they won't be fixed until 3.2.0.0.  A Select Query to retrieve a View is needed to perform the updates.

Posted by pvorobie on 09-Mar-2015 11:42

Are you using updateRecord() API?

Posted by cohezive on 09-Mar-2015 11:54

Actually, that didn't work.    I have had to use setField().

The object in question also has  a trigger-based combined field validation on before create and before update.  When I used update_record, it returned an error indicating that a conflict occurred.  Apparently Rollbase is responding like createRecord() was called when updateRecord() is run from a batch.   Call that another "undocumented feature."

Also, from the way batch works, it only iterates through all records.  So I cannot filter the batch to only those records that need an update.   Loop wouldn't even work anyway due to this.

Posted by pvorobie on 09-Mar-2015 12:02

So you use rbv_api.setField() in Batch job, and that did not update Expression field?

That sounds like a bug.

Posted by cohezive on 09-Mar-2015 13:17

No, it did not.  I had to remove the Expression field from the object and manually update a new field with the same formula.

Posted by pvorobie on 09-Mar-2015 15:28

Tracking issue as PSC00328582

Posted by Orchid Corpin on 10-Mar-2015 09:14

Thanks [mention:05b5f00eae4a468d844fa8bedcafd110:e9ed411860ed4f2ba0265705b8793d05] for filing the defect.

Regards,

Orchid

Posted by Orchid Corpin on 18-May-2015 10:32
Defect has been fixed and will be available for 4.0.0.0 release. Regards, Orchid
This thread is closed