Solution to raise the amount of products( quotedetails or quoteproducts) in Quote entity via modal












0















I want to add a Button in the ribbon of Quote,
When the user clicks on that, A modal displays, with two fields.
One is quote product categories that exist in that quote, that means it searches in quote product of the quote and find all the categories exist in that specific quote and then display them in a combo box. with their guid or something like that.
Another field is a textbox, which is percentage.
something like this.
The end-user clicks on the ribbon button, the modal appears, he/she gives a number to the percentage and select one of the categories; when presses apply button, it find and return all amounts of the quote products in that quote that matches the user selected category, compute some amount based on quote total amount and the returned amounts and and insert that computed number into a field in each quote product named overed_amount.
How can I handle this? JS or Plugin?
I prefer to this via JS rather than writing plugin, But can I pass parameters between this HTML or JS file to CRM Form/Forms?
And does anybody have any sample? like this? any suggestion?
I googled and most of Plugins are about writing simple plugin based on existing code.
Can I display modal via plugin? Any suggestion or advise? or sample?










share|improve this question



























    0















    I want to add a Button in the ribbon of Quote,
    When the user clicks on that, A modal displays, with two fields.
    One is quote product categories that exist in that quote, that means it searches in quote product of the quote and find all the categories exist in that specific quote and then display them in a combo box. with their guid or something like that.
    Another field is a textbox, which is percentage.
    something like this.
    The end-user clicks on the ribbon button, the modal appears, he/she gives a number to the percentage and select one of the categories; when presses apply button, it find and return all amounts of the quote products in that quote that matches the user selected category, compute some amount based on quote total amount and the returned amounts and and insert that computed number into a field in each quote product named overed_amount.
    How can I handle this? JS or Plugin?
    I prefer to this via JS rather than writing plugin, But can I pass parameters between this HTML or JS file to CRM Form/Forms?
    And does anybody have any sample? like this? any suggestion?
    I googled and most of Plugins are about writing simple plugin based on existing code.
    Can I display modal via plugin? Any suggestion or advise? or sample?










    share|improve this question

























      0












      0








      0








      I want to add a Button in the ribbon of Quote,
      When the user clicks on that, A modal displays, with two fields.
      One is quote product categories that exist in that quote, that means it searches in quote product of the quote and find all the categories exist in that specific quote and then display them in a combo box. with their guid or something like that.
      Another field is a textbox, which is percentage.
      something like this.
      The end-user clicks on the ribbon button, the modal appears, he/she gives a number to the percentage and select one of the categories; when presses apply button, it find and return all amounts of the quote products in that quote that matches the user selected category, compute some amount based on quote total amount and the returned amounts and and insert that computed number into a field in each quote product named overed_amount.
      How can I handle this? JS or Plugin?
      I prefer to this via JS rather than writing plugin, But can I pass parameters between this HTML or JS file to CRM Form/Forms?
      And does anybody have any sample? like this? any suggestion?
      I googled and most of Plugins are about writing simple plugin based on existing code.
      Can I display modal via plugin? Any suggestion or advise? or sample?










      share|improve this question














      I want to add a Button in the ribbon of Quote,
      When the user clicks on that, A modal displays, with two fields.
      One is quote product categories that exist in that quote, that means it searches in quote product of the quote and find all the categories exist in that specific quote and then display them in a combo box. with their guid or something like that.
      Another field is a textbox, which is percentage.
      something like this.
      The end-user clicks on the ribbon button, the modal appears, he/she gives a number to the percentage and select one of the categories; when presses apply button, it find and return all amounts of the quote products in that quote that matches the user selected category, compute some amount based on quote total amount and the returned amounts and and insert that computed number into a field in each quote product named overed_amount.
      How can I handle this? JS or Plugin?
      I prefer to this via JS rather than writing plugin, But can I pass parameters between this HTML or JS file to CRM Form/Forms?
      And does anybody have any sample? like this? any suggestion?
      I googled and most of Plugins are about writing simple plugin based on existing code.
      Can I display modal via plugin? Any suggestion or advise? or sample?







      javascript c# asp.net dynamics-crm dynamics-crm-2011






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 19 at 9:39









      alireza azadialireza azadi

      205




      205
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Plugins (and custom workflow assemblies) run as part of the backend platform. The only "UI" component they have is they run synchronously and throws an Exception, a popup will show that Exception to the user.



          The typical way to add custom UI components is via custom web resources.



          In custom web resources you can do HTML / JS / CSS, and even leverage 3rd party libraries such as KendoUI. You can add them to the form or open them via a ribbon button.



          A custom web resource can typically interact with the main Dynamics 365 form via the parent property (as the above linked article describes).



          One library that can help with displaying custom web resources in D365 is Alert.js, though as the documentation says, it's unsupported.



          If you want to include some backend operations as part of the custom UI, you can create custom actions and call them from the custom web resource's JavaScript.






          share|improve this answer


























          • @Arun : Sir,You mean I should create a UI with HTML/CSS and JS. And then call a custom action.In my case, I need the quote product categories guid and name. I should pass them from the quote to the custom html/css. ( as I see in your link,It accept these two fields ) Can I create A js function that do my work, and placed it in the CRM as web resource, call the JS function when press apply button on the HTML file and pass some parameter ( what user has selected and what precentage has entered ) to the form and that fucntion? In this way I can do this with no backend.

            – alireza azadi
            Jan 19 at 20:07













          • From within the custom web resource's JS you can query the system to get the information you want to display. Are you on v2011?

            – Aron
            Jan 22 at 2:49











          • @Arun : Yes, Im on 2011 on-premise.

            – alireza azadi
            Jan 22 at 5:32











          • TY. Microsoft still has the 2011 SDK available for download. It contains a bunch of sample code. You might want to look into using ...SampleCodeJSRESTEndpointJavaScriptRESTRetrieveMultipleJavaScriptRESTRetrieveMultipleScriptsSDK.REST.js to help you retrieve data.

            – Aron
            Jan 22 at 14:20











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54265779%2fsolution-to-raise-the-amount-of-products-quotedetails-or-quoteproducts-in-quot%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Plugins (and custom workflow assemblies) run as part of the backend platform. The only "UI" component they have is they run synchronously and throws an Exception, a popup will show that Exception to the user.



          The typical way to add custom UI components is via custom web resources.



          In custom web resources you can do HTML / JS / CSS, and even leverage 3rd party libraries such as KendoUI. You can add them to the form or open them via a ribbon button.



          A custom web resource can typically interact with the main Dynamics 365 form via the parent property (as the above linked article describes).



          One library that can help with displaying custom web resources in D365 is Alert.js, though as the documentation says, it's unsupported.



          If you want to include some backend operations as part of the custom UI, you can create custom actions and call them from the custom web resource's JavaScript.






          share|improve this answer


























          • @Arun : Sir,You mean I should create a UI with HTML/CSS and JS. And then call a custom action.In my case, I need the quote product categories guid and name. I should pass them from the quote to the custom html/css. ( as I see in your link,It accept these two fields ) Can I create A js function that do my work, and placed it in the CRM as web resource, call the JS function when press apply button on the HTML file and pass some parameter ( what user has selected and what precentage has entered ) to the form and that fucntion? In this way I can do this with no backend.

            – alireza azadi
            Jan 19 at 20:07













          • From within the custom web resource's JS you can query the system to get the information you want to display. Are you on v2011?

            – Aron
            Jan 22 at 2:49











          • @Arun : Yes, Im on 2011 on-premise.

            – alireza azadi
            Jan 22 at 5:32











          • TY. Microsoft still has the 2011 SDK available for download. It contains a bunch of sample code. You might want to look into using ...SampleCodeJSRESTEndpointJavaScriptRESTRetrieveMultipleJavaScriptRESTRetrieveMultipleScriptsSDK.REST.js to help you retrieve data.

            – Aron
            Jan 22 at 14:20
















          0














          Plugins (and custom workflow assemblies) run as part of the backend platform. The only "UI" component they have is they run synchronously and throws an Exception, a popup will show that Exception to the user.



          The typical way to add custom UI components is via custom web resources.



          In custom web resources you can do HTML / JS / CSS, and even leverage 3rd party libraries such as KendoUI. You can add them to the form or open them via a ribbon button.



          A custom web resource can typically interact with the main Dynamics 365 form via the parent property (as the above linked article describes).



          One library that can help with displaying custom web resources in D365 is Alert.js, though as the documentation says, it's unsupported.



          If you want to include some backend operations as part of the custom UI, you can create custom actions and call them from the custom web resource's JavaScript.






          share|improve this answer


























          • @Arun : Sir,You mean I should create a UI with HTML/CSS and JS. And then call a custom action.In my case, I need the quote product categories guid and name. I should pass them from the quote to the custom html/css. ( as I see in your link,It accept these two fields ) Can I create A js function that do my work, and placed it in the CRM as web resource, call the JS function when press apply button on the HTML file and pass some parameter ( what user has selected and what precentage has entered ) to the form and that fucntion? In this way I can do this with no backend.

            – alireza azadi
            Jan 19 at 20:07













          • From within the custom web resource's JS you can query the system to get the information you want to display. Are you on v2011?

            – Aron
            Jan 22 at 2:49











          • @Arun : Yes, Im on 2011 on-premise.

            – alireza azadi
            Jan 22 at 5:32











          • TY. Microsoft still has the 2011 SDK available for download. It contains a bunch of sample code. You might want to look into using ...SampleCodeJSRESTEndpointJavaScriptRESTRetrieveMultipleJavaScriptRESTRetrieveMultipleScriptsSDK.REST.js to help you retrieve data.

            – Aron
            Jan 22 at 14:20














          0












          0








          0







          Plugins (and custom workflow assemblies) run as part of the backend platform. The only "UI" component they have is they run synchronously and throws an Exception, a popup will show that Exception to the user.



          The typical way to add custom UI components is via custom web resources.



          In custom web resources you can do HTML / JS / CSS, and even leverage 3rd party libraries such as KendoUI. You can add them to the form or open them via a ribbon button.



          A custom web resource can typically interact with the main Dynamics 365 form via the parent property (as the above linked article describes).



          One library that can help with displaying custom web resources in D365 is Alert.js, though as the documentation says, it's unsupported.



          If you want to include some backend operations as part of the custom UI, you can create custom actions and call them from the custom web resource's JavaScript.






          share|improve this answer















          Plugins (and custom workflow assemblies) run as part of the backend platform. The only "UI" component they have is they run synchronously and throws an Exception, a popup will show that Exception to the user.



          The typical way to add custom UI components is via custom web resources.



          In custom web resources you can do HTML / JS / CSS, and even leverage 3rd party libraries such as KendoUI. You can add them to the form or open them via a ribbon button.



          A custom web resource can typically interact with the main Dynamics 365 form via the parent property (as the above linked article describes).



          One library that can help with displaying custom web resources in D365 is Alert.js, though as the documentation says, it's unsupported.



          If you want to include some backend operations as part of the custom UI, you can create custom actions and call them from the custom web resource's JavaScript.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 19 at 16:01

























          answered Jan 19 at 13:21









          AronAron

          2,14521019




          2,14521019













          • @Arun : Sir,You mean I should create a UI with HTML/CSS and JS. And then call a custom action.In my case, I need the quote product categories guid and name. I should pass them from the quote to the custom html/css. ( as I see in your link,It accept these two fields ) Can I create A js function that do my work, and placed it in the CRM as web resource, call the JS function when press apply button on the HTML file and pass some parameter ( what user has selected and what precentage has entered ) to the form and that fucntion? In this way I can do this with no backend.

            – alireza azadi
            Jan 19 at 20:07













          • From within the custom web resource's JS you can query the system to get the information you want to display. Are you on v2011?

            – Aron
            Jan 22 at 2:49











          • @Arun : Yes, Im on 2011 on-premise.

            – alireza azadi
            Jan 22 at 5:32











          • TY. Microsoft still has the 2011 SDK available for download. It contains a bunch of sample code. You might want to look into using ...SampleCodeJSRESTEndpointJavaScriptRESTRetrieveMultipleJavaScriptRESTRetrieveMultipleScriptsSDK.REST.js to help you retrieve data.

            – Aron
            Jan 22 at 14:20



















          • @Arun : Sir,You mean I should create a UI with HTML/CSS and JS. And then call a custom action.In my case, I need the quote product categories guid and name. I should pass them from the quote to the custom html/css. ( as I see in your link,It accept these two fields ) Can I create A js function that do my work, and placed it in the CRM as web resource, call the JS function when press apply button on the HTML file and pass some parameter ( what user has selected and what precentage has entered ) to the form and that fucntion? In this way I can do this with no backend.

            – alireza azadi
            Jan 19 at 20:07













          • From within the custom web resource's JS you can query the system to get the information you want to display. Are you on v2011?

            – Aron
            Jan 22 at 2:49











          • @Arun : Yes, Im on 2011 on-premise.

            – alireza azadi
            Jan 22 at 5:32











          • TY. Microsoft still has the 2011 SDK available for download. It contains a bunch of sample code. You might want to look into using ...SampleCodeJSRESTEndpointJavaScriptRESTRetrieveMultipleJavaScriptRESTRetrieveMultipleScriptsSDK.REST.js to help you retrieve data.

            – Aron
            Jan 22 at 14:20

















          @Arun : Sir,You mean I should create a UI with HTML/CSS and JS. And then call a custom action.In my case, I need the quote product categories guid and name. I should pass them from the quote to the custom html/css. ( as I see in your link,It accept these two fields ) Can I create A js function that do my work, and placed it in the CRM as web resource, call the JS function when press apply button on the HTML file and pass some parameter ( what user has selected and what precentage has entered ) to the form and that fucntion? In this way I can do this with no backend.

          – alireza azadi
          Jan 19 at 20:07







          @Arun : Sir,You mean I should create a UI with HTML/CSS and JS. And then call a custom action.In my case, I need the quote product categories guid and name. I should pass them from the quote to the custom html/css. ( as I see in your link,It accept these two fields ) Can I create A js function that do my work, and placed it in the CRM as web resource, call the JS function when press apply button on the HTML file and pass some parameter ( what user has selected and what precentage has entered ) to the form and that fucntion? In this way I can do this with no backend.

          – alireza azadi
          Jan 19 at 20:07















          From within the custom web resource's JS you can query the system to get the information you want to display. Are you on v2011?

          – Aron
          Jan 22 at 2:49





          From within the custom web resource's JS you can query the system to get the information you want to display. Are you on v2011?

          – Aron
          Jan 22 at 2:49













          @Arun : Yes, Im on 2011 on-premise.

          – alireza azadi
          Jan 22 at 5:32





          @Arun : Yes, Im on 2011 on-premise.

          – alireza azadi
          Jan 22 at 5:32













          TY. Microsoft still has the 2011 SDK available for download. It contains a bunch of sample code. You might want to look into using ...SampleCodeJSRESTEndpointJavaScriptRESTRetrieveMultipleJavaScriptRESTRetrieveMultipleScriptsSDK.REST.js to help you retrieve data.

          – Aron
          Jan 22 at 14:20





          TY. Microsoft still has the 2011 SDK available for download. It contains a bunch of sample code. You might want to look into using ...SampleCodeJSRESTEndpointJavaScriptRESTRetrieveMultipleJavaScriptRESTRetrieveMultipleScriptsSDK.REST.js to help you retrieve data.

          – Aron
          Jan 22 at 14:20


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54265779%2fsolution-to-raise-the-amount-of-products-quotedetails-or-quoteproducts-in-quot%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Homophylophilia

          Updating UILabel text programmatically using a function

          Cloud Functions - OpenCV Videocapture Read method fails for larger files from cloud storage