Question on Overriding a method in Customization





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















What if I override a method on a particular screen.

For example: let's say Journal Transactions Screen, I've overridden the method Release(), I've made it to stop Posting Transactions on the General Ledger with that customization applied, when releasing a document on a screen that produces Journal Transaction Documents that also triggers auto-release, will the customization, the overriden method, will apply first?










share|improve this question





























    0















    What if I override a method on a particular screen.

    For example: let's say Journal Transactions Screen, I've overridden the method Release(), I've made it to stop Posting Transactions on the General Ledger with that customization applied, when releasing a document on a screen that produces Journal Transaction Documents that also triggers auto-release, will the customization, the overriden method, will apply first?










    share|improve this question

























      0












      0








      0








      What if I override a method on a particular screen.

      For example: let's say Journal Transactions Screen, I've overridden the method Release(), I've made it to stop Posting Transactions on the General Ledger with that customization applied, when releasing a document on a screen that produces Journal Transaction Documents that also triggers auto-release, will the customization, the overriden method, will apply first?










      share|improve this question














      What if I override a method on a particular screen.

      For example: let's say Journal Transactions Screen, I've overridden the method Release(), I've made it to stop Posting Transactions on the General Ledger with that customization applied, when releasing a document on a screen that produces Journal Transaction Documents that also triggers auto-release, will the customization, the overriden method, will apply first?







      acumatica acumatica-kb






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 4 at 9:23









      EdsEds

      998




      998
























          1 Answer
          1






          active

          oldest

          votes


















          1














          From what I've seen, extensions are called first followed by base calls.
          If you think the call order ambiguity might lead to errors with your specific code in the handler I'd recommend to explicitly declare and call the base method in the overridden method.



          Using Acumatica customization project editor is the easiest way to get the declaration syntax down:
          enter image description here



          That way there's no doubt with the calling order:



          public delegate IEnumerable ReleaseDelegate(PXAdapter adapter);

          [PXOverride]
          public IEnumerable Release(PXAdapter adapter, ReleaseDelegate baseMethod)
          {
          // Put your code before calling base
          return baseMethod(adapter);

          /* Or after calling base

          IEnumerable returnValue = baseMethod(adapter);
          // put your code to be executed after base here

          return returnValue;
          */
          }





          share|improve this answer
























          • actually, I tried my solution, it seems that when I customize the screen business logic, it applies to all.

            – Eds
            Jan 7 at 8:06












          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%2f54036098%2fquestion-on-overriding-a-method-in-customization%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









          1














          From what I've seen, extensions are called first followed by base calls.
          If you think the call order ambiguity might lead to errors with your specific code in the handler I'd recommend to explicitly declare and call the base method in the overridden method.



          Using Acumatica customization project editor is the easiest way to get the declaration syntax down:
          enter image description here



          That way there's no doubt with the calling order:



          public delegate IEnumerable ReleaseDelegate(PXAdapter adapter);

          [PXOverride]
          public IEnumerable Release(PXAdapter adapter, ReleaseDelegate baseMethod)
          {
          // Put your code before calling base
          return baseMethod(adapter);

          /* Or after calling base

          IEnumerable returnValue = baseMethod(adapter);
          // put your code to be executed after base here

          return returnValue;
          */
          }





          share|improve this answer
























          • actually, I tried my solution, it seems that when I customize the screen business logic, it applies to all.

            – Eds
            Jan 7 at 8:06
















          1














          From what I've seen, extensions are called first followed by base calls.
          If you think the call order ambiguity might lead to errors with your specific code in the handler I'd recommend to explicitly declare and call the base method in the overridden method.



          Using Acumatica customization project editor is the easiest way to get the declaration syntax down:
          enter image description here



          That way there's no doubt with the calling order:



          public delegate IEnumerable ReleaseDelegate(PXAdapter adapter);

          [PXOverride]
          public IEnumerable Release(PXAdapter adapter, ReleaseDelegate baseMethod)
          {
          // Put your code before calling base
          return baseMethod(adapter);

          /* Or after calling base

          IEnumerable returnValue = baseMethod(adapter);
          // put your code to be executed after base here

          return returnValue;
          */
          }





          share|improve this answer
























          • actually, I tried my solution, it seems that when I customize the screen business logic, it applies to all.

            – Eds
            Jan 7 at 8:06














          1












          1








          1







          From what I've seen, extensions are called first followed by base calls.
          If you think the call order ambiguity might lead to errors with your specific code in the handler I'd recommend to explicitly declare and call the base method in the overridden method.



          Using Acumatica customization project editor is the easiest way to get the declaration syntax down:
          enter image description here



          That way there's no doubt with the calling order:



          public delegate IEnumerable ReleaseDelegate(PXAdapter adapter);

          [PXOverride]
          public IEnumerable Release(PXAdapter adapter, ReleaseDelegate baseMethod)
          {
          // Put your code before calling base
          return baseMethod(adapter);

          /* Or after calling base

          IEnumerable returnValue = baseMethod(adapter);
          // put your code to be executed after base here

          return returnValue;
          */
          }





          share|improve this answer













          From what I've seen, extensions are called first followed by base calls.
          If you think the call order ambiguity might lead to errors with your specific code in the handler I'd recommend to explicitly declare and call the base method in the overridden method.



          Using Acumatica customization project editor is the easiest way to get the declaration syntax down:
          enter image description here



          That way there's no doubt with the calling order:



          public delegate IEnumerable ReleaseDelegate(PXAdapter adapter);

          [PXOverride]
          public IEnumerable Release(PXAdapter adapter, ReleaseDelegate baseMethod)
          {
          // Put your code before calling base
          return baseMethod(adapter);

          /* Or after calling base

          IEnumerable returnValue = baseMethod(adapter);
          // put your code to be executed after base here

          return returnValue;
          */
          }






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 4 at 15:19









          HB_ACUMATICAHB_ACUMATICA

          4,5331412




          4,5331412













          • actually, I tried my solution, it seems that when I customize the screen business logic, it applies to all.

            – Eds
            Jan 7 at 8:06



















          • actually, I tried my solution, it seems that when I customize the screen business logic, it applies to all.

            – Eds
            Jan 7 at 8:06

















          actually, I tried my solution, it seems that when I customize the screen business logic, it applies to all.

          – Eds
          Jan 7 at 8:06





          actually, I tried my solution, it seems that when I customize the screen business logic, it applies to all.

          – Eds
          Jan 7 at 8:06




















          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%2f54036098%2fquestion-on-overriding-a-method-in-customization%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

          Monofisismo

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas