- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2016 03:05 AM
Hi,
On the incident form we have two reference icons next to the caller_id field: "Add new user" and "Change user".
Those icons are not visible on the self service incident form. This is all Eureka
I have upgraded one of the non-production instances to Helsinki, and all of a sudden, those icons are visible on the self service form.
Is there a way to hide those icons only on the self service form?
I have tried a on load client script where I entered the "ess" view name, after unchecking the global checkbox.
In the script section I added this code:
function onLoad() {
//Type appropriate comment here, and begin script below
$('add_new_user.incident.caller_id').hide();
$('change_user.incident.caller_id').hide();
}
The icons still appear on the self service form.
Maybe the UI macro's need to be changed, but I don't know how to do this.
Kind regards,
Paul
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2016 03:41 AM
you may even be able to do this even cleaner by checking the view
<g:evaluate>
var currentView = RP.getParameterValue('sysparm_view');
</g:evaluate>
then just running if view is not ESS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2016 03:41 AM
you may even be able to do this even cleaner by checking the view
<g:evaluate>
var currentView = RP.getParameterValue('sysparm_view');
</g:evaluate>
then just running if view is not ESS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2016 06:21 AM
Hi mguy,
Your answer was very helpful and it pointed me to the right direction.
I have applied your solution in the 'add_new_user' UI macro like this:
<j:set var="jvar_n" value="add_new_user_${jvar_guid}:${ref}"/>
<g2:evaluate var="jvar_show_user_display" jelly="true">
var currentView = RP.getParameterValue('sysparm_view');
if (currentView != 'ess') {
"";
} else {
"go";
}
</g2:evaluate>
<j2:if test="$[empty(jvar_show_user_display)]">
<a id="${jvar_n}" onclick="tearOff2('${ref}')">
<img border="0" src="images/icons/contacts_new.gifx" title="${gs.getMessage('Add new user')}" alt="${gs.getMessage('Add new user')}"/>
</a>
</j2:if>
and this works perfectly.
(Must admit that none of the code is my own, but I have combined several things together and it results in working code.)
Thanks a lot.
Kind regards,
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2016 06:35 AM
Great to hear that helps ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2016 07:50 PM
Hi mguy ,
As i'm new to jelly script, i have doubt.
How your code determines the image to be added next to the field assigned to?
Whether the below code tells the dictionary entry attribute of the field assigned to?
<g2:evaluate var="jvar_show_assign_to_me" jelly="true">
I want to add the clickable image next to the field "contact" in the case form.
sample code is appreciated.
Your help on this would be realy great!!!
Thanks & Regards,
Kumaresan M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2016 12:31 AM
That piece is later on in the code when it checks that var is true:
<j2:if test="$[empty(jvar_show_user_display)]">
<a id="${jvar_n}" onclick="tearOff2('${ref}')">
<img border="0" src="images/icons/contacts_new.gifx" title="${gs.getMessage('Add new user')}" alt="${gs.getMessage('Add new user')}"/>
</a>
</j2:if>