Configurator UD Method - cant convert decimal to double

a UD method on a configurator - before the update you could happily click the check syntax button, find the error and fix it… now you cant!

first error (there are 6)

this to me (based on my limited C# knowledge) the error lies on line 1642 at position 82… (please correct me if i am wrong there!!!

the UD method only has 1500 lines of code

this is all since the update that happened over the weekend.

5 Likes

Yeah this is irritating. Since it does a syntax check on “Ok” in the previous version, “Save & Close” now functions the same as “Ok” used to. Weird to disable Check Syntax and Ok instead of removing them, or better yet, just leaving them the way they were.

This has never been accurate in configurators, unfortunately. In the classic editor, you could double-click the line and it would highlight the line with the error. Not sure if that works in the new kinetic editor.

Not sure if this helps, but in c# you need to add an m to the end of a a decimal value or it will parse as type double. Example:

var NumberValue = 3.25; // This is a double
var AnotherNumber = 3.25m; // This is a decimal

so if you have a decimal variable that exists (or a method that takes a decimal parameter) and you set it without that m, you’ll end up with this error.

Dang, that’s a hefty UD Method.

3 Likes

Yes, they made a change to the Configurator in version 2024.2.9 which broke the configurator if you have a client method that calls a server method that has a parameter that’s a decimal (at least that’s what broke for us).
This is the server method that has decimal as parameters:


We then have a client method that calls this and to fix the issue, we had to cast the parameter to double:

4 Likes

Whoa good catch, I haven’t seen this happen but I am not sure that I have any Server UD calls from a Client UDMethod.

I’m facing the same difficulties and I’m also stuck with those errors:

For me, the problem is coming from the Configurator user Defined Methods that were previously created in classic and now used in Kinetic. The method parameters of type decimal that are using the modifier ‘ref’ are causing these errors for me. If I remove the ‘ref’ (in classic) the errors will disappear, but I have 500+ configurator rules for different parts that are making use of this method.

These breaking changes shouldn’t happen in a small patch upgrade.

Please let me know if anyone finds another workaround for this.

I get this suite of buttons when something from outside the method creates the error. e.g. a control is renamed that is referenced in the method.

If I’m editing the method directly, it gives me OK/Check Syntax/Cancel buttons.

Do you have PRB number for this issue?

This is the number: PRB0294713

we also have a problem number
PRB0294891

We fixed our issue, to fix it we did the following:

  1. copied all the code from the UD method into notepad and saved it.

  2. Delete all the code from the UD method and saved it - this then showed no errors in our configurator.

  3. re-opened the code editor for the UD method and pasted back in the code - the check syntax button was made available again and that pointed us to a line of code:

Inputs.ComboList_edt.Value = await OFC_General_SS(iName, vThickness, vWidth, vLength, vMtlType, vMtlColour, vMtlPartNum);
  1. we simply added (double) to the front of our variables that were decimals
Inputs.ComboList_edt.Value = await OFC_General_SS(iName, (double)vThickness, (double)vWidth, (double)vLength, vMtlType, vMtlColour, vMtlPartNum);

this has fixed our configurator and also resolved the removal of the check syntax button!

3 Likes

A shame it needed to be done at all, but excellent work to find a fix!

1 Like

Huge thanks for posting this @tonyb1986!

We just updated to 2024.2.10 and we were able to fix this error relatively easily thanks to you.

I shudder to think how long it would have taken to figure this out on our own.

:pray:

1 Like

We found the issue the day after pilot went live…the dev team still dont have a solution to it…now that sounds bad but i have been advises by epicor to allow the dev team to come up with a solution.

I have advised support that we have fixed the issue though

So I just saw this issue come up (for the first time in this environment) today on version 2024.2.12. There were no issues in previous versions. Did they give you a PRB number? I’d like to send them this new information to see if it produces any more results.

Hi Kevin,

Will have a look when i am back in the office tomorrow AM (7:00am gmt)

It was in the release notes for 2024.2.9 or 10 i believe where using a decimal was causing an issue so they forced it to use double instead… Hope this helps.

1 Like

@kve PRB0288957

I remembered my login details for Epiccare!

1 Like

I am dealing with this issue. I removed all references and methods that generated the error. I added back a server side method and have NOT referenced it in the client or actually ANYWHERE yet. But I get the error (1128,41): error CS0266: Cannot implicitly convert type ‘double’ to ‘decimal’. An explicit conversion exists (are you missing a cast?)