congaengr / dynamics_crm Goto Github PK
View Code? Open in Web Editor NEWRuby library for interacting with Microsoft Dynamics CRM SOAP API
License: MIT License
Ruby library for interacting with Microsoft Dynamics CRM SOAP API
License: MIT License
Calling retrieve_multiple
on a large dataset returns Curl::Err::TimeoutError: Timeout was reached
.
Is there a way to retrieve_multiple in batches?
Been trying a variety of permutations today to attach activityparties to a phonecall activity with no joy so far, here's an example of this being done:
Entity from1 = new Entity("activityparty");
Entity to1 = new Entity("activityparty");
Entity to2 = new Entity("activityparty"); // two contacts inside the to field
from1["partyid"]= new EntityReference("systemuser", userId);
to1["partyid"]= new EntityReference("contact", contact1Id);
to2["partyid"]= new EntityReference("contact", contact2Id);
Entity phonecall = new Entity("phonecall");
phonecall["from"] = new Entity[] { from1 };
phonecall["to"] = new Entity[] { to1, to2 };
// other phonecall fields
service.Create(phonecall);
Has anyone accomplished this sort of creation with the gem, or should I look into making a PR to support this type of SOAP call?
Thanks in advance!
It seems that if you are on a mac using the gem spring in development mode that the connection to the soap endpoint causes segmentation faults.
By removing or commenting out spring or running on a non development environment the segmentation faults do not occur.
The gem also appears to be working well with CRM 2015 update 1 which is worth mentioning to anyone who may otherwise pass it by.
Cheers and thanks!
Hey all - how does paging work in the gem? Is there a good example floating around?
I see the PageInfo
object, but how do I make a query that uses it?
Currently the RetrieveResult
instance is a Hash that only contains Entity attributes. I'm going to make the XML::Entity
object available from RetrieveResult
and add support for parsing/storing FormattedValues.
I cannot find a way to create an annotation for a specify contact, does the gem support this use case?
Hi, guys, I just started the Wiki for this project with a page on getting dynamics_crm gem installed on Windows based on my recent experience doing so. Hope you find it useful.
On a related subject, do you think the Wiki should be open like this or locked down (i.e. as it is now anyone can make changes - should it be based on pull requests instead?) Here is the help page for this if you are interested.
Calling retrieve_multiple
on a large dataset returns Curl::Err::TimeoutError: Timeout was reached
.
Is there a way to retrieve_multiple in batches?
Currently Query Criteria
can only do a single And
or Or
, with multiple ConditionExpression
Add support for Filters
to allow complex queries such as:
(phone = a OR b OR c) AND ownerid = X
Our Dynamics CRM partner is telling us that to reference an entity (not doing an update), we need to pass the guid as a string. Not sure how accurate that is, but it would probably be a good thing to be able to override the automatic data typing (which is actually pretty great). We are trying to have our partner convert the guid we are sending into a string for the lookup on their end but are getting push back. If they should be able to convert that on their end, I'd love to know that. That could potentially make this issue a non-issue.
We are looking at making a change to facilitate this and would love to contribute if this actually is an issue (and not just incompetence or laziness of our partner).
Hey all,
Have any of you dealt with authentication failure issues for some customers?
We have a customer who can't authenticate and we've tried quite a few variations on their org name, the user is a Global Admin so we don't think there's a permission issue. Does the user need any other permission we may be missing?
This may not actually be a Gem issue, if so we can close this, but once we figure out why auth is failing, maybe there's an improvement that can be made to surface a better error to developers.
I have a generic integration adapter that works for both salesforce and dynamics and one irritating thing is how in Dynamics i always need to supply a type and ID βΒ is there a way to discover the type of an object? It doesn't look like it from what I know so far, but thought I'd ask.
Address latitude/longitude fields are doubles. Currently ruby BigDecimal/Float are mapped to float in Dynamics.
I'm thinking about introducing a value object to map to double. i.e. DynamicsCRM::Types::Double.new(something)
Any thoughts on supporting this?
Currently a value is required by ConditionExpression
, allow value to be optional to support operators without a value, like Null
and NotNull
Need to update method missing to return nil when an element is not found.
Hey all-
Is it possible to set entity state with the gem currently, docs suggest it should be editable after creation, but point to the https://msdn.microsoft.com/en-us/library/microsoft.crm.sdk.messages.setstaterequest.aspx
method which i don't think we support yet.
Is this possible in a different way? Can start on a pull request to support this function, just wanted to know if i was missing anything dumb.
Tried to associate a contact to an account and got nil on the associate call.
contact = client.create('contact', firstname: 'Jane', lastname: 'Doe')
account = client.create('account', name: 'Foobar Inc.')
contacts = [ DynamicsCRM::XML::EntityReference.new("contact", contact["id"])]
client.associate("account", account["id"], "contact_customer_accounts", contacts)
After about 50 requests to CRM, the Ruby process starts failing with "Too many open files" error. I have only experienced this on Windows, and suspect this is a Windows-only issue with Curb. Even though the post
method in client.rb calls close
on the Curl::Easy
instance, it seems to have no effect, and looking at netstat -a
output you can see connections building up with each call and never closed. I tried every possible way to get Curb to close its connections to no avail.
In the end I solved this problem for myself by rewriting the post
method using net/http as follows:
require 'net/http'
def post(url, request)
log_xml("REQUEST", request)
uri = URI(url)
ssl = {
:use_ssl => (uri.scheme == 'https'),
:verify_mode => OpenSSL::SSL::VERIFY_NONE
}
response = Net::HTTP.start(uri.host, uri.port, ssl) do |http|
req = Net::HTTP::Post.new(uri)
req['Connection'] = 'Keep-Alive'
req['Content-type'] = 'application/soap+xml; charset=UTF-8'
req.body = request
http.request(req).body
end
log_xml("RESPONSE", response)
response
end
One might say I kicked Curb to the curb :)
Since this is the only place in this gem that actually uses Curb, it is possible to drop the dependency on Curb entirely. The only reservation I have is that net/http does not follow redirects automatically. I see that in the original post
method you use the follow_location
feature of Curb. My experience with CRM is entirely read-only, and there has not been any need for following redirects so far. So, I don't know if CRM ever responds with a redirect - do you know of some use cases where it does? If not, I'd be happy to submit a pull request to get rid of Curb dependency in this gem. It was such a PITA to get it to work on Windows in the first place, and now this thing. I would be happy to see Curb gone :)
First off thanks for this wonderful gem.
Secondly, what is the most elegant way to access linked entities - without using a Builder to explicitly link them in? Iterating thru a small set using the simple retrieve_multiple
and need to conditionally access linked entities.
REXML seems to be a dependency, but it is not specified in the gemspec.
Does this gem support on premise, I get 401 unauthorised response.
This is the verbose response I get :1:
< HTTP/1.1 100 Continue
< HTTP/1.1 401 Unauthorized
< Cache-Control: private
< Transfer-Encoding: chunked
< Content-Type: text/plain
Closing connection 0 |
---|
HTTP Error 401 - Unauthorized: Access is denied |
RuntimeError: HTTP Error 401 - Unauthorized: Access is denied
Hi all,
When I try to get all CRM entities it doesn't respond array of entities
@client.retrieve_all_entities()
{"ResponseName"=>"RetrieveAllEntities", "Timestamp"=>"1956489052"}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.