- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2009 07:00 AM
Hi all,
I have written a very simple client side script in order to append the service tag of any Dell PC onto the dell warranty URL.
The idea being that rather than having to keep all the info about the computer within service-now, you can keep basic info and link off to Dell's website for a more detailed view (duplication of data = bane of everyone's existence).
The problem is that the URL does not appear until you click on the locked padlock and then click on the unlocked padlock to "lock" the link. I've tried changing the UI Properties option "Unlock empty URL fields on form load" and all this does is the same as clicking on the intially locked padlock. You still have to click on the padlock and save the changes before the URL is "clickable".
What I want to do is to have it locked in everytime you open the record. Not sure if this should be a business rule, or if its necessary to keep it as a client script.
What I've done:
Created a new table (extended from cmdb_ci_computer) called u_Dell_Computers
Populated the serial_number field with the Dell Service Tag.
Created a URL Field called 'u_original_config__warranty_in'
Created the following onLoad client-side script.
function onLoad() {
var dellurl = "http://support.dell.com/support/topics/global.aspx/support/my_systems_info/details?c=us&l=en&s=gen&s...";
var serialn = g_form.getValue('serial_number');
g_form.setValue('u_original_config__warranty_in', dellurl + serialn);
}
The bodge way would be to add a script line that can unlock, then lock the URL padlock, but if someone out there knows of setting to fix this....?
Thanks for your attention
KP
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2010 03:06 AM
Actually ended up using a UI Action and a Button on the top of the Form
Here's the script that runs:
function DellConfWar() {
var dellurl = "http://support.dell.com/support/topics/global.aspx/support/my_systems_info/details?c=us&l=en&s=gen&servicetag=";
var serialn = g_form.getValue('serial_number');
dellurl = dellurl + serialn;
var rcwin = window.open(dellurl, 'Dell_Warranty_Page', 'fullscreen=yes');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2009 12:13 PM
I don't know the exact syntax, but if you use Firefox with the Firebug plugin, you should be able to determine what that is pretty easily.
You could also look through the scripts (also in firebug) for the onLoad command that unlocks it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2009 06:36 AM
Thanks Valor,
Worked around this by creating a UI Action instead - set as form button.
function DellConfWar() {
var dellurl = "http://support.dell.com/support/topics/global.aspx/support/my_systems_info/details?c=us&l=en&s=gen&servicetag=";
var serialn = g_form.getValue('serial_number');
dellurl = dellurl + serialn;
var rcwin = window.open(dellurl, 'Dell_Warranty_Page', 'fullscreen=yes');
}
Works well and I recommend it for minimising the unnecessary amount of data in your CIs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2010 06:06 AM
Great, I got it working.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2010 03:06 AM
Actually ended up using a UI Action and a Button on the top of the Form
Here's the script that runs:
function DellConfWar() {
var dellurl = "http://support.dell.com/support/topics/global.aspx/support/my_systems_info/details?c=us&l=en&s=gen&servicetag=";
var serialn = g_form.getValue('serial_number');
dellurl = dellurl + serialn;
var rcwin = window.open(dellurl, 'Dell_Warranty_Page', 'fullscreen=yes');
}