Utility Functions

These utility functions are can support work with the record objects that are used by the WebService functions.

(AfmWebServicesGetFieldList record)

Returns just the field list portion of a record.

(AfmWebServicesGetOldFieldList record)

Returns just the old field list portion of a record.

(AfmWebServicesSetFieldValues record fieldNameValueList)

Sets a list of field-value pairs on a record.

Example

(setq record nil)
(setq fieldValueMap (list (“rm.bl_id” “HQ” “rm.fl_id” “17”)))
(AfmWebServicesSetFieldValues record fieldValueMap)

(AfmWebServicesSetFieldValue record fieldname value)

(AfmWebServicesSetOldFieldValue record fieldname value)

Sets the value for a specified field/oldField on a record. If that value is already set on the record, then that value will be replaced, otherwise will be appended.

Example

(setq record nil)
(AfmWebServicesSetFieldValue record “rm.rm.id” “101”)

(AfmWebServicesGetFieldValue record fieldname value)

(AfmWebServicesGetOldFieldValue record fieldname value)

Returns the value for a specified field/oldField on a record.

Example

(setq value (AfmWebServicesGetFieldValue record “rm.rm.id”))

(AfmWebServicesAppendRestriction restrictionList tableName fieldName operator value)

Returns a restriction list that can be used to construct restrictions for the WebService functions.

Example

(setq restrictionList (AfmWebServicesAppendRestriction nil “rm” “rm.id” “=” “101”))