web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Create multiple child cases from parent case based on a subgrid

(0) ShareShare
ReportReport
Posted on by 197

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

I have the same question (0)
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at
    RE: Create multiple child cases from parent case based on a subgrid

    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.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Create multiple child cases from parent case based on a subgrid

    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.

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at
    RE: Create multiple child cases from parent case based on a subgrid

    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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans