web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Modify a base procedure

(0) ShareShare
ReportReport
Posted on by 20

Greetings to all of you!

Two customers of mine , need to be able to create a new sales quote for a customer whose Blocked Status is All.


The one has BC (cloud version ) and the other has Dynamics NAV ( on-prem).

I noticed that the whole procedure which permit the opening of a new sales document ,when a customer is blocked , is here : 

pastedimage1638356616276v1.png

Ideally, i would like to modify this base procedure and remove the part of DocType = Quote. 
As far as i understand , this can't be possible when BC comes as a SaaS. Due to that , i can;t modify the base code on my customer which runs on cloud. Any other solution?
How about the one who has NAV on prem? Is it possible to modify the base code?


I dont have a lot of experience when it comes to development, so , any help will be greatly appreciated.

Thank you in advance for your time.

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

    Thanks.

  • Suggested answer
    JAngle Profile Picture
    133 on at

    The first part of the procedure is your chance to skip the check. That applies to both platform types. Given it is an event subscriber you skip the standard check but write your own. This way you can have your logic but maintain some of the standard aspects

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    Technically it is possible to change the base application code if you are running BC on-prem but it is not recommended to do so.

    What you should do is to find and integration event to use so you can modify the business logic through that.

    In the case you have you should look at this integration even that is on the sales header table:

    [EventSubscriber(ObjectType::Table, Database::"Sales Header", 'OnValidateBillToCustomerNoOnBeforeCheckBlockedCustOnDocs', '', false, false)]
          local procedure OnValidateBillToCustomerNoOnBeforeCheckBlockedCustOnDocs(var SalesHeader: Record "Sales Header"; var Cust: Record Customer; var IsHandled: Boolean);
          begin
          end;
    Then you can put your own logic in and return IsHandeled like true that will make the base app handling not to be executed.
    Hope this helps you.
  • CU19090633-0 Profile Picture
    4 on at

    To remove or change the part of the procedure related to DocType = Quote, you would subscribe to the appropriate events (such as OnBefore or OnAfter events) in the procedure and modify its behavior in the extension.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,606

#2
YUN ZHU Profile Picture

YUN ZHU 931 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 773 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans