Customization Form Wizards MESSAGE.BOX

I set Customization Form Wizards in Inventory Transfer.I would like to make if transferQty is over then OnhandQty and warning message shows. However warning message shows around 5 times. Are there any way to make warning message show only one time?

Customization Form Wizards Code as below:
The code as below. However
Private Sub CreateRowRuleviewTransferQtyGreaterThan()
’ Description: OverOnHand
’ **** begin autogenerated code ****
Dim ruleActions(-1) As RuleAction
’ Create RowRule and add to the EpiDataView.
’ Dummy Context Object
Dim contextObject As Object = Nothing
Dim rrCreateRowRuleviewTransferQtyGreaterThan As RowRule = New RowRule(“view.TransferQty”, RuleCondition.GreaterThan, “view.FromOnHandQty”, AddressOf Me.viewTransferQtyGreaterThanviewFromOnHandQty_CustomRuleAction, contextObject)
’ **** end autogenerated code ****
End Sub

Private Sub viewTransferQtyGreaterThanviewFromOnHandQty_CustomRuleAction(ByVal args As Ice.Lib.ExtendedProps.RowRuleDelegateArgs)
	' ** RowRuleDelegateArgs Properties: args.Arg1, args.Arg2, args.Context, args.Row
	' ** put custom Rule Action logic here

    MessageBox.Show ("TransferQty over onhandQty!!")

End Sub

Thank you for your help.

Personally, I’d to move this to a BPM. In fact, my whole 2023 is moving logic out of the form and into BPM’s because the forms are going away at some point. The rules for running your business should live in the BPM world anyway.

Take a look at the InvTransfer.ChangeTransferQty method. This looks doable with only widgets. Certainly far less code than is in your screenshot.


That is a misuse of the rowrules in my opinion. Not that you cant inject logic there but unless you know what you are doing I’d stick to using that to color rows that are below zero as red or readonly or something.

1 Like