Monday, April 16, 2018

Custom Glyph in ServiceNow portal - Icon Link widget



Step1: You have to upload the image to image to the table db_image
Step2: Clone the widget Icon Link
Step3: Html code is as below

<div>
   <!--// Top Icon -->
   <a ng-if="::(options.link_template == 'Glyph Icon' || !options.link_template)" ng-href="{{::data.href}}" class="glyph_icon {{::options.class_name}}" target="{{::data.target}}">
       <div class="m-b fa fa-{{::options.glyph}} fa-4x {{::options.class_name}} text-{{::options.color}}" align="center" style="margin-right: auto; margin-left: auto; display: block;"></div>
       <h4 style="text-align: center;">{{::options.title}}</h4>
       <span class="text-muted">{{::options.short_description}}</span>
       <p>  </p>
   </a>


   <!--// Image Icon -->
   <a ng-if="::(options.link_template == 'Image Icon')" ng-href="{{::data.href}}" class="image_icon {{::options.class_name}} text-{{::options.color}}" target="{{::data.target}}">
       <div><img   src="{{data.image}}" alt="" align="left" style="margin-right: 7px; margin-left: auto; display: block;"/>
           <h3 style="font-weight: 300; margin-top: 22px">{{::options.title}}</h3>
       <span class="text-muted">{{::options.short_description}}</span></div>
       <p>  </p>
   </a>

</div>


Step4: Server side coding


(function(){
var gr = $sp.getInstanceRecord();
data.href = $sp.getMenuHREF(gr);
data.target = options.target || "";


var img = new GlideRecord('db_image');
img.addQuery('name', 'custom_icon.png');
img.query();
if (img.next()){
data.image = img.getValue('name');
}
})();


Thursday, April 12, 2018

What is the difference between setVisible() and setDisplay() on g_form?


setDisplay() -  It will reclaim the space if the field is hidden on the form
If the field is hidden, the space is used to display other items. that means below field like, if sub status of the incident is not displaying then assignment group will display on that blank space.
setVisible()
If the field is hidden, the space is left blank.you can see the change on the form clearly.

Wednesday, April 4, 2018

LDAP integration vs. SSO ServiceNow what is the difference?


LDAP integration means that your Service-Now instance will pick up newly created Users from the Active Directory, either through Listener ports or through Scheduled Uploads, and when you authenticate yourself while Logging onto Service-Now, this authentication is happening from the AD.


SSO implemented means that you do not have to re-authenticate yourself when trying to access ServiceNow, once you log into an Environment while accessing different Applications for whom SSO is enabled