UserState Parameter in the Api.Data.Calculate

Kai
New Contributor III

May I have an example of using UserState Parameter in the Api.Data.Calculate? Thank you

 

1 ACCEPTED SOLUTION

RobbSalzmann
Valued Contributor

Hi  Kai,

you may have noted this is an optional parameter, so you can leave it out.

Instantiating a XFUserState object involves this API:
Dim objXFUserState As XFUserState = BRApi.State.GetUserState(si, isSystemLevel, clientModuleType, relatedObjectType, relatedObjectName, key1, key2)

XFUserState appears to be related to the user's session state and activitiy.  It seems pretty useless in the context of writing business rules in a business setting.

@MMomentoff #Abstraction.  The exposed method signature for Api.Data.Calculate could be wrapped within a method whose signature only requires arguments a business user can reasonably supply.

 

View solution in original post

1 REPLY 1

RobbSalzmann
Valued Contributor

Hi  Kai,

you may have noted this is an optional parameter, so you can leave it out.

Instantiating a XFUserState object involves this API:
Dim objXFUserState As XFUserState = BRApi.State.GetUserState(si, isSystemLevel, clientModuleType, relatedObjectType, relatedObjectName, key1, key2)

XFUserState appears to be related to the user's session state and activitiy.  It seems pretty useless in the context of writing business rules in a business setting.

@MMomentoff #Abstraction.  The exposed method signature for Api.Data.Calculate could be wrapped within a method whose signature only requires arguments a business user can reasonably supply.