Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How call crm function #58

Closed
finellif opened this issue May 2, 2018 · 5 comments
Closed

How call crm function #58

finellif opened this issue May 2, 2018 · 5 comments

Comments

@finellif
Copy link

finellif commented May 2, 2018

How call a crm function and return RetrieveMultiple.

In an example that someone sent me:

var fwdFilter = "pg_DataRVPSet?$select=pg_DatasRVPId&$filter=pg_ClienteId/Id eq guid'" + accountId + "'";
var oDataEndpointUrl = serverUrl + "/XRMServices/2011/OrganizationData.svc/" + fwdFilter
..
..

How can I use php-crm-toolkit to call "pg_DataRVPSet"

@georged
Copy link
Contributor

georged commented May 2, 2018

Hi @finellif

what you have is Web API sample, current version of our toolkit is SOAP-based. We do have Web API version in the works but it's not available yet.

In the current version of the toolkit you have to use fetchxml.

Thanks
George

@georged georged closed this as completed May 2, 2018
@finellif
Copy link
Author

finellif commented May 3, 2018 via email

@georged
Copy link
Contributor

georged commented May 3, 2018

Hi @finellif

I'm not sure what do you mean by "call function". It is possible to use fetchxml to return the same results as the web api call you mentioned. Fetchxml will be something like

'<fetch version="1.0" output-format="xml-platform" mapping="logical"> <entity name="pg_DataRVP" > <attribute name="pg_DatasRVPId" /> <filter> <condition attribute="pg_ClienteId" operator="eq" value="' + accountId + '" /> </filter> </entity> </fetch>'

Thanks

@finellif
Copy link
Author

finellif commented May 3, 2018 via email

@georged
Copy link
Contributor

georged commented May 3, 2018

You just call retrieveMultiple method and pass fetchxml to it. Check https://github.com/AlexaCRM/php-crm-toolkit/blob/master/examples/cli-getallcontacts.php sample and replace call $client->retrieveMultipleEntities("contact",... with $client->retrieveMultiple($fetchxml,...

HTH
George

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants