W
|
wpl 7/14/2020 |
Hi, I have a dashboard with multiple Master (prospects) > Details (checks) records. For each detail check record, if I've added a document to the record then I display a button using the Check Page> List Page: After Record Processed Event depending on records added to a table. $LC_id=$data['LC_id']; $sql=DB::PrepareSQL("select count(LC_check_document) from Checks where (LC_id=$LC_id)"); $check_document_present=DBLookup( $sql ); if ($check_document_present ==1) { $pageObject->showItem("verify_button", $recordId); } else { $pageObject->hideItem("verify_button", $recordId); } To refresh the List page manually and trigger the button, I've added the following code to the Check Page> List page: JavaScript OnLoad event: this.on('afterInlineEdit', function( fieldsData ) { location.reload(); }); This works, and hides/shows the button as expected, however because I use the location.reload() the whole dashboard gets refreshed so it always ends up going back to the first Master record on refresh even if Im editing detail records for the 3rd master record. The standard edit code doesn't trigger the button display after edit. Is there a way of refreshing the check list page without changing the master record, or a way of keeping the master record selected after refresh. Thanks
|