Help with report and multiple tables using a GET

boku25boku25 Member Posts: 39
edited 2005-04-28 in Navision Attain
Global Variables
SH Record Sales Header

OnAfterGetRecord
SH.GET("Document Type","Document No.")

In the Report field
SH."Order Date"


I am trying to use another table in the report. But I get an error
The Sales Header does not exist. Identication fields and values.
Document Type = 'Invoice', 'No.' = '106033'

can someone help, Iam not sure why this isn't working?

Help

Boku25 :shock:

Comments

  • SavatageSavatage Member Posts: 7,142
    are you confusing Sales Header & Sales Invoice Header?
  • DenSterDenSter Member Posts: 8,307
    if you do SH.GET with certain values, and the record with those values doesn't exist, then you'll get that error. Fortunately for you, the GET method has a boolean return value, so if you want to make it so your report doesn't error out, you can do this
    IF NOT SH.GET THEN BEGIN
      Message('couldn't find the record');
      // or any other code you'd like to put here
    END;
    

    hth
Sign In or Register to comment.