Why doesn't this work in dataport for Sales Header
VALIDATE ("Document Type", GETFILTER ("Document Type"));?
The error
Type conversion is not possible because 1 of the operators contains an invalid type
Option := Text
What should the correct syntax be?
Thanks
NAV - Norton Anti Virus
ERP Consultant (not just Navision) & Navision challenger
0
Answers
be smart before being a clever.
So how to convert Text datatype to Option datatype?
ERP Consultant (not just Navision) & Navision challenger
Text datatype: vtempTextopt
option Datatype: vtexttoopt
vtempTextopt := GETFILTER("Document Type");
IF EVALUATE(vtexttoopt,vtempTextopt) THEN begin
VALIDATE("Document Type",vtexttoopt);
be smart before being a clever.
Was playing with evaluate but could quite get the syntax right.
Thanks
Another question
Can I assign a datatype Option variable OptionString options?
DocType.OptionString := SalesHeader."Document Type".OptionString?
ERP Consultant (not just Navision) & Navision challenger
IF "Type" = 'G/L Account' THEN
"50025" = ''
ELSE
ItemInfo.GET("No.")
50025 is the ID for the text box where the value is displayed, and it is used for pulling in the Base unit of measure from the item card onto the order. Source Expression is: ItemInfo."Base Unit of Measure"
I am probably doing it wrong, but the problem I was originally trying to avoid with that code was related to me just using:
ItemInfo.GET("No.") and it would not allow me to print any PO with a GL account directly referenced on a line. Also when I make an order from a blanket order it returns the error, "Item Number " Does not Exist, but the item is definitely in the system under that number. It also prints just fine when the same order is created through POs and not Blanket Orders.
Any assistance would be appreciated.
because type is an option string.
However, the rest of your code is a little garbled as well. You will want to set the source expressions of text box 50025 to a variable.
Then set the variable to = '' if it's not an item, or the value from your iteminfo if it's an item. Just checking for g/l accounts may not be enough
Alternatively, you could do this: in which case the value of Type is convered to a text
RIS Plus, LLC
MVP - Business Apps
IF Type <> Type::Item THEN
CLEAR(ItemInfo)
ELSE
ItemInfo.GET("No.")
with ItemInfo."Base Unit of Measure" as the source code for the Textbox on the report and it is working perfectly now.
Thank you both for the help.