Asset Display name with Model display name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2020 08:53 PM
Hi,
Need to write a Business rule where asset Display name should update with model display name for all the assets. Even when we create new assets.
Below is the background script I have created, should I use insert and update After business rule on product model table, please advice
var gr = new GlideRecord('alm_asset');
gr.addEncodedQuery('asset_tag=WL1111200677');
gr.query();
if(gr.next()){
gr.display_name = gr.asset_tag+ '-' +gr.model.display_name;
gr.update();
}
Please advice.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2020 07:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2020 08:57 AM
with ('asset_tag=WL1111200677'); are you not utilizing a unique AT for each asset in your environment?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2020 04:51 PM
Hi,
Yes I am utilizing Unique asset tag for each asset but whenever a new asset is created it doesnt update the display name as per the out of the box business rule, I have to run the fix script whenever the new asset is added, so I am wondering should I run a separate business rule or am I missing something