Need to update location field in Asset table as per the To stockroom enter in transfer_order table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2023 01:57 AM
Hi All
Need your support in the scripting for the below mentioned requirement.
For example: User has created a record in transfer order table like "From Stockroom =A" and "To Stockroom=B". Now an entry got created in alm_transfer_order_line table and also a "Ship task" got created. When user closed this ship task then Asset state gets change to "In Transit" in alm_hardware_table. Now my requirement is when Asset state is "In Transit" in alm_hardware table then I also need to update the "Location" field in the alm_hardware table as per the "To Stockroom" value from transfer order table. In this case user has enter the "to Stockroom" value as 'B' so my script should update the location field value as 'B' in the alm_hardware table when the assdet state is "In Transit".
Please help me in the script part and logic please.
Thank you in advanced. Please support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2023 02:08 AM
it's very difficult to understand without any screenshots.
Also share scripts you started with and where are you stuck?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2023 05:46 AM
Hi Ankur
Let me try to clear the requirement.
For Example:
Step1: in alm_transfer_order table user has created a entry where he filled "from_stockroom" value as 'ABC' and "To Stockroom" value as 'XYZ'.
Step2: After that another entry created in alm_transfer_order_line table and a task got created in alm_transfer_order_line_task table.
Step3: Now when user close this task, in the alm_hardware table "state" field value update to "in Transit"
Step4: Main requirement: When asset state update to "in transit", in the same alm_hardware table one more field is there called "location". In this location field , I have to populate the "To stockroom" value which is 'XYZ'.
Hope I am able to explain it. I am trying with the script but nothing is working for me. So looking for help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2023 06:02 AM
Below is the screen shot.
Step1, Entry created in Transfer order table
Task closed:
Once task closed, asset state moved to "in transit" and I need to update location in alm_hardware table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2023 07:30 AM
So unless you share your scripts it's difficult to help you
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader