I need to write a listener for the following scenario:
Amount section is a multifield, Which contains Minimum Amount and Maximum Amount as a text field.
(Through listener we need to show a popup on submit if the maximum amount entered is less than minimum amount)
The screen shot for the dialog is as follows :
For the above multifield scenerio I can't able to achieve the expected output.
The properties of AMOUNT, Minimum Amount And Maximum Amount Respectively
Kindly guide me on to resolve this issue.
Thanks in advance.
From the statement "For the above multifield scenerio I can't able to achieve the expected output."
Can you tell community what all approaches you tried so that it can be corrected.
Based on mentioned use case you can simply use beforesubmit event and execute you logic to validate amount
This is the listener code i used
var minAmount = dialogObj.getField("./amount.minAmount").getRawValue();
var maxAmount = dialogObj.getField("./amount.maxAmount").getRawValue();
alert("Max amount should be greater then minimum amount..!!");
Under which listener you have put up this code, I mean when this gets executed.
While clicking on ok button in the dialog
The below article deals with comparison of fields, but not exact use-case as yours. Listing the below link,just in case it helps in any way.
Can you please help if it is for Classic UI-multifield dialog