Options

NAS Posting

Betrachter84Betrachter84 Member Posts: 62
hi

im running purchase and direct order shipments posting with nas. Usually this works well, but sometimes the system loggs an error saying a dialog variable can't be used with NAS. This error appears whil posting a receipt with serial no's.

I've "cleaned" codeunits 80,90 and 6500 by adding IF GUIALLOWED THEN ... in front of every dialog variable. Somewhere i must have missed one.

Has somebody done the same thing and could tell me which codeunits i need to clean as well?

Thanks for any tips!

Comments

  • Options
    kinekine Member Posts: 12,562
    If I remmember correctly, somewhere in the code the form variable is used to call functions from the form, even when the form is not displayed. I think it was using the form for entering Item Tracking.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    Betrachter84Betrachter84 Member Posts: 62
    exactly, the form variable was another problem. i had to copy the whole code from the form into the item tracking codeunit to make it work. before it throwed an error that it can't use form variables with nas, what makes sense in my opinion.

    it mus be somewhere else though...
  • Options
    thegunzothegunzo Member Posts: 274
    I have also replaced the USERID in the posting codeunits with a function from a single instance codeunit. I replace USERID with UserMgt.GetUserID and before starting the posting task I use UserMgt.SetUserID("Job Queue Entry"."User ID") and after the posting finishes I call UserMgt.SetUserID('')


    GetUserID() : Code[20]
    IF InstanceUserID = '' THEN
    EXIT(USERID)
    ELSE
    EXIT(InstanceUserID);

    SetUserID(NewUserID : Code[20])
    InstanceUserID := NewUserID;
    ________________________________
    Gunnar Gestsson
    Microsoft Certified IT Professional
    Dynamics NAV MVP
    http://www.dynamics.is
    http://Objects4NAV.com
  • Options
    SogSog Member Posts: 1,023
    Is inventory directly posted and valued? (not the revaluate report)
    That also shows a dialog, codeunit is 5895
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • Options
    Betrachter84Betrachter84 Member Posts: 62
    thegunzo wrote:
    I have also replaced the USERID in the posting codeunits with a function from a single instance codeunit. I replace USERID with UserMgt.GetUserID and before starting the posting task I use UserMgt.SetUserID("Job Queue Entry"."User ID") and after the posting finishes I call UserMgt.SetUserID('')


    GetUserID() : Code[20]
    IF InstanceUserID = '' THEN
    EXIT(USERID)
    ELSE
    EXIT(InstanceUserID);

    SetUserID(NewUserID : Code[20])
    InstanceUserID := NewUserID;


    but this wouldn't solve the error i described above, correct? that's just in order to not posting with the NAS userid?
  • Options
    Betrachter84Betrachter84 Member Posts: 62
    Sog wrote:
    Is inventory directly posted and valued? (not the revaluate report)
    That also shows a dialog, codeunit is 5895

    yes inventory valuation is done always at the time of posting. so 5895 could be it actually, i'll try!

    Thanks!
Sign In or Register to comment.