11-30-2015, 10:08 PM
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.
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
TSolucio