Name clash with script object "util". How we can resolve?

Avatar

Avatar
Validate 10
Level 5
tarekahf
Level 5

Likes

32 likes

Total Posts

409 posts

Correct reply

10 solutions
Top badges earned
Validate 10
Validate 1
Give Back 50
Give Back 5
Give Back 3
View profile

Avatar
Validate 10
Level 5
tarekahf
Level 5

Likes

32 likes

Total Posts

409 posts

Correct reply

10 solutions
Top badges earned
Validate 10
Validate 1
Give Back 50
Give Back 5
Give Back 3
View profile
tarekahf
Level 5

05-09-2017

In one of the forms, I wanted to use "util.scand()" function, however, I noticed that there is already script object name "util", which is effectively hiding the built-in script "util". The exiting "util" script (embedded) has been used extensively and very risky to rename it now.

How I can resolve this naming conflict with minimum risk?

Tarek

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

06-09-2017

In the XML Source view press [Ctrl]+[H] and replace „util.“ (with a trailing dot) with „utils.“ (or another name).

This will replace all references to the current script object „util“ in the entire template.

Then rename the script object too and you should a habe a template where no object or reference is named „util“ anymore.

Answers (0)