- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2022 11:19 PM
Hi.
I need to update records on assets so it can be used for assigning assets to users.
On the portal certain users need to be able to assign an asset to others so if they look up the asset in hand by a lookup selectbox and then have another lookup select box where they can find the user, the producer needs to update the existing record and not make a new.
I have made the fields that is needed in the form, but it keeps making a new record and not updateing the existing.
The table I am trying to update is alm_asset so I think I´m in the right place?
Hope someone can help me.
Best Regards
Jess Larsen
Solved! Go to Solution.
- Labels:
-
Enterprise Asset Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2022 06:14 AM
var usrGR = new GlideRecord('alm_asset');
usrGR.addQuery('sys_id', producer.v_lg_computer);
usrGR.query();
if (usrGR.next()) {
usrGR.assigned_to = producer.select_employee;
usrGR.install_status = 1;
usrGR.update();
}
gs.info(producer.select_employee);
gs.info(producer.v_lg_computer);
current.setAbortAction(true);
producer.portal_redirect = "id=sc_category";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2022 02:57 AM
please provide the script to the update the form in the field in cmdb_ci_computer table through record producer. Also only that particular user whose assigned_to name is same as logged in user name can update his/her record. they should not update others record other then his/her.