Customization question - how to clear a field - found the answer

My co-worked found this out:
In Epicor 9 we can access the tools on the toolbar:

Private Sub baseToolbarsManager_ToolClick(ByVal sender As Object, ByVal args As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs)
Select Case (args.Tool.Key)
Case "ClearTool"
ClearNumericDisplayOnlyData()
Case Else

End Select
End Sub
Thanks for all the help!

--- In vantage@yahoogroups.com, "k_stump" <kristi.stump@...> wrote:
>
> Hi All,
> I am customizing Sales Order Entry with a numeric field that shows the order total without tax. I added a numeric field to the screen and did a calculation using values from epi data view. My field displays fine. But when I hit the clear button, my numeric field does not clear. I don't have it bound to anything since it is just a calculation. How do I tell when clear is hit ? I have run a Trace and don't see it there. I think if I know when clear is hit I can just move zeros to my field. Any suggestions? How do others do this?
> Thanks
> Kristi
>
Hi All,
I am customizing Sales Order Entry with a numeric field that shows the order total without tax. I added a numeric field to the screen and did a calculation using values from epi data view. My field displays fine. But when I hit the clear button, my numeric field does not clear. I don't have it bound to anything since it is just a calculation. How do I tell when clear is hit ? I have run a Trace and don't see it there. I think if I know when clear is hit I can just move zeros to my field. Any suggestions? How do others do this?
Thanks
Kristi
Just a thought, but what about a BPM that fires when the Order Number changes to 0?




________________________________
From: k_stump <kristi.stump@...>
To: vantage@yahoogroups.com
Sent: Thu, January 28, 2010 9:03:51 AM
Subject: [Vantage] customization question - how to clear a field

Â
Hi All,
I am customizing Sales Order Entry with a numeric field that shows the order total without tax. I added a numeric field to the screen and did a calculation using values from epi data view. My field displays fine. But when I hit the clear button, my numeric field does not clear. I don't have it bound to anything since it is just a calculation. How do I tell when clear is hit ? I have run a Trace and don't see it there. I think if I know when clear is hit I can just move zeros to my field. Any suggestions? How do others do this?
Thanks
Kristi







[Non-text portions of this message have been removed]
I'm not sure if I understand 100%, but I think I'm doing something similar. I want to cause something to happen when a form button is clicked other than what is supposed to happen. I am trying to use a Cancel button to trigger code, which it sounds like you want a Clear button to trigger code to '0' your custom field?

If so, I added a custom button and labeled it "Cancel", which the Cancel button is the button I want to use as a trigger. You can change the btnCancel name below to whatever the name of the button is you are trying to capture (btnClear?), and use it's epiguid in place also. As you can see, I kept the custom button's name the same (btnEpiCustom1), but you can change that if you want. I reduced the size of the standard Cancel button to 0,0 since we will be using the custom button in place of it(don't delete the button!). Then, I made the code below as a test for functionality. Instead of the message box, you can add code to 0 out your field. I've done the same with textboxes to detect text changes or other events. Below, the Cancel button still preforms as usual, but it also runs the code I have too. Works pretty slick. You might need to work a little to debug this. It looks like line breaks split a couple lines. However, the "btnCancel.PerformClick" is a separate line.


Private Sub btnEpiCustom1_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnEpiCustom1.Click
'// ** Place Event Handling Code Here **

DIM btnCancel As EpiButton

'// ** Place the guide of the baseline button in the code below
btnCancel = CType(csm.GetNativeControlReference("d172bf56-09d2-422f-b670-5a703d1ff746"), EpiButton)
btnCancel.PerformClick

'// Add custom code after baseline button has been executed.

msgbox("Button Cancel clicked!")
End Sub







--- In vantage@yahoogroups.com, "k_stump" <kristi.stump@...> wrote:
>
> Hi All,
> I am customizing Sales Order Entry with a numeric field that shows the order total without tax. I added a numeric field to the screen and did a calculation using values from epi data view. My field displays fine. But when I hit the clear button, my numeric field does not clear. I don't have it bound to anything since it is just a calculation. How do I tell when clear is hit ? I have run a Trace and don't see it there. I think if I know when clear is hit I can just move zeros to my field. Any suggestions? How do others do this?
> Thanks
> Kristi
>