An error occures when doing the following:
- Open a standard CRONUS database in Navision 5.0 SP1
- Create a new company
- Select a company type
- After clicking Ok data will be imported and applied
- When applying data the following error occures:
The value General,Sales,Purchaes,Cash Receipts,
Payments,Assets,Intercompany,Jobs,,,,Cash,Bank for
SELECTSTR parameter no. 2 is not valid.
This happens at the following line (function Texttooptionvalue in codeunit 5302) when counter has the value 9:
IF UPPERCASE(SELECTSTR(Counter,OptionString)) = UPPERCASE(InputText) THEN
Is there a fix for this?
Thanks in advance.
0
Answers
Anyone in the netherlands able to try this out?
Ian
Ian
to
SELECTSTR() does not work correctly with empty options. Seems like you have some empty ("Opt1,Opt2,,Opt4") option values. It's the same with the german version.
Not checked if it works with multiple missing values.
Carsten
==> How To Ask Questions The Smart Way
This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
The solution doesn't work because a option value may occure just 1 time.
The following code can help with this:
Field.Type::Option:
BEGIN
OptionText := FieldRef.OPTIONCAPTION;
OptionValue := 0;
WHILE STRPOS(OptionText,',,') > 0 DO BEGIN
OptionValue := OptionValue + 1;
OptionText := INSSTR(OptionText,FORMAT(OptionValue),
STRPOS(OptionText,',,')+1);
END;
IntVar := TextToOptionValue(InputText,OptionText);
IF IntVar = -1 THEN
EXIT(FALSE);
Error occurs when importing the XML with defaults. Nav is creating Gen. Journal Templates. The XML is not specific dutch, the code in Table 80 is.
Field Type in Table 80 has the following Option String:
General,Sales,Purchases,Cash Receipts,Payments,Assets,Intercompany,Jobs,,,,Cash,Bank
The string ",,,,Cash,Bank" is added.
Do not change the Option Sting! This will give errors in other places of the application.
Try to us the following temp workaround:
Add code to Codeunit 5302 temporary.
This seems like a bug for the Microsoft Team to me!