Error on starting report

Red-Eagle
Member Posts: 107
My report for the purchase order give the following error:
The expression code cannt excuted a typeconversion to an option value.
The line which is causing this is:
IF relkenmerk.GET("Purchase Header"."Job No.") THEN;
relkenmerk is the table "Contact Feature Type"
i want to connect Contact Feature Type.Code with the purchase header. this fields has to match because i want to use the remarks which is in this table.
What i am doing wrong
The expression code cannt excuted a typeconversion to an option value.
The line which is causing this is:
IF relkenmerk.GET("Purchase Header"."Job No.") THEN;
relkenmerk is the table "Contact Feature Type"
i want to connect Contact Feature Type.Code with the purchase header. this fields has to match because i want to use the remarks which is in this table.
What i am doing wrong
0
Answers
-
what is the primary key in Contact Feature Type and field types?0
-
The keys are:
Relation Type,Code,Line No.
Relation Type,Code,Feature Group,Feature
Relation Type,Feature Group,Feature,Code0 -
Then you cant simply use get
userelkenmerk.RESET; relkenmerk.SETRANGE(Code,"Purchase Header"."Job No."); IF relkenmerk.FINDFIRST THEN;
0 -
I still get a error. Now it is saying A field of a recordvariable is expected
I don't hope i need to set a jobnr there, want that is every time different.
My code so far, with your advice:
IF "Purchase Header"."Buy-from Vendor No." = 'L1134' THEN BEGIN
relkenmerksoort.RESET;
relkenmerksoort.SETRANGE("Purchase Header"."Job No.");
IF relkenmerksoort.FINDFIRST THEN;
"Purchase Header"."Your Reference" := relkenmerksoort.Remarks;
END;0 -
Red-Eagle wrote:I still get a error. Now it is saying A field of a recordvariable is expected
I don't hope i need to set a jobnr there, want that is every time different.
My code so far, with your advice:
do you have "Job No." field in Purchase Header table?
if yes,
is your code same as what i suggested?Red-Eagle wrote:relkenmerksoort.SETRANGE("Purchase Header"."Job No.");0 -
Hmm, :oops: I am very sorry. I did make mistake. I did not put "code," in the line.
But your option is working. I thank you very much!0 -
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions