ObjectXml

You can use this function for Optiva Workflows.

Purpose

The function objectXml returns XML data for an Optiva object.

Syntax


string ObjectXML(string Symbol, string objKey, string dtls, string languageCodes = null)

Arguments

Part Type Description
objSymbol String The object type or current object type of the data.
Note: Use empty quotation marks to indicate the current symbol of the workflow.
objkey String The object key or current object key of the data.
Note: Use empty quotation marks to indicate the current object of the workflow.
DetailCode String The detail codes identify data sections within business objects like formulas, items, specifications, projects, and companies, where each object's tags are unique within that object type but can overlap across different object types.
Note: Use a semi-colon delimited list to separate each detail code.

languageCodes

String

Optional. Use this parameter to export Enumerated Value Lists in more than one language.
Note: Use a semi-colon delimited list to separate each language code. If the parameter is not provided, the default language of the database is considered (EN-US mostly).

Description

Sets the object key. It can be different than the key that was used previously. The key or the symbol can be derived or based on data other than that which was in context when the workflow was launched. A workflow can be designed to populate the tag parameters with the master formula for the item and the formula symbol.

One or more description fields are added to the enumerated list values, depending on the value given to the languageCodes parameter.


 <statusind>200</statusind>
 <statusind_label>Approved</statusind_label>

Examples

This action gets values for the current symbol and object. You must start the script with imports System.xml if XML documents are part of it.


Dim sXn2 As String = ObjectXml(objectSymbol, objectKey, "HEADER;PARAM")

This action retrieves the XML for the items in the formula. The XML is retrieved to the constituent level.


Dim sXn2 As String = ObjectXml("FORMULAADJUST", "", "HEADER;INGRMULTIRM")

When you specify “EN-US;FR-FR”, the Enum Val List Labels for English and French are added as nodes to the XML. The node names include the language code in the suffix (i.e., _LABEL_EN-US and _LABEL_FR-FR respectively).


Dim xml As String = ObjectXml("", "", "HEADER;CUSTOM;TPALL", "EN-US;FR-FR")
MessageList(xml)

This example retrieves the current browser language for reporting.

Dim sLanguage as String = Context.SessionInfo.Language
Dim xml As String = ObjectXml("", "", "HEADER;CUSTOM;TPALL", sLanguage)
MessageList(xml)

Example 1: This example retrieves the XML data of the current object covering detail codes "HEADER", "CUSTOM", and "TPALL" along with multilanguage data(EN-US, FR-FR)

string xml = ObjectXML("", "", "HEADER;CUSTOM;TPALL", "EN-US;FR-FR");

Example 2: This example retrieves the XML data for the current object, returning only the HEADER detail code because an empty string is passed as the detail code argument.

string xml = ObjectXML("", "", "");