Friday, December 9, 2016

CRM REST Builder v2.5.0.0

New in this release:
  • Added 8.2 endpoint
  • Changed functionality to reload CSDL when endpoint changes to ensure metadata is correct
  • Added 8.2 option to return full entity on create & update
  • Added option to retrieve, update, and delete via alternate keys
  • Added header options for upsert (prevent create & prevent update)
  • Added ability to optionally select non-required parameters for actions & functions
Checkout the project on GitHub:

https://github.com/jlattimer/CRMRESTBuilder

For 2015 & 2016 use the v2.5.0.0 release
For 2011 & 2013 use the v1.5.0.0 release

https://github.com/jlattimer/CRMRESTBuilder/releases

Monday, October 31, 2016

CRM REST Builder 2.4.0.0

Long overdue but here’s an update I’ve been working on for awhile.
  • Added support for Web API actions & functions
  • Added Web API endpoint selection
  • Added Web API filtering on related records
  • Added Retrieve via odata.nextlink
  • Enhanced formatting of code output
  • Added format code option for code editor & FetchXML queries
  • Set exception alerts to Xrm.Utility.alertDialog when >= 6.0
  • Added button to launch from application ribbon to open full screen
  • Fixed handling of multiple Prefer headers
  • Misc. bug fixes, like the one where it was generating the wrong code for lookups
  • Moved project hosting to GitHub

Web API Actions and Functions
You’ll notice the buttons don’t light up immediately. In order to determine which actions and functions (including custom actions) are available in your org., we need to download and parse the metadata/CSDL (https://org/api/data/v8.1/$metadata) which happens to be quite large. This happens in the background so it won’t hold you up if you’re wanting to use other functionality.

Some actions and functions take complex objects (entities / entity collections) as parameters. Due to the complexity I didn’t want to try and tackle building one of those complex objects inside building the parameters for the action/function so instead in the parameter lit you’ll see something like this instead of fields to enter actual data:
  • entity logical name Entity
  • (Variable Types) Entity
  • Collection (entity logical name)
  • Collection ((Variable Types))
In these cases the parameter is an entity of a specific type, an entity which could be of variable types (think adding an account, contact, or lead to a marketing list), a collection of a specific type of entity, or a collection of variable types of entities. The generated code will provide the base to set the entity as the parameter (to to a collection) but for this version you’ll need to set the entity id and name (for variable types). This implies that the associated entity is already created, you could also insert code to create the associated record on the fly like if you are using WinOpportunity. You could insert the object code for a new opportunityclose entity and send that as the parameter to handle everything in one transaction. 

Web API RetrieveMultiple with Related Records
When using an ‘expand’ operation when querying a group of records you’ll notice the collection of child records for each parent record being retrieved is empty. This is by design. The max amount of records able to be retrieved by a query is 5,000, then they when you figure in a potential 5,000 child records for each of the 5,000 parent records you’d end up with a result set containing 25,000,000 records which just isn’t practical. So instead you’ll see returned a url for a standard Retrieve request for each of the sets of child records (relationship_name@odata.nextlink) that would need to be executed for each set of records. Make things easier and speed things up I’ve added the ability to generate code for these requests specifically.

Checkout the project on GitHub:

https://github.com/jlattimer/CRMRESTBuilder

For 2015 & 2016 use the v2.4.0.0 release
For 2011 & 2013 use the v.1.4.0.0 release

https://github.com/jlattimer/CRMRESTBuilder/releases

Monday, October 24, 2016

VS Code JavaScript Snippets Extension

I had a few extra hours free this weekend and decided to convert the JavaScript code snippets from my CRM Developer Extensions project into an extension for VS Code (because that’s what all the cool kids are using). Should be fairly complete and include everything from 2011 all the way up until 2016 (5.0 – 8.1).

image

I honestly haven’t spent a lot of time in VS Code as of yet but it seems promising for quickly editing web resource code. It certainly launches a lot quicker than Visual Studio does anyway. I think I’d be more apt to use it for business if it had native TFS/TFVC support. On a side note, David Yack has created a gulp task for automatically deploying changed web resources. It relies on Web API/OAuth so anybody pre-2016 is out of luck but it appears that the nature of the extension model for VS Code forces us into writing code capable of running on Windows, Mac, and Linux (which is good) but means using the CRM SDK assemblies to talk to CRM probably isn’t in the cards.

You can download from the Visual Studio Code Marketplace
https://marketplace.visualstudio.com/items?itemName=JLattimer.dynamics-crm-js

Or install directly from VS Code using: ext install dynamics-crm-js

The project is also up on GitHub: https://github.com/jlattimer/CRMVSCodeJSSnippets

Tuesday, October 18, 2016

CRM Note Workflow Utilities v2.0.0.0

Some new workflow tools for working with Notes in CRM.
  • Check Attachment
  • Copy Note
  • Move Note
  • Delete Attachment
  • Delete Attachment By Name
  • Delete Note
  • Update Note Text
  • Update Note Title

https://github.com/jlattimer/CRM-Note-Workflow-Utilities

Check out the Releases section for the downloads

v1.0.0.0 for CRM 2011 & 2013
v2.0.0.0 for CRM 2015 & 2016
Online & On Premise

Friday, October 14, 2016

CRM Numeric Workflow Utilities v2.1.0.0

Added new functionality:
  • Random Number Between – generate a random number between an upper and lower boundary
Also cleaned up the action names so they’re more readable in the workflow editor.

Moved project hosting to GitHub:

https://github.com/jlattimer/CRM-Numeric-Workflow-Utilities

Check out the Releases section for the downloads

v1.1.0.0 for CRM 2011 & 2013
v2.1.0.0 for CRM 2015 & 2016
Online & On Premise

Thursday, October 13, 2016

CRM DateTime Workflow Utilities v2.1.0.0

Added new functionality:
  • Get Month Number – get the number associated with a date’s month
  • Get Year Number – get the number associated with a date’s year
  • Get Day Number – get the number associated with a date’s day
  • Add Weeks – add a number of weeks to a date
Also cleaned up the action names so they’re more readable in the workflow editor.

Moved project hosting to GitHub:

https://github.com/jlattimer/CRM-DateTime-Workflow-Utilities

Check out the Releases section for the downloads

v1.1.0.0 for CRM 2011 & 2013
v2.1.0.0 for CRM 2015 & 2016
Online & On Premise

Wednesday, October 12, 2016

CRM Email Workflow Utilities v2.2.0.0

Added new functionality:
  • Email Queue Members – add email recipients based private queue members and/or queue owner
  • CC Queue Members - add email CC recipients based private queue members and/or queue owner
  • Check Attachments – has attachments (yes/no) & attachment count
Also cleaned up the action names so they’re more readable in the workflow editor.

Moved project hosting to GitHub:

https://github.com/jlattimer/CRM-Email-Workflow-Utilities

Check out the Releases section for the downloads

v1.2.0.0 for CRM 2011 & 2013
v2.2.0.0 for CRM 2015 & 2016
Online & On Premise