public IActionResult OnPostCreateRecord(EntityRecord record, Entity entity, RecordCreatePageModel pageModel)
 {
     pageModel.TempData.Put("ScreenMessage", new ScreenMessage()
     {
         Message = "Record is created successfully"
     });
     return(null);
 }
Example #2
0
 public IActionResult OnCreateRecord(EntityRecord record, Entity entity, RecordCreatePageModel pageModel)
 {
     pageModel.TempData.Put("ScreenMessage", new ScreenMessage()
     {
         Message = "Custom implementation of create record was executed. This is hooks test and nothing is created."
     });
     return(null);
 }
 public IActionResult OnPreCreateRecord(EntityRecord record, Entity entity, RecordCreatePageModel pageModel, List <ValidationError> validationErrors)
 {
     if (record.Properties.ContainsKey("text"))
     {
         if (record["text"] as string == "123")
         {
             validationErrors.Add(new ValidationError("text", "123 value is not permitted"));
         }
     }
     return(null);
 }