Enter Button Used as Tab
rengland
Hi coresuite experts,
I have a client that does not like the way Enter button works while marketing documents are open in B1. They have several users that hit enter out of habit at the end of a row in the Matrix. This causes the document to be added to SAP, before they are finished adding all of the items. They'd prefer that the Enter button function like the Tab button, moving to the next field when it is pressed instead of adding the document.
Has anyone come across a similar scenario and worked up a solution? Is there an easy way to catch a user pressing the enter button, and returning a Tab instead?
Kindest regards,
Ryan
Andreas Achleitner
hi
can't tell you how to do it in customize because i dont have one right now
but u could add a new button to the form and set the defaultbutton of that form to this new button
that would prevent the document to be added by hitting enter
for the tab instead of enter u could use the key down event and use the sap function Application.SendKeys("{TAB}") on enter(char 13)
maybe that helps
Anders Olsson
Hi Ryan,
No problem! To elaborate on Andreas' answer above:
Create a new optimizer rule.
Type: CSCODE
FormType: 139 etc (add all marketing document types, comma separated)
ItemUID: 38
EventType: KeyDown
BeforeEvent: Yes
InnerEvent: Yes
FormMode: ALL
Code:
if (pVal.CharPressed == 13)
{
SwissAddonFramework.Messaging.SendKeys.Send("{TAB}");
return false;
}
return true;
So, when Enter is pressed (keycode 13), we send a tab and cancel the event.
Regards,
Anders
rengland
Hi Andreas and Anders,
Fantastic. This is exactly what I needed.
Kindest regards,
Ryan
Please sign in to leave a comment.
Comments
0 comments