Value Retreival
Sankaran_Balasubramonian
Member Posts: 20
Hi Sirs,
I am trying to retrieve values based on a field. I have a form which has the PO Number as one of the fields. My requirement is when I select the PO from this fields I need to get the PO date to be filled in the form. I wrote a code for this. I am here by attaching the code below.
IF porecord.GET("PO Number")
THEN BEGIN
"PO Date" := porecord."Order Date";
END;
The code is compiling properly but I am getting an error message as follows when I run the form.
"The Expression Code Cannot be Type - Converted to a Option Value."
Please advice as to what needs to be done to correct this.
Thanks
Balaji
I am trying to retrieve values based on a field. I have a form which has the PO Number as one of the fields. My requirement is when I select the PO from this fields I need to get the PO date to be filled in the form. I wrote a code for this. I am here by attaching the code below.
IF porecord.GET("PO Number")
THEN BEGIN
"PO Date" := porecord."Order Date";
END;
The code is compiling properly but I am getting an error message as follows when I run the form.
"The Expression Code Cannot be Type - Converted to a Option Value."
Please advice as to what needs to be done to correct this.
Thanks
Balaji
--
Thanks & Best Regards
Sankaran Balasubramonian
Thanks & Best Regards
Sankaran Balasubramonian
0
Comments
-
Table 38 has as primary key "Document Type","No.".
Document type is an option indicated if the record is an order,invoice,quote,credit memo,...
So you should write:IF porecord.GET(porecord."Document Type"::Order,"PO Number") THEN BEGIN "PO Date" := porecord."Order Date"; END;
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thanks a lot Kriki...It worked....
I have another qstn.
How do we set in coding the Number seriries...for a particulare field
Balaji--
Thanks & Best Regards
Sankaran Balasubramonian0 -
When you check with the Customer or Sales Header table C/AL coding part, you can find the function called AssistEdit(xRec).
This fucntion has the coding part to assign Numbering series value.
As well check the Sales Order form (42) for the below,
In OnAssistEdit() trigger of the 'No.' field, the function AssistEdit(xRec) is called.
Check using the same method or Try write own coding under the OnAssistEdit() trigger of your field in the form.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions