Disable the save function in Inventory Maintenance

Discussions relating to breakout scripting, .NET and COM programming with Jiwa objects.

Disable the save function in Inventory Maintenance

Postby tonys » Wed Mar 13, 2019 2:02 pm

Hi,

In Inventory Maintenenance (Vesion 06.05.13) when saving a record, I would like a Message Box stating "Classification Not Set" and the save function disabled if the classification ID is "ZZZZZZZZZZ0000000000"

Want to force operators to pick a classification.
tonys
Occasional Contributor
Occasional Contributor
 
Posts: 26
Joined: Tue Mar 04, 2008 10:25 am

Re: Disable the save function in Inventory Maintenance

Postby tonys » Wed Mar 13, 2019 2:47 pm

Hi, You can ignore this request, I have got it working using the following.



If InventoryObject.ClassificationID = "ZZZZZZZZZZ0000000000" Then
MsgBox "You cannot save until the Classification has been set.", vbCritical + vbOkOnly, "Classification Not Set"
rtnCancel = True
End If


If InventoryObject.Category1ID = "ZZZZZZZZZZ0000000001" Then
MsgBox "You cannot save until the Category 1 has been set.", vbCritical + vbOkOnly, "Category 1 Not Set"
rtnCancel = True
End If

If InventoryObject.Category2ID = "ZZZZZZZZZZ0000000002" Then
MsgBox "You cannot save until the Category 2 has been set.", vbCritical + vbOkOnly, "Category 2 Not Set"
rtnCancel = True
End If

If InventoryObject.Category3ID = "ZZZZZZZZZZ0000000003" Then
MsgBox "You cannot save until the Category 3 has been set.", vbCritical + vbOkOnly, "Category 3 Not Set"
rtnCancel = True
End If

If InventoryObject.Category4ID = "ZZZZZZZZZZ0000000004" Then
MsgBox "You cannot save until the Category 4 has been set.", vbCritical + vbOkOnly, "Category 4 Not Set"
rtnCancel = True
End If

If InventoryObject.Category5ID = "ZZZZZZZZZZ0000000005" Then
MsgBox "You cannot save until the Category 5 has been set.", vbCritical + vbOkOnly, "Category 5 Not Set"
rtnCancel = True
End If



End Sub
tonys
Occasional Contributor
Occasional Contributor
 
Posts: 26
Joined: Tue Mar 04, 2008 10:25 am


Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 1 guest