The Mbo class exposes a lot of setValue methods but we can categorize them in two big groups. The first group accepts only two arguments that are the name of the attribute to be set and its value. The second group of methods have three arguments that allows to pass an additional accessModifier flag.
The values that can be passed into this flag are defined in the MboConstants interface and Mbo class. The most important values are the following:
- NOVALIDATION (1) – Suppress validation
- NOACCESSCHECK (2) – Suppress access control checks
- NOACTION (8) – Suppress action
- NOVALIDATION_AND_NOACTION (9) – Suppress validation and action
In the following example I’m setting the description to a constant value without checking if the field is readonly.
from psdi.mbo import MboConstants mbo.setValue("DESCRIPTION", "Hello World!", MboConstants.NOACCESSCHECK)
Those values can be ‘merged’ using the Java bitwise OR operator “|”.
from psdi.mbo import MboConstants mbo.setValue("DESCRIPTION", "Hello World!", MboConstants.NOACCESSCHECK | MboConstants.NOACTION)