Newbie: Problems Showing Purchase Header Date

stoocakestoocake Member Posts: 32
edited 2006-01-23 in Navision Attain
I'm trying to show the Order Date from the Purchase Header table in a form based on the Purchase Line table. Using the following code I get an error: "The expression Code cannot be type converted to a Option Value"
If PurchaseHeader.GET(PurchaseHeader."No.") THEN
  HeaderDate := PurchaseHeader."Order Date";

If I try
If PurchaseHeader.GET(PurchaseHeader."No."::"Document No.") THEN
  HeaderDate := PurchaseHeader."Order Date"; 

...I get "The text 'Document' is too long. The text in code fields can have a maximum length of 2 characters"

What am I doing wrong?
Thanks in advance for the help.

Comments

  • krikikriki Member, Moderator Posts: 9,112
    you should do this:
    If PurchaseHeader.GET(PurchaseLine."Document Type",PurchaseLine."No.") THEN
      HeaderDate := PurchaseHeader."Order Date";
    
    -first the document type, then the no.
    -use the purchaseline and not the header as a parameter (this doesn't give your error)
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.