Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating a new module: basic steps?
#6
a preSaveCheck() is a method you can add to your module. it will get called right before saving and if it returns an error status and message the user will be redirected to the edit screen with the error message and no record will have been saved.

You can see examples of this in GlobalVariables where we check that only one record is set to default per variable and in Documents where we make sure the attachment can be saved before saving the record details.

In your case you could check if a record already exists and stop the creation of other records so there could only be one record in the module.
Joe
TSolucio
Reply


Messages In This Thread
RE: Creating a new module: basic steps? - joebordes - 11-30-2015, 10:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)