Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Create multiple child cases from parent case based on a subgrid

Posted on by 195

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

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 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
    gdas 50,085 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 Profile Picture
    Aric Levin 30,188 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans