Merge variables into a where statement (3 replies)
Tom, this looks ok. Have you allowed the view to be exposed to SData?
Also, there looks to be an issue with the documentation where the order of the where & returnfield arguments are incorrect (they've been flipped).
Try:
SageCRMLookupCustomWhere("SAGECRM", "vPersonPEotl", "Pers_CompanyId = " & %CRMCompanyId & " and (Pers_Deleted = 0 or Pers_Deleted is null) and pers_emailinvoice = 'Y'", "pers_emailaddress", false)
SageCRMLookupCustomWhere("SAGECRM", "vPersonPEotl", "Pers_CompanyId = " & %CRMCompanyId & " and (Pers_Deleted = 0 or Pers_Deleted is null) and pers_emailinvoice = 'Y'", "pers_emailaddress", false)
Closed due to inactivity.
I’m trying to pass a variable into a where clause during a crm custom look up.
I cannot figure out how to get iMan to join the value into the where clause.
SageCRMLookupCustomWhere("SAGECRM", "vPersonPEotl","pers_emailaddress", "Pers_CompanyId = " & %CRMCompanyId & " and (Pers_Deleted = 0 or Pers_Deleted is null) and pers_emailinvoice = 'Y'", false)
Sys.error results:
Resolved Function - SageCRMLookupCustomWhere("SAGECRM", "vPersonPEotl","pers_emailaddress", "Pers_CompanyId = " & "55478" & " and (Pers_Deleted = 0 or Pers_Deleted is null) and pers_emailinvoice = 'Y'", false) Error - Description: Error whilst retrieving SageCRM SData request.Severity - Error -
Is it possible?
Thanks,
Tom Usselman
Frontline Systems, Inc