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;
}
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
add a comment |
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
add a comment |
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
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
acumatica acumatica-kb
asked Jan 4 at 9:23
EdsEds
998
998
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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:
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;
*/
}
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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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:
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;
*/
}
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
add a comment |
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:
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;
*/
}
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
add a comment |
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:
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;
*/
}
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:
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;
*/
}
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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