In one of my previous blog I mentioned how to use on demand flow within MS CRM. But we have some limitations with that approach
- we can’t apply Enable rules on the Flow button as it is OOB context menu which generates dynamically based on the number of flows.
- we can’t restrict a call to Flow to check the conditions whether Flow needs to run or not, I mean we can’t apply our conditions before a request goes to Flow.
Step 1: Create a Flow with HTTP Request with proper “Request Body JSON schema” (use sample payload option to generate the schema)
Step 2: Add “Create a new record (Dynamics)” action to create a new Contact in CRM.
Step 3: Add a Response action at the end to send the response back to CRM and Save the Flow .
Step 5: Create a ribbon button in CRM and call the below function from the ribbon button.
with this approach you can add all your validations in the java script and call the Flow once the conditions met, this way we can reduce lot of unnecessary calls to Flow. We can pass whole record context to Flow if needed. Hope it is interesting 🙂