Hi,
I have a subgrid on my parent case and based on the number of records I have in the subgrid I need to create that many child cases. How to achieve this functionality?
*This post is locked for comments
Hi Gaurav,
It seems based on some association with another entity, you want to create multiple child records ?? you should be able to handle this through plugin, something like based on update of your child entity (a lookup update), you can create child cases and set parent case and customer accordingly.
If facing any issue you can share it here.
How do you decide how many child case you will create for particular parent case?
Second when or which event you want to create child record?
There was many way you can create using client side web API, plugins and using workflow.
Using workflow three was some limitation of numbers of records maximum 10.
Now based on your event you can do it either client side script or server side plugin.
For me plugin will be best idea as this is server side logic and it will works if you create case from external source as well.
You can use JavaScript and WebApi to create the child cases.
Use JavaScript to get the number of records in a subgrid:
msdn.microsoft.com/.../dn932126.aspx
The you can use WebApi to Create the Cases. You can either use Jason Lattimer's CRM Rest Builder to generate the code that will create the child entity records:
github.com/.../CRMRESTBuilder
If you are using CRM v8.2 you can use some of the libraries that are available on the web:
community.dynamics.com/.../webapi-library-comparison-in-dynamics-365
Or take a look at this sample:
scaleablesolutions.com/crud-operations-using-microsoft-dynamic-crm-web-api
If you are using CRM v9, you can use Xrm.WebApi.CreateRecord:
docs.microsoft.com/.../createrecord
Hope this helps.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
HR-09070029-0 2
ED-30091530-0 1