Closed bdgjope closed 1 year ago
Are you on the latest version of the ToolBox, I fixed a few out-of-bounds issues lately?
According to my Environment I am up to date. Version 1.0.0.164.
OK, I'll take a look, stay tuned.
Bug identified, if you put the option field as the last parameter it might just work.
I'll submit an update to appsource real soon.
I can report that putting the option as the last parameter did not solve the issue.
Try updating to the latest version from AppSource
This particular issue seems to be fixed in the latest version. I did however get an other error that I am not sure if it should work or not. I am trying to set an enum field. Maybe that is not supported? I checked and there is no Validation code on the field so the error is not due to that. I have double checked that I set the right numbers.
The strange thing here is that line 31 seems to work fine. So I tried to remove the line that caused the error. Then it seemingly ran to the end, before the error in the second image showed up.
This is probably related, the other error was also a "ByReference" issue... I'll take a look later today.
Hmm.. seems there was an enum vs option confusion thing going on (Enums are actually options behind the scenes), try updating (I just posted version 1.0.0.169) and try it again....
I tried the new version now and I am sorry to report that I am still getting the same error (well CacheNo:2 this time).
Anyway, I have published this code in an app for now, so there is no rush for me to get this error fixed
Weird, I cannot reproduce it (with 1.0.0.169)
Can you boil the code down to a minimal example and post the code here?
This is a weird error. I removed as much code as I could and still get the error. This is what I ended up with. If I remove the variable from the procedure I don't get the error. I changed the variable to one in from Base instead of LS Central.
var OptType: Option Negative,Counting,LabelJnl,Positive; begin InsertStoreInvWorkSheet(OptType::LabelJnl); end;
procedure InsertStoreInvWorkSheet(OptType: Option Negative,Counting,LabelJnl,Positive) var SalesHeader: record "Sales Header"; begin end;
Thanks, I know the issue now, will fix later today :)
Hi Why am I getting an Index Out of Bounds error on this code:
If I comment out the call to InsertStoreInvWorksheet it works. So it has something to do with the Option. It does not matter if I call with a number or optionvalue. (I removed the code from the procedure to eliminate that the error came from somewhere in there).
By the way, does it work to set a field in a table that is a enum, if you set it as a number? Even if enum is not a supported type in the toolbox? Thanks in advance