0
The TS_MULTIUSERUSAGES table keeps track of record secondary owners. However, it's possible for this table to get out of sync if modification to a user field that is linked to secondary owner field is modified through an Appscript.

I don't want to add new rows to the TS_MULTIUSERUSAGES table in my Appscript directly. Is there another way to trigger SBM to add or delete rows in that table?

Accepted Answer

Monday, April 08 2019, 12:31 PM - #Permalink
0
ModScripts use the Update transition, where appscripts do not. switch to using modscripts instead.
The reply is currently minimized Show
Responses (2)
  • Accepted Answer

    Tuesday, April 09 2019, 12:05 AM - #Permalink
    0
    Acknowledging that it's a different context, in my limited testing, I can confirm that updating a Multi-relational field using ModScript will create the proper record(s) in TS_USAGES.
    Like
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 18 2019, 11:47 AM - #Permalink
    0
    When updating Multi-Valued fields via scripting objects, update the delimited version of the field on the primary or aux record only - do not manipulate the TS_USAGES or TS_MULTIUSERUSAGES tables directly. The product will keep the usages tables updated accordingly. I personally have not seen sync issues with this approach (there is very likely to be issues if modifying the usages tables directly).

    As a general rule, I do not recommend directly updating the secondary owner field via scripting unless you must. The content of the secondary owner field should be driven by a separate user/multiuser/multigroup field ideally so that updates made by the script are not lost when the product has reason to recalculate the field (such as on other transitions). I have seen scenarios where you may need to update both the driving user field and the secondary owner field when making updates via scripting objects. But if using a transition mechanism, you should be able to just set the driving user field.
    Like
    The reply is currently minimized Show
Your Reply

Recent Tweets