1

I have a table. I want to clone a record. I added a button and in the OnClick event I have tried

var rowDataSource = widget.datasource;
// Instead of using the row  datasource for create, explicitly use the data source of your list.
var listDatasource = app.datasources.Change;
var createDataSource = listDatasource.modes.create; 
createDataSource.item.Systems.SystemName = rowDataSource.item.Systems.SystemName;
createDataSource.item.changeType = rowDataSource.item.changeType;

widget.datasource.createItem();
widget.datasource.saveChanges(); 

But this gave me error can't associate Data with Draft Records since I am using relational Database and my databases are in manual save mode. How to clone all field from one record and create a new record??enter image description here

Here Author name comes from the relational database and Timestamp is from the tables database.

Community
  • 1
  • 1
  • What does rowDatasource point to? Is there a reason this needs to be a manual save datasource, it makes the relation assignment a bit harder? – Markus Malessa Dec 06 '19 at 22:45
  • I have updated My code part, so now you can see where the rowDatasource is pointed. I don't want the datasource to save the data unless the user want to save it. – user11770778 Dec 09 '19 at 16:24

0 Answers0