Search code examples
javascriptdynamics-crmdynamics-crm-2016

How to open a new form of bundle from JS Dynamics crm?


I need to add a custom ADD BUNDLE button to a form that will open a product-bundle form after clicked, my problem is with the functionality, I want to use this: Xrm.Utility.openEntityForm("Entity"); to open a product bundle form, but the only entity I can use is Product, How can I open the product form in Bundle type and not just a product form?

**EDIT: I need to know how to open a product form that its product structure is bundle (3).

 a product form in bundle type


Solution

  • You can use this snippet to do it. Read more

    var parameters = {};
    parameters["productstructure"] = 3;
    Xrm.Utility.openEntityForm("product", null, parameters);
    

    On a side note, depending on your CRM version - this Xrm.Utility.openEntityForm is deprecated. You may have to change to Xrm.Navigation.openForm in future. Learn more