Ruby library for accessing Microsoft Dynamics CRM Online 2011/2013 via their SOAP API.
Add this line to your application's Gemfile:
gem 'dynamics_crm'
And then execute:
$ bundle
Or install it yourself as:
$ gem install dynamics_crm
client = DynamicsCRM::Client.new
client.authenticate('user@orgname.onmicrosoft.com', 'password')
client.retrieve('account', '53291AAB-4A9A-E311-B097-6C3BE5A8DD60')
# => #<DynamicsCRM::XML::Entity ... >
client.retrieve_multiple('account', ["name", "Equal", "Test Account"])
# => [#<DynamicsCRM::XML::Entity ... >]
client.retrieve_multiple('account', ["name", "Equal", "Test Account"], ["Name, "CreatedBy"])
# => [#<DynamicsCRM::XML::Entity ... >]
# Add a new account
client.create('Account', name: 'Foobar Inc.')
# => {id: '53291AAB-4A9A-E311-B097-6C3BE5A8DD60'}
# Update the Account with id '53291AAB-4A9A-E311-B097-6C3BE5A8DD60'
client.update('account', '53291AAB-4A9A-E311-B097-6C3BE5A8DD60', name: 'Whizbang Corp')
# => {}
# Delete the Account with id '53291AAB-4A9A-E311-B097-6C3BE5A8DD60'
client.delete('account', '53291AAB-4A9A-E311-B097-6C3BE5A8DD60')
# => {}
# get the list of organization entities
client.retrieve_all_entities
# => [#<DynamicsCRM::Metadata::EntityMetadata>, ...]
# get the entity metadata for the account object
client.retrieve_entity('account')
# => DynamicsCRM::Metadata::EntityMetadata
# get AttributeMetadata for 'name' field on the account object
client.retrieve_attribute('account', 'name')
# => [#<DynamicsCRM::Metadata::AttributeMetadata>, ...]
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request