Help changing Customization code in Script Editor

I have a customization. I took the code out and edited it in a text editor (vs code) and edited the customization and copy pasta’d the code back in. I get a bunch of these errors.

It doesn’t happen if I go into the Script Editor and manually change the code in there

Make sure VS Code isnt adding some references… Some IDEs that have like Lint enabled or Auto-Refactoring plugins tend to help by auto-resolving namespaces etc…

Also make sure you do a proper
CTRL+A (Select All)
CTRL+V (Paste)

Also check out

1 Like

It had me delete a bunch of variables and methods. Then the code validated. Honestly i’m kinda confused

You have to be careful when copying a pasting there are a lot of Comments like

//Wizard 
//Epicor Magic 
//Etc

which seem kind of arbitrary but Epicor uses those to control your customization. The rule is if you didn’t write it , don’t touch it.
You may have killed one of those comments, also it looks like you declared the same variable that existed there already (at least on an underlying layer)
Again when you export your code manually there are a bunch of little details you don’t need / can’t take. For example if you click “Show all code” and then use that as your code you need to make sure you import the right bits.

Check out the VS Extension it will help with all of these issues.

1 Like

I think he accidently copied the Readonly code along.

1 Like

Right that’s what I meant. (With my long winded explanation) lol

1 Like

I was just typing this thanks for the help

Ah… :slight_smile: The //Epicor Magic distracted me from the rest of the paragraph.

1 Like