locked
Get a currently selected Subgrid name or Section RRS feed

  • Question

  • Hi All,

    How to get a currently selected Subgrid name or Section. There are 6 subgrids to the same entity. I want to know from which subgrid record is getting created and pass this to child record. Please suggest


    Regards, Saad

    Monday, April 18, 2016 3:02 AM

Answers

  • got it resolved. Passed the SelectedControl Crm Parameter on Custom Add New Subgrid button.

    To get currently selected subgrid from where Custom Add New Button is Clicked use the below Script:

    function addNewRecordFromSubgrid(params){
    if(params._element.id == "Your Grid Id"){
    your url;
    }

    }


    Regards, Saad

    • Marked as answer by Mohd Saad Wednesday, April 20, 2016 5:35 AM
    Wednesday, April 20, 2016 5:34 AM

All replies

  • Which version of CRM you are using? The functions to interact with subgrids on form are available from Microsoft Dynamic CRM 2015 update 1 version. Check if you could use these functions for your requirement.

    Thanks !

    Sam


    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Monday, April 18, 2016 8:40 AM
  • CRM version is crm 2011.

    Regards, Saad

    Monday, April 18, 2016 10:26 AM
  • got it resolved. Passed the SelectedControl Crm Parameter on Custom Add New Subgrid button.

    To get currently selected subgrid from where Custom Add New Button is Clicked use the below Script:

    function addNewRecordFromSubgrid(params){
    if(params._element.id == "Your Grid Id"){
    your url;
    }

    }


    Regards, Saad

    • Marked as answer by Mohd Saad Wednesday, April 20, 2016 5:35 AM
    Wednesday, April 20, 2016 5:34 AM