Override Calculated value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2020 11:39 AM
Hi Guys,
I am trying to call script include from Dictionary override- calculation field but it's not working .can you help me to fix this issue?
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2020 11:55 AM
Can you post the script include? The format you have here looks correct
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2020 12:13 PM
Hi bryanshaw,
it's my Script include:
var datedetails = Class.create();
datedetails.prototype = {
initialize: function() {
},
getDate:function(csid)
{
var gr = new GlideRecord("alm_asset");
gr.addQuery("ci",csid);
gr.query();
if (gr.next()) {
return gr.warranty_expiration;
}
}
},
type: 'datedetails '
};
i called script include like: javascript:new global.datedetails().getDate(current.cmdb_ci)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2020 12:23 PM
Seems, Script include is not client callable.
Can you replace 1st two lines
from
var datedetails = Class.create();
datedetails.prototype = {
to
var datedetails = Class.create();
datedetails.prototype = Object.extendsObject(AbstractAjaxProcessor, {
And make sure you check the Client callable: True
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2020 12:31 PM
Sorry, It's not working..
