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,
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.
Hi Gaurav,
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:
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156