DFC Code & DFC Java API Example for Forms Creation
Hello All,
I am searching out for the Form related DFC Code Example, I have the requirement of Creation of Form Object & set/get the values in Form Object metadata.
I am new to Form Object DFC , I am searchig out for any Link through which I can download Form Object DFC & API can be downloaded ? or any Article by EMC specially for Forms DFC will be really helpful for me.
Thanks,
Comments
-
Try with this
import
com.documentum.fc.client.IDfClient;
import
com.documentum.fc.common.DfTime;import com.documentum.fc.common.IDfId;import com.documentum.fc.common.IDfTime;importimport com.documentum.fc.client.IDfSysObject;import com.documentum.fc.client.IDfSessionManager;import com.documentum.fc.client.IDfSysObject;import com.documentum.fc.client.IDfSessionManager; com.documentum.fc.client.IDfSessionManager;import com.documentum.fc.client.IDfSysObject;importcom.documentum.services.xforms.IFormService;
try
{ IDfClient client = DfClient.getLocalClient(); IDfSessionManager sMgr = getDfSession().getSessionManager(); IFormService FS = (IFormService)client.newService(com.documentum.services.xforms.IFormService.class.getName(),sMgr);
IDfId templateId = getDfSession().getIdByQualification("dm_xfm_form where definition_state = 2 and object_name=''tamplate_form_name");
if(templateId == null || templateId.isNull()) {
System.out.println("ERROR!!!");
} else {
IDfTime myTime = new DfTime();
String XFormInstanceObjectName = myTime.getDate().toString();
IDfId xFormObjectId = FS.createFormInstance(templateId, XFormInstanceObjectName, getPath("/Temp"), getDfSession().getDocbaseName());
String idForm = xFormObjectId.getId().toString();
if (idForma!="") {
IDfSysObject frm= (IDfSysObject);
getDfSession().getObject(new DfId(idForma));
frm.setString("object_name", "Object Name");
frm.save();
} else {
System.out.println("ERROR!!!");
}
}}
catch (DfException e) {
System.out.println("ERROR onClickNuevaSeccion msg: " + e.getMessage());
}
0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 103 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax