Back to connectors… Back to Sage CRM...

Merge variables into a where statement (3 replies)

tusselman
10 years ago
tusselman 10 years ago

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

Support
10 years ago
Support 10 years ago

Tom, this looks ok. Have you allowed the view to be exposed to SData?

Support
10 years ago
Support 10 years ago

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)

7 years ago
Support 7 years ago

Closed due to inactivity.

Contact

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Request Demo

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Access Downloads

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close