Skip to main content

MSDYN365BC - AL Development 08 - Republish and Testing Extension.

Hi Readers,

I hope you all are following this series and followed and completed what we have discussed till now.

If you are new to this then Please Refer Table of Index.

Second Last part of this extension is about Republishing the updated Extension and Testing the Process.

As you can in the screenshot below my different object Types have been grouped in respective folders.

Lets now try to re-publish our extension and then we will continue adding building our extension to meet customer requirements.

Now let's try to Publish Extension - Using Keyboard Press F5. The Output and Debug Console should like as below. VS Code will automatically update the ".app" file.

With this, the extension (app) is updated and published. Now we will test the process.

Using the Tell me Icon, as shown below search for Source of Sales and Key in few Source of Sales Master data.

Test Case 1 - What happens if the user does not select a value for Source of Sales?

Test Scenario - Create a Sales order without keying Source of Sales and try to Post the Sales Order.

Expected Results - Error while posting Sales order.

Test Result - PASS.

Test Case 2 - If Source of Sales in specified in sales order, after posting the Source of sales should be available in Posted Sales Invoices, Posted Sales Shipment and Item Ledger Entries.

Test Scenario - Create a Sales order with Source of Sales and Check Posted Documents and Item Ledger.

Expected Results - Non Editable Value should be available in Posted Sales Invoices, Posted Sales Shipment and Item Ledger Entries.

1. Sales Order with "Source of Sales".

2. Posted Sales Invoice.

3. Posted Sales Shipment.

4. Item Ledger Entries.

Test Result - Partial PASS.

With Test Case 2, We found that value is available in all ledger entries as expected but the field "Source of Sales" is editable in Posted Sales Invoices and Posted Sales Shipment Which is WRONG.

Let's quickly fix it.

Open VS Code and Edit -

  1. & 
  2. as shown below. 

We need to set editable false for the field that we added.

Re-publish the extension and open posted sales invoice and posted sales shipment again to verify Testing Result.

So we have Publish - Test - Fix - Publish - Test in this article.

Next article, we will see how to build a Report in AL which is the last part of customer requirements. Stay Tuned for more and please add comments if any questions/suggestions.

Saurav Dhyani


  1. As always Great article.

    I noticed that the "SOURCE OF SALES" was filled up with a value(Tweet) for not just the posted sales shipment, post sales invoices and item ledger entries of the sales order I Posted. The "SOURCE OF SALES" had a value for all other past transactions that was already posted in the Demo NAV DB. Is this normal?

    1. Hi,
      You might have renamed a Blank record in the Table. Try Deleting that record (Tweet) and then create new.
      Dont keep code Blank as its a valid value in NAV.


Post a Comment

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

BC 21 and Higher - PowerShell Cmdlet (Replacement of Business Central Administration).

Hi Readers, As discussed in last article about deprecating of Business Central Administration, there are few common actions that we use in administration till Business Central 20. For our on-prem customers, we will still require doing activities. As Microsoft suggest we need to start using PowerShell cmdlet.    Let's see how to do those via PowerShell, or Administration Shell. I will be keep adding commands as you comment to this article.

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing -