I used the above code to save my form multiple times. The problem is all the form gets saved in the same name and name doesn't change. How do I get rids of this!
for (int i=0; i < sampleName.length; i++)
String tmp = sampleName[i];
Sample formCopy = (Sample)sample.clone();
System.out.println ("Tmp is:" + sample.getName());
And also there seems to be some problem while deleting my records as it says "child record...available"