Transform your organisation with Microsoft Dynamics 365
Use Power BI for in-depth business intelligence
Fully functional, cross platform, desktop, tablet and mobile apps for your business
Powerful document management, content management and collaboration
Transform how you manage your membership with Subscribe 360 powered by Dynamics 365
Work smart, work less, and do more with Microsoft Flow
The C2 consultancy team are the catalyst for delivering business transformation
C2's development team configure and customise Dynamics 365 and SharePoint for your business
C2 have dedicated professional trainers and change management experts on-hand
Our support team help ensure staff get the most from your investment
Get the most out of your IT investment with Planning Services for Dynamics 365
C2 specialise in implementing Microsoft Dynamics 365 and SharePoint to transform your organisation
ABTA is the United Kingdom's foremost travel association
The Family Building Society - a new society, created for the way we live today
Origo is the eCommerce standards and services body for the UK financial services industry
The General Teaching Council for Scotland regulates the teaching profession
Belfast City Council is the local authority for the city of Belfast
View all of our Case Studies
A selection of in-depth papers on business transformation
Check out C2’s upcoming events, we hope to see you there
C2’s previous newsletters offer a selection of business transformation insights
Have a look through our Dynamics 365 videos in our e-Learning hub
Visit the Resources Hub
Business transformation insights with the Microsoft cloud
Subscribe to our RSS Feed to get the latest updates
Our DNA for success comes from the people within C2
Find out more about who we are and what we do
Meet the key people behind C2 that keep our business ticking
Looking for a career in the fast evolving technology industry?
Get in touch to discuss your business transformation project
Membership, conference and event solutions on the Dynamics 365 platform
Pledge and donation management in Dynamics 365 for charities and not for profits
Business transformation solutions for the finance industry
Explore our specialist areas
Back to Blog Listing
Data can be retrieved from the Dynamics CRM API using the .retrieve function once a connection to the iOrganizationService has been established. The format of the retrieve function is as follows:
retrieve([Entity Name], [Entity GUID], [Entity Column Set])
e.g.
ser.Retrieve(
"contact"
, new Guid(ContactID), new ColumnSet(
"contactid"
,
"firstname"
"lastname"
"emailaddress1"
))
The "Entity Name" is simply the name of the entity that you wish to retrieve as named in CRM. If you are unsure as to what this is then check the name of the entity within the "customize the system" section of the CRM web interface.
The "Entity GUID" is simply the GUID for the entity that you wish to return. for more information on how to retrieve the GUID of an entity from the web interface please see - http://www.c2software.com/c2-blog/return-crm-guid.aspx
The "Entity Column Set" is a list of each of the attributes that you wish to retrieve. You can use "True" as a parameter rather than a list of string and this would return all columns but this is not advised. Using "True" is the equivalent of using "Select * From" in SQL. It will take longer for the query to return and will bring back more data than you require. Instead a list of string values should be used. The string values should relate to the attribute names in the CRM (these can be checked and found within the "customize the system" section of the CRM web interface for each entity). Please note that the attribute names should also always be in lower case.
James CTwo is our blogging alter ego for the Dynamics CRM and Web experts here at C2. We have a passion for anything CRM, Web Design or Social Media. We love writing about it! Find us on YouTube & Twitter.
"Discover the content that matters to you on business transformation. Explore how you can drive customer engagement, empower your team, optimise your businesses and revolutionise your products with the next digital revolution. For more information visit our white paper library."
Our newsletter is sent on a quarterly basis, offering detailed insights into all aspects of business transformation with Microsoft cloud technologies. We also promote upcoming events and special offers throughout the year. Sign up to get involved today.