Sage CRM¶
The following functions are specific to SageCRM.
- SageCRMLookup
- SageCRMLookupReturnMultipleValues
- SageCRMLookupCustomWhere
- SageCRMValidateDropDown
- SageCRMTranslateDropDownValue
SageCRMLookup¶
Description
Looks up and returns a single value from the SageCRM database. The lookup is made in a similar fashion to Lookup queries a value in a SQL database.
Syntax
Arguments
- systemid
- As defined in Setup/System Connectors for the SageCRM database to be queried.
- entityid
- The table or entity to be queried.
- returnfld
- The field to return.
- queryfields
- A single string or array of strings for the fields used to specify the query.
- queryvalues
- A single value or an array of values used to browse of filter the view. The number of values specified in queryfields and queryvalues must match.
- mustreturn
- When set to true the function must return a value, if the function does not return a value an exception will be raised.
- When set to false, if the function will return an empty value when there is no matching record.
SageCRMLookupReturnMultipleValues¶
Description
Looks up and returns multiple values from the SageCRM database. The lookup is made in a similar fashion to Lookup queries a value in a SQL database.
Syntax
Arguments
- systemid
- Defined in Setup/System Connectors for the SageCRM database to be queried.
- entityid
- The table or entity to be queried.
- returnflds
- An array of the fields to return.
- queryfields
- A single string or array of strings for the fields used to specify the query.
- queryvalues
- A single value or an array of values used to browse of filter the view. The number of values specified in queryfields and queryvalues must match.
- mustreturn
- When set to true the function must return a value, if the function does not return a value an exception will be raised.
- When set to false, if the function will return an empty value when there is no matching record.
SageCRMLookupCustomWhere¶
Description
Looks up a value from the SageCRM database using a custom where clause. The lookup is made in a similar fashion to Lookup queries a value in a SQL database.
Syntax
Arguments
- systemid
- Defined in Setup/System Connectors for the SageCRM database to be queried.
- entityid
- The table or entity to be queried.
- returnfld
- The field to return.
- whereclause
- A filter clause to in the same form as the filter clause on the SageCRM Reader.
- mustreturn
- When set to true the function must return a value, if the function does not return a value an exception will be raised.
- When set to false, if the function will return an empty value when there is no matching record.
SageCRMValidateDropDown¶
Description
Validates or checks that a value for a particular drop down field within SageCRM is valid.
Syntax
Arguments
- systemid
- As defined in Setup/System Connectors for the SageCRM database to be queried.
- entityid
- The table or entity to be queried.
- field
- The drop down field in SageCRM.
- value
- The value to be validated.
- mustreturn
- When set to true the value must be valid. If the value is not valid an exception will be raised.
- When set to false, if the value is not valid false is returned.
SageCRMTranslateDropDownValue¶
Description
Translates a drop-down description to the underlying value.
Syntax
Arguments
- systemid
- Defined in Setup/System Connectors for the SageCRM database to be queried.
- entityid
- The table or entity to be queried.
- field
- The drop down field in SageCRM.
- value
- The value to be validated. The description being translated is based on the user’s language as per the logon details defined in the system connector.
- mustreturn
- When set to true the value must be valid. If the value is not valid an exception will be raised. When set to false, if the value is not valid false is returned.