5-1-4-6. Set Default Value When Copying Column
Set the default value ("AAAA", clear setting) in a record when row is copied in the table.
Apex class for extending page : SkyEditorClass
"ID" property of the target DataTable : dataTableSet1
global class MyExtender extends SkyEditor2.Extender { SkyEditorClass extension; SkyEditorClass.dataTableSet1 contacts; public MyExtender (SkyEditorClass extension) { this.extension = extension; this.contacts = extension.dataTableSet1; } global override void afterClone(SObject cloned) { RelationObject__c rObj = (RelationObject__c) cloned; rObj.Field1__c = ‘AAA’; rObj.Field2__c = null; } // TestMethod private static testMethod void testMyExtender() { Account acc = new Account(Name='Test'); insert acc; SkyEditorClass ext = new SkyEditorClass(new ApexPages.StandardController(acc)); MyExtender extender = new MyExtender(ext); contacts. cloneRows(); } }