How does Navision detect different document types?

cunnycunny Member Posts: 129
Hey guys,

Recently, I have a requirement from customer which is similar to Sales Order No. series, the Document No. should be assigned automatically by Navision according to different document type. On sales header table there are 6 different document types and each time when we create a new document on Sales Order, Sales Invoice, Credit memo,etc... System can decide which document type should be the right one. Once document type can be assigned system can find the right No. Series Code and generate the new document no. For me the problem is not about generating a new document no. according to a No. series Code, the problem is I have no idea when and where I can specify the right document type on different forms without user interaction. Where is the code or setup for Navision to manage this?

I run out of idea with a whole day's tracing and code coverage.

Any idea

Best regards,
cunny Lee
MCP - MBS Navision
jle@naviworld.com

Answers

  • ssinglassingla Member Posts: 2,973
    Document Type is filtered at the form level. See the properties of the form and see the property "SourceTableView".
    CA Sandeep Singla
    http://ssdynamics.co.in
  • NaviDevNaviDev Member Posts: 365
    Try to search the GetNoSeriesCode function in the sales header table, and you will see how.
    Navision noob....
  • kinekine Member Posts: 12,562
    Because the form is filtered to one specific value on field from primary key, NAV will automatically fill this field when new record is created within the form. This is what you are searching for. There is no C/AL code for that...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • cunnycunny Member Posts: 129
    Thanks guys,

    I have run a little test, Kine is right. This is about some basic rules of Navision, no coding involved.

    Have a good day
    cunny Lee
    MCP - MBS Navision
    jle@naviworld.com
Sign In or Register to comment.