Customize Post StrMenu or Dialog option at the time of Sales Posting in D365 BC

Customize Post StrMenu or Dialog option at the time of Sales Posting in D365 BC:

(1) In this blog, we will make an extension to change the menu or dialog option at the time of Sales Order Posting or Sales Return Order Posting. 

(2) First, we will open Sales Order Document and Press Post Button (Shortcut Key F9) as shown. 

open Sales Order Document and click on ship and invoice

(3) In the above image, the standard system shows the menu in this sequence. “Ship, Invoice & Ship and Invoice”. If you want to change option sequence, name and visibility, then follow the below steps.

Change Sequence of Options:
  • Create a new extension and call the “OnBeforeConfirmSalesPost” event, as shown.
OnBeforeConfirmSalesPost Code
  • After that create a new function for changing the sequence of options, as shown.
Code for sequence of option change in d365 bc
for changing the sequence of options
  • After doing the above steps, publish the extension and see the result, as shown.
Sales Posting Option sequence change
Changing the Name of Options:
  • Create a new extension and call the “OnBeforeConfirmSalesPost” event, as shown.
OnBeforeConfirmSalesPost Code
  • After that create a new function for changing the name of options, as shown.
change the name of option for sales posting in d365 bc
create a new function code
  • After doing the above steps, publish the extension and see the result, as shown.
Name of Options changes for sales posting
Hide Options:
  • For this create a new extension and call the “OnBeforeConfirmSalesPost” event, as shown.
Call OnBeforeConfirmSalesPost
  • After that create a new function for hiding options, as shown.
create a new function for hiding options
create a new function code
  • After doing the above steps, publish the extension and see the result, as shown.
option hide in sales posting

(4) For Sales Return, follow the same steps and change the “ReceiveInvoiceQst” caption.

change ReceiveInvoiceQst caption for For Sales Return,

Add New Field in Field Group (DropDown Controls) in D365 BC
Auto Vendor Payment Creation from Vendor Ledger Entries in D365 BC
Correct or Cancel a Posted Purchase Invoice in D365 BC
How to Create JSON file in AL for D365 BC
Posting Sales– Microsoft Docs

Leave a Reply