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

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    ---------------------------

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.

Error After Restore SQL Backup of NAV 2013 Database

Hi all, we are facing a conman issue during restoring a SQL Database backup restored for NAV 2013. While Trying to run object from Object Designer we get below listed error (even the service is configured properly) - --------------------------- Microsoft Dynamics NAV Development Environment --------------------------- There are no NAV Server instances available for this database. You must ensure that a NAV Server instance is running and is configured to use the database before you perform this activity. --------------------------- OK    ---------------------------