- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2017 09:40 AM
Hi All,
I'm auto populating the serial number based on hostname and which is working fine on catalog task level but when I save the catalog task form, I see blank value on serial number
Before saving the form
After saving the form
Any help will be appreciated.
Thanks,
sowmya
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2018 02:42 AM
Field readonly feature was causing the issue.
Resolved the issue by setting value first and setting readonly to true.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2017 09:45 AM
Hi Sowmya,
Perhaps you have other scripts that are overwriting the serial number.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2017 09:54 AM
Some thoughts that could be helpful:
a) validate client script (on Load, on Change, on Submit) on either the catalog item or the variable set that could be affecting the expected behavior
b) validate your business rules affecting the catalog task table
c) take a look in your system log (errors, warning and information) right after trying to save the form and see if you can identify a log entry that may indicate what could be wrong
d) try other scenarios that may bring light of what could be wrong: like... setting the value to a hard coded value, ...setting the value at an onLoad client script, etc...
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2017 10:25 AM
Hi Berny,
I have checked the business rule,client script and catalog client script there is no track to find the serial number setting to empty on save/submit.
I have hardcoded the value and saved the form but no change.
Also I have changed the name of the variable for testing purpose. Earlier it was serial_number now I changed to something else for making sure that there shouldn't be any duplicate name. I know it shouldn't be a problem as the script is specific to catalog item but tried for not miss anything.
Below is the track of log when I saved the form after the serial number is set with a value
Thanks,
sowmya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2017 10:50 AM
can you please share your script include code?
also make changes in client script. instead of giving newValue
try with
var check=g_form.getValue('hastname);
then pass "check" in ('sysparm_host_name',check)
in script include put the log while getting the sysparm_host_name.