• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 301
  • Last Modified:

before form opened event i want to check something before form is opened if true user can open the form if not form openinig should not be allowed .How?

I need to check if the person started the form is an employee for 6 months, if not i dont want him/her to be able to create the form. in our company when someone starts a form it follows the domino workflow accordingly. I have calculated if the employee is a worker for 6 months but i need to catch the event before the form is created so that when he/she hits start the form from the intranet page i should not allow the form to be created or seen and a warning message can pop-up. What is the way to do it? which Domino Workflow event or form event or etc.... i should have these fields checked?
1 Solution
Sjef BosmanGroupware ConsultantCommented:
It is the QueryOpen event of the form:

QueryOpen( Source as NotesUIDocument, Mode as Integer, IsNewDoc as Variant, Continue as Variant )

The code could be something like:

If IsNewDoc Then
      If IsNewEmployee() Then
            MsgBox "Sorry, this function isn't available for you (yet)", 16, "Stopped"
            Continue= False
      End If
End If

Once Continue is false, execution won't continue and the form won't be shown.

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now