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. SDH_TableExt_50001_SalesInvoiceHeaderExt.al & 
  2. SDH_TableExt_50002_SalesShipmentHeaderExt.al 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.

Regards,
Saurav Dhyani
www.sauravdhyani.com

Comments

  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?

    ReplyDelete
    Replies
    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.

      Delete

Post a Comment

Popular posts from this blog

Welcome - Microsoft Dynamics 365!

Hi All, In this article we will discuss the new introduced member of Dynamics Family. Yes you heard it correctly, one more new member with Name "Microsoft Dynamics 365" . #ProjectMadeira   #Dynamics365

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 - 

MSDYN365BC - Data Upgrade To Microsoft Dynamics 365 Business Central on premises.

Hi Readers, We have already talked about the number of steps for upgrading to Business Central on Premises from different NAV versions. After that article, I received multiple requests for an article which list down steps for Data Migration. In this article, we will discuss steps of data migration to MSDYN365BC (on-Prem) from NAV 2017. For this article, I am considering a Cronus Demo Database without any customization. For an actual upgrade project, we will have to complete object merge using compare and Merge process. After the Merge Process, the next step is data migration. Let's discuss those steps. Direct Upgrade to Microsoft Dynamics 365 Business Central (on-Prem) is from following versions - 1. NAV 2015. 2. NAV 2016. 3. NAV 2017. 4. NAV 2018.