Hi,
We are using Navision 2009 SP1 SG Version. In our sales orders, there is a small customization. Navision in standard terms allows to create Shipment Documents and generates Invoice only when we post the order, but here we have a small function called, Generate Shipment and Invoice Number even before the sales order is getting posted in Navision.
Now, some times the users are deleting orders from system which are creating gaps in our number series for posted sales shipments and posted sales invoices, the reason for this, once i have a sales order, i click functions and generate shipment number and invoice number, then i want to delete sales order by pressing F4, nav says deleting this would cause a gap in number series and etc
I want to block this deletion, means I want to tell sales orders that once there is any Shipment number and invoice number already generated then do not allow the user to delete the order with a check mar in user setup, so how to do it or is there any other simple way of doing it
Regards
KH
0
Comments
Example :- Item table , Ondelete tigger
If there is any ILE you can not delete Item.
Hope this will help.
Can you write the code in detail for me as I am a functional guy who doesnt know much about programming terms. I am just trying to help my client with this.
Regards
KH
On the Sales Header Table add it to OnDelete trigger.
something like
if ("Posting No." <>'') and ("Shipping No." <>'') then
Error('You can not delete order %1. Posting & Shipping Numbers Exist!',"No.");
http://www.BiloBeauty.com
http://www.autismspeaks.org
By the way, your client can't do this without a developer license.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
I have developer License and I can change the license only for that session and then can follow your code but only if you tell me on which table and which area to write the code
Regards
KH
In that case it is best to call a tech guy instead of you messing around with forum support. Since the forum members don't have access to your database, all of them will be make guess.
Remember "Little knowledge is more dangerous".
I am not messing up with anything! I have always tested in my local first b4 I apply change to live!
Regards
KH
http://www.BiloBeauty.com
http://www.autismspeaks.org