function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
govind v 3govind v 3 

ERROR??

When a getting an error when we are saving a record page in lightning.Please find the screen for more details???User-added image
Deepali KulshresthaDeepali Kulshrestha
Hi Govind,

By looking at your code, I would say that you might be using the wrong method 'getElement' in your js code. I think you want to use 'document.getElementById' method.

There are methods to look for nodes by a tag, class, etc.

elem.getElementsByTagName(tag) looks for elements with the given tag and returns the collection of them. The tag parameter can also be a star "*" for “any tags”.
elem.getElementsByClassName(className) returns elements that have the given CSS class.
document.getElementsByName(name) returns elements with the given name attribute, document-wide. very rarely used.
document.getElementById -If there are multiple elements with the same id, then the behavior of methods that use it is unpredictable, e.g. document.getElementById may return any of such elements at random. So please stick to the rule and keep id unique.

If this is not the case please let me know.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too

Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com