This topic is locked
[SOLVED]

 Edit all copied records in details table

1/20/2021 3:18:18 AM
PHPRunner General questions
Myr0n author

Hello

Somebody know how can I edit all records in a details table after the master and details are being copied with the copy button? also how to make stop adding a new blank record to the top of the details table after being copied ?

I tried this pageObj.inlineAdd.inlineAddChangeContent = true; but does not work.

I have activated the new records to the bottom with pageObj.addNewRecordsToBottom = true; but still adding a new blank record to the top when I use the copy button.
Thank you in advance.

Myr0n author 1/20/2021

I added this code to ListPage/Javascriptonload and do almost what I want but when I click on the save button only save me the record in the parent table no details table.

if ( pageObj.baseParams.masterpagetype === "add" ) {

pageObj.addNewRecordsToBottom = true; //even with this, add a blank new record to the top of the copied records.

The copyIdNoRecords var is the number of records that are in the details table with the copied ID.

//Add the Number of records that are in the copied record.

for (i = 0; i <= proxy['copyIdNoRecords']; i++) {

// add a cancel icon

pageObj.inlineAdd.getEditBlock( pageObj.inlineAdd.rows[i], false, false );

//edit the record

pageObj.inlineAdd.getControls(pageObj, pageObj.inlineAdd.rows[i], false, false, false );

}

}



Anybody have a clue?

Myr0n author 1/20/2021

I find out how to add the new record to the bottom in inline mode, you need to go to Pages, select inline add, click on Settings and choose to the top / to the bottom

Myr0n author 1/20/2021

To automatically edit all the details records in edit modethe following code works butnot in Add mode after copied records.

if ( pageObj.baseParams.masterpagetype === "edit" ) {

pageObj.inlineEdit.editAllRecs();

}
Myr0n author 1/20/2021

I hit the solved button per error, sorry but this thread still unsolved.

I don't know how to modify the copied records in details table.