- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 09-26-2017 01:40 PM
Working with a client on Consumables inside of Asset Management, a requirement came up to be able to reclaim or restock a consumable item from an asset or assigned user to a stockroom. We were able to grab a UI Action and UI Page off the community that was intended to solve the problem. However, after some testing, we found that there were some issues with the solution creating extra records for consumables and not merging consumable records correctly on the consumables table. On further investigation, we discovered that the solution was using some of the same functions as the Consume UI action for consumables. Because of the way these functions are designed, they caused records to be created on the consumables record, but failed to trip the business rule that is used to merge records on the consumables table. This can have pricing and stocking implications, and can seriously effect usability if certain consumables move in and out of stock regularly, so we created a new script include that includes a new restock function designed off the built in script include called Consumables where the functions discussed above are found.
We also determined that there was a large amount of confusion being generated by the UI page we are using redirecting to the Consumables table, so we included a change to the UI Action and UI page that will cause it to redirect back to the parent asset that the item was assigned to. (We only assign consumables to assets currently. This redirect could probably be modified to pull a specific record from the stack to redirect to if desired without too much work.)
Most of the UI page and action are original to the original poster, with the small additions of some new variable passing for the redirect and the script include call. The original solution can be found at this link. Our update UI Page, UI Action, and Script Include are attached as XML files below. (These are the raw XML for the individual records, not contained in an update set.) The UI Action is available on the Consumables form if a consumable is in state Consumed, and the user has the asset role.
- 1,602 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Very helpful. Thanks.