I am facing an issue on duplicating the record.The issue is not on duplicating the current record but while duplicating the current record i need to duplicate the current tabpanel record also.
I have a form named contact and in that there tabpanel named address.While i am using the duplicateRecord function whats happening is the contact form itself gets duplicated.The tabpanel thats not duplicating.For duplicating the tabpanel i used the following first go for laodRecords then update that using the getFoundSetUpdater function and set that data in the colunm of the tabpanel by using the setColumn function.But i cant able to duplicate the tabpanel record.
please help me for duplicating the tabpanel aswell …
Thats i had a form named contact and in that form i had placed a tabpanel.Here i need to duplicate the current form record with the tabpanel relation record.
If i need to duplicate the current form then we use
controller.duplicateRecord(true)
For duplicating the form with tabpanel relation for example like this code
I know the first code that executed only duplicated.The next duplicating function willnot executed.But i need to merge both the code to one.If it happens then the current form including the relation will be duplicated.
How i can able to merge,is there any other option please instruct me Guru…
var fs = forms.yourform.foundset
var relatedFsArray = new Array('customers_to_addresses')
// Duplicate master record.
var dup = fs.getRecord(fs.duplicateRecord(false,false));
// save is needed if DB_IDENT sequence is used!!
databaseManager.saveData();
for(var k=0;k<relatedFsArray.length;k++)
{
var related = fs[relatedFsArray[k]];
for(var l=1;l<=related.getSize();l++)
{
var relatedOriginal = related.getRecord(l);
var relatedDub = dup[relatedFsArray[k]].getRecord(dup[relatedFsArray[k]].newRecord(false,false));
databaseManager.copyMatchingColumns( relatedOriginal, relatedDub);
}
}
No reaction takes place when the above code is executed Harjo.When i run with the savadata it mention that it is not a function.So i drop that.
Actually the real thing is when i use the
controller.duplicateRecord(true);
The duplicated form is present at the starting of the record.In that form the column are filled with the datas but the columns of the tabpanel relations are blank.
I need to fill with datas of all the columns including the relational tabpanel column after the duplication process is over.
the process happens in the background.
The method does duplicate your current record AND all your related records.
(That’s what I understand, what you want, right?)
The Duplication process is going on correctly.But after the duplication is there a way for displaying the duplicated form immediatly on the screen.Thats onshow duplicateRecords like that.just like duplicateRecords.
If there anything like that its very helpfull for me Harjo.
Thanks Harjo and Marchel for your continuous help,
The duplicating process on the background is working nice.But only thing i missed is to show the Duplicate form on the screen after the duplicate method is executed.