-
Notifications
You must be signed in to change notification settings - Fork 42
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
Adding a contact to a marketing list #53
Comments
The reason why we didn't build it is simply the volume. CRM has over 200 different requests, it wouldn't be feasible for us to try and cover all of them. We do encourage that people form the project and add new request types as needed. You'd need to figure out the parameters, of course. Download CRM SDK (the latest downloadable version) and check out SoapLogger sample. It generates jscript but packets are all the same. HTH |
Thanks very much for the reply George. I think I have the SOAP packet I need but I can't see how to send it. Should I use the "attemptSoapResponse()" function in Client.php? I did try playing around with it but not getting anywhere so far. Also, I am struggling to see the actual XML response that is being sent to the server. I can see reference to a "$logger" in various parts of the library code but I can see no edocumentation on how to use it. Ist here a variable somewhere to set to get it to display messages or something similar? I'd appreciate it if you are able to point me in the right direction with this. Cheers, Bill |
Hi Bill, actually, take a look at
$logger is a generic logging interface that gets attached when client is constructed. Whatever is your favorite logger, really depends on the environment. HTH |
Hi George, so I have made progress on this and thought it might be interesting to share where I have got to so far. I am now able to add one or more contact to a marketing list. I found that I can use executeAction from client.php but adding a few lines of code to handle a field type of "ArrayOfguid". The additions are generic and it made me wonder if this is something that could be included in the library. The code I added was as follows:
I was then able to call exectueAction as follows:
Cheers, Bill |
Hi Bill, cool, that's great! Can you create a pull request for the Thanks |
Hi George I have created a pull request with the changes I made to soaprequestsgenerator.php to handle the xml type "ArrayOfguid" Cheers Bill |
I am trying to add a contact to a marketing list using the contact GUID.
I am able to get a list object from CRM using he following code:
$list = $service->entity( 'list', $listguid ); where $listguid is the guid of the marketing list I want to work with
but I'm not sure if this is the right approach. I suspect this only allows me to manipulate the list itself as opposed to adding contacts to it.
Can i use the AddListMembersListRequest function which looks to take a listguid and conatct guids as parameters? The problem is that I have no idea how to call a function like this using the php toolkit
I'd appreciate any advice on how to approach this problem.
I'm wondering if the executeAction method might be the way to go? Somethng like:
$result = $service->executeAction('AddListMembersList' $listguid ,$memberid); (which doesn't work as I've written it but somehow seems close).
Cheers,
Bill
The text was updated successfully, but these errors were encountered: