Skip to main content

Outputs given by the LotusScript agent to agtgdmno

This section details the fields that the LotusScript agents must use to return information to agtgdmno .

ReturnCode

LotusScript agents must always set the ReturnCode field; an error is triggered by agtgdmno if it is not set. This field tells agtgdmno if the agent successfully completed its operation. ReturnCode can be set to:

0 LotusScript agent was successful

1 LotusScript agent was unable perform its operation To set this field, use the following syntax:

Call agentDoc.ReplaceItemValue( "ReturnCode", "<value>" )

ErrorMsg

You can use the ErrorMsg field to inform agtgdmno of any error conditions encountered by the LotusScript agent. To set this field, use the following syntax:

Call agentDoc.ReplaceItemValue( "ErrorMsg", "<error message>" )

ReturnValue

You must set the ReturnValue field for the following operations:

  • ispwexpired

  • isenabled

  • islocked

  • isacctexpired

ReturnValue is set to the either true or false. To set this field, use the following syntax:

Call agentDoc.ReplaceItemValue( "ReturnValue", "<true|false>" )

ReturnAccountId

You must set the ReturnAccountId field for the following operations:

  • create

  • rename

  • movecontext

ReturnAccountId is set to the new account ID for the user. To set this field, use the following syntax:

Call agentDoc.ReplaceItemValue( "ReturnAccountId", "<account ID>" )

ReturnShortId

You must set the ReturnShortId field for the following operations:

  • create

  • rename

  • movecontext

ReturnShortId is set to the new short ID for the user. To set this field, use the following syntax:

Call agentDoc.ReplaceItemValue( "ReturnShortId", "<short ID>" )

ReturnAttributes

You must set the ReturnAttributes field for the following operations:

  • create

  • update

ReturnAttributes is set to the new attributes for the user. To set this field, use the following syntax:

Call agentDoc.ReplaceItemValue( "ReturnAttributes", <attributes> )

ReturnAttributes is stored as property list. A property list has the following form:

(Attribute_Name_1 Attribute_Value_1 Attribute_Name_2 Attribute_Value_2 ....
 Attribute_Name_N Attribute_Value_N)

ReturnGroups

You must set the ReturnGroups field for the following operations:

  • create

  • update

ReturnGroups is set to the new attributes for the user. To set this field, use the following syntax:

Call agentDoc.ReplaceItemValue( "ReturnGroups", <groups> )

ReturnGroups is stored as a property list. A property list has the following form:

(Attribute_Name_1 Attribute_Value_1 Attribute_Name_2 Attribute_Value_2 ....
 Attribute_Name_N Attribute_Value_N)

Saving field values to the agent document

After all the return values have been set, you must include the following LotusScript line. This saves the values to the agent document:

Call agentDoc.Save(True, True)