Who is the current user - mailmerge

I am using the Mail Merge feature of Navision and would like to be able to add the name of the user who is invoking the mail merge. If this information is stored in a Navision table, I can call it out and add it to the template.

The current NAV user can be accessed using the USERID global variable (always defined in NAV objects, doesn't need to be defined by you).

Related

How to display record in custom created related list of all users having same manager in servicenow

I want to display the record in custom created related list of all users having saming manager in servicenow. For e.g. Abel, Jack has manager Adel, so when I open Adel record I should be able to see the Abel user and Jack user.
This is the script I used and don't know how it will execute in related list:
var gr = new GlideRecord('sys_user');
gr.addQuery('user_name','abel');
gr.query();
gr.next();
gs.print(gr.getDisplayValue('manager'));
I tried this is in Scripts Background option in Application Navigator
You shouldn't need to code for this. If you want to add a related list of user's the current user manages. It will list as "Users" but you can change that label in the related list configuration.
If you meant to do this by code, you'd need to a scripted relationship the data. Here's some information on that. https://docs.servicenow.com/bundle/newyork-platform-user-interface/page/administer/form-administration/task/t_CreateDefinedRelatedLists.html

Make a form View read-only for specific user groups from front-end in Odoo 8

Is it possible to change the attributes of form view for specific user groups in form view tag, like in form tag, readonly="{('user_group','=','some_group')}">
I need to make a form view read-only for s specific user group but only from front-end. Records are updated from code by that user belonging to that specific user group from back-end. and if i disable updating the records of that model by that user group in my security file, that user is not able to modify the records even from back-end.
Best way to do this is by defining a new group that have only read access on that model and add to that user you will save a lot of typing and a lot of your time.
Because what you really asking is to remove edit write for a specific user.

Servicenow - Service Catalog Reference Field - Insert different column than the display value

Let me describe my problem:
I have a table for all my IT-Services. I reference to this table more than once, for different purposes. Most of the time I need to reference to the name of the service. That's why I keep the name as displayed value.
One Column of that table is a service_id (custom field) which is for example "Service_004". Now in a catalog request Item the User has to fill in the service_id in a reference field.
But since I have the name as displayed value, and I need it in other forms, I am unable to reference to the service_id.
Using the variable attributes field I managed to let the service be found using the autocomplete function. But in the reference field I still get the servicename. I know that I can change the display value in the dictionary, but this breaks other functions. So what I need is to change the display value just for one reference field.
Also I tried to create a new table called IT-Services2 with reference to my table IT-Services. Then I switched the display to true in the new table for my service_id, but this will even change it in the parent table.
Perhaps an onChange client script utilizing g_form.setLabelOf() ?
http://wiki.servicenow.com/index.php?title=GlideForm_(g_form)#setLabelOf
Maybe I'm not fully understanding your question...
I ran into this issue before, what you can do is create select box variable and use an on load client script to populate the list with the service_id(s) from the table you are referencing.
I would write a script include to pull the data from the table and call it from the client script via GlideAjax.

Update Custom user attribute using Rally User Management

I have created a custom field for user in Rally called 'Info'. I have a excel which contains 2 columns userID and Info. I am trying to use the 'update_user_attributes.rb' ruby script from Rally User Management. But it seems to update only the Last name field and not the custom attribute Info. Kindly help me with this
The update_user_attributes.rb script only includes a select list of extended User Attributes, since it currently doesn't poll for and handle any/all Subscription-Specific Custom Fields for the User Object (these will vary from customer to customer, or subscription to subscription).
This Gist contains a custom version of update_user_attributes.rb that adds a handler for an Info field that is at Column 14 of an input tab-delimited text file. You may use it in replacement of the default update_user_attributes.rb script. It will populate the content from Column 14 into a custom field called "Info" that must exist on the User Object (if it doesn't, the customized updater script will fail).
You may wish to file a GitHub Issue for the User Mgmt Toolkit to request an enhancement to allow for configuration of a user-specified list of Custom Fields on Users.

MS CRM Save + Copy as new (Custom Entity)

I have a custom entity in Microsoft CRM (4.0). The user has to input records however usually they have a batch of 20+ records that are almost the same apart from 2 or 3 fields which need changing. I know I need to write some custom code to enable this functionally. However can anyone recommend any methods to do this.
Ideally there should be a button that will save and create a copy as a new entity.
My Current way of thinking is to pass all the details as part of the URL and use javascript to strip them out on the page load event. Any ideas welcome.
Thanks
Luke
I found the answer here:
http://mscrm4ever.blogspot.com/2008/06/cloning-entity-using-javascript.html
I've used it and it appears to work well.
Since there are numerous fields, but only certain fields values are different, then i am thinking to set the default value to all the fields, so that users just need to alter those values when needed.
In my approach, i will hook a javascript function on load of the form data entry screen and use XmlHttp approach/Ajax approach to hook to the custom web service to pull/retrieve the default values of each fields. Or you can set those values at the javascript function itself, but the drawback of this, it's difficult to customize later. So i will choose the approach to hook to the custom web service and retrieve those value from some application parameter entity.
Your idea of providing a "clone" button is also a great idea, which means that it will duplicate all the attributes of the previous record, into a new record, so that it will save time for data entry person to customize the different value
EDIT
Since you would enter records in batch mode, how about customizing .ASPX screen to enter records. By customizing through .ASPX screen, you can use a tab , so that users can browse through tabs, to customize the value/attribute of each record.
There will be a "save" button as well as "clone" button to clone some common attribute or value.
I would create a custom web service that would accept the entity type and the ID of the record I'm cloning. Your "Save and Clone" button would call the service, and the service would handle the details of retrieving the current record and deciding which fields to set on the new record. The service creates the record, and sends the Guid of the record back to your button, which then opens up the newly created record.
This way, you avoid the messiness of setting/getting values in JavaScript and tying which fields to set/retrieve directly to your OnLoads, as well as avoiding the possibility of query string that's too long.
The service could easily be sufficiently generalized so that all you'd have to do is add your button to any entity, and it would work, assuming you'd set up your service to handle that particular entity.
One possible downside is that since the clone record button would actually create the record, the user would be forced to delete the cloned record if they decided they didn't want to clone the record after all.

Resources