Sage CRM¶
These functions are specific to Sage CRM.
- SageCRMLookup
- SageCRMLookupReturnMultipleValues
- SageCRMLookupCustomWhere
- SageCRMValidateDropDown
- SageCRMTranslateDropDownValue
SageCRMLookup¶
Description
Looks up a single value in the Sage CRM database, in the same way that Lookup queries a value in a SQL database.
Syntax
Arguments
- systemid
- The system id, as defined in Setup/System Connectors, of the Sage CRM database to query.
- entityid
- The table or entity to query.
- returnfld
- The field to return.
- queryfields
- A single string or an array of strings naming the fields to query on.
- queryvalues
- A single value or an array of values used to browse or filter the view. The number of values specified in queryfields and queryvalues must match.
- mustreturn
- When True, the function must return a value, and raises an error if it finds none.
- When False, the function returns an empty value when there is no matching record.
SageCRMLookupReturnMultipleValues¶
Description
Looks up several values in the Sage CRM database, in the same way that Lookup queries a value in a SQL database.
Syntax
SageCRMLookupReturnMultipleValues( systemid, entityid, returnflds, queryfields, queryvalues, mustreturn)
Arguments
- systemid
- The system id, as defined in Setup/System Connectors, of the Sage CRM database to query.
- entityid
- The table or entity to query.
- returnflds
- An array of the fields to return.
- queryfields
- A single string or an array of strings naming the fields to query on.
- queryvalues
- A single value or an array of values used to browse or filter the view. The number of values specified in queryfields and queryvalues must match.
- mustreturn
- When True, the function must return a value, and raises an error if it finds none.
- When False, the function returns an empty value when there is no matching record.
SageCRMLookupCustomWhere¶
Description
Looks up a value in the Sage CRM database with a custom where clause, in the same way that Lookup queries a value in a SQL database.
Syntax
Arguments
- systemid
- The system id, as defined in Setup/System Connectors, of the Sage CRM database to query.
- entityid
- The table or entity to query.
- returnfld
- The field to return.
- whereclause
- A filter clause in the same form as the filter clause on the SageCRM Reader.
- mustreturn
- When True, the function must return a value, and raises an error if it finds none.
- When False, the function returns an empty value when there is no matching record.
SageCRMValidateDropDown¶
Description
Checks that a value is valid for a drop-down field in Sage CRM.
Syntax
Arguments
- systemid
- The system id, as defined in Setup/System Connectors, of the Sage CRM database to query.
- entityid
- The table or entity to query.
- field
- The drop-down field in Sage CRM.
- value
- The value to validate.
- mustreturn
- When True, the value must be valid, and the function raises an error if it is not.
- When False, the function returns False if the value is not valid.
SageCRMTranslateDropDownValue¶
Description
Translates a drop-down description to the underlying value.
Syntax
Arguments
- systemid
- The system id, as defined in Setup/System Connectors, of the Sage CRM database to query.
- entityid
- The table or entity to query.
- field
- The drop-down field in Sage CRM.
- value
- The value to validate. The function translates the description in the language of the user whose logon details are set in the system connector.
- mustreturn
- When True, the value must be valid, and the function raises an error if it is not. When False, the function returns False if the value is not valid.