In the Row_Updating event of Master and Detail pages, I wrote custom validations. If any validation fails, manually returning false. After correcting user input and submitting the form again, PHPMaker throws "Update failed" error message.
Update failed in Master/Detail Edit
-
- User
- Posts: 980
Obviously there's something wrong with your validation code.
Post your code to more discussion.
-
- User
- Posts: 24
if ($rsnew['EXPERIENCE'] < 5) {
$this->CancelMessage = "Experience should be 6 or greater";
return false;
}
Example: When inserting record user entered value 10 and record is inserted. Now user is updating the value to 3 then it throws CancelMessage (Experience should be 6 or greater). Now user entered 6 then it throws "Update failed" error message.
This "Update failed" error message throwing by PHPMAKER and this is happening only in MASTER/DETAIL EDIT only, Not in MASTER EDIT Page.
-
- User
- Posts: 980
You should have return TRUE in your code otherwise it never get passed.
It should goes this way:
Row_Updating() {
if (something == wrong) {
return FALSE;
}
return TRUE;
}
-
- User
- Posts: 980
anil wrote:ai
This "Update failed" error message throwing by PHPMAKER and this is happening only
in MASTER/DETAIL EDIT only, Not in MASTER EDIT Page.
Updating in master/edit page have to pass both Row_Updating() event in master and detail page. Since it is ok in master edit, check Row_Updating() event in detail edit.