Setting focus on Same control if No. already exists

upasanisandipupasanisandip Member Posts: 405
Hi all,
I have written code in Sales Header table under CustomerPurchaseNo field OnValidate trigger.

PurchaseOrderNo - OnValidate()

I want to set focus on Same control that is PurchaseOrderNo if it is already exists.

It is checking the Customer Purchase Order No. is already exist or not but cusrsor is moving on next control.
I want to set cursor on same control if it is already exists.

Anyone have idea about this set focus?

thanks

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    You can't set focus on a control on table-level. You need to write your code on a form-trigger instead of a table-trigger.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • DenSterDenSter Member Posts: 8,305
    If you cause an error in code, it should not let you move to another field. Try adding an ERROR message in the validation trigger.
  • Saint-SageSaint-Sage Member Posts: 92
    :-k Is there a command in Navision to set focus?

    No one loves you like the one who created you...
  • SavatageSavatage Member Posts: 7,142
    Saint-Sage wrote:
    :-k Is there a command in Navision to set focus?

    See the C/Side help for ACTIVATE

    or search forum for Focus & Activate
Sign In or Register to comment.