Declaring formal records using code

Gsk7Gsk7 Gautam Kamath
edited May 17, 2011 in Documentum Developer Forum


I want to declare an electronic record as formal record using code..The code consists of the following:

FormalRecordBean fb =new FormalRecordBean();

List templateIdList=(new XFormsUtils()).lookupXFormsTemplateList(session, "dmc_rm_formal_record");

IDfId formTemplateId =new DfId(templateIdList.get(0).toString());


fb.setFilePlanPath("");  //consists the path given in the fileplan



//create formal record shell

IDfId fId = frs.createFormalRecordShell(fb);

This code gives a runtime exception(Null pointer exception) at last line i.e while creating the formal record shell

The error is as follows:

Exception in thread "main"


at com.documentum.records.util.RecordUtil.isAspectAttached(

at com.documentum.records.util.RecordUtil.isPolicyManaged(

at com.documentum.rm.formal.FormalRecordService.meetsPolicyManagedRequirement(

at com.documentum.rm.formal.FormalRecordService.canDeclareFormalRecordInFolder(

at com.documentum.rm.formal.FormalRecordService.canDeclareFormalRecord(

at com.documentum.rm.formal.FormalRecordService.createFormalRecordShell(

at RecordsDeclare.declareRecords(

at RecordsDeclare.main(

Can anybody provide me the solution to this problem.

Thanks in advance



  • am also facing same issue, it would be great if you could provide if this issue has been resolved.

Sign In or Register to comment.