Hello, I am new in LAPI and I am writing an interface with LAPI/JAVA.
I am having problems creating a discussion topic.
I can create API_DOCUMENTS.DISCUSSIONSUBTYPE objects under a specific folder, but when I try to add a topic to this discussion object I get an error, Status Message: Container Error.
I am using the following code:
public void createDiscussionTopic(LLValue folder, String topicSubject,
String topicBody)
{
int result;
LLValue objectInfo = (new LLValue()).setAssocNotSet();
LLValue createInfo = (new LLValue()).setAssocNotSet();
LLValue Content = new LLValue().setAssoc();
LLValue Comment = new LLValue().setAssoc();
Content.add("Content", topicSubject);
Comment.add("Comment", topicBody);
createInfo.add("requiredAttributes", Content);
createInfo.add("requiredAttributes", Comment);
log.debug("CreateDate: " + folder.toString("CreateDate"));
result = this.doc.CreateObjectEx(folder.toInteger("VolumeID"), folder.toInteger("ID"),
LAPI_DOCUMENTS.OBJECTTYPE, LAPI_DOCUMENTS.TOPICSUBTYPE, "Topic01",
createInfo, objectInfo);
connector.getStatus();
}
Can anyone help?
Rgds,
Hugo Torres
I am having problems creating a discussion topic.
I can create API_DOCUMENTS.DISCUSSIONSUBTYPE objects under a specific folder, but when I try to add a topic to this discussion object I get an error, Status Message: Container Error.
I am using the following code:
public void createDiscussionTopic(LLValue folder, String topicSubject,
String topicBody)
{
int result;
LLValue objectInfo = (new LLValue()).setAssocNotSet();
LLValue createInfo = (new LLValue()).setAssocNotSet();
LLValue Content = new LLValue().setAssoc();
LLValue Comment = new LLValue().setAssoc();
Content.add("Content", topicSubject);
Comment.add("Comment", topicBody);
createInfo.add("requiredAttributes", Content);
createInfo.add("requiredAttributes", Comment);
log.debug("CreateDate: " + folder.toString("CreateDate"));
result = this.doc.CreateObjectEx(folder.toInteger("VolumeID"), folder.toInteger("ID"),
LAPI_DOCUMENTS.OBJECTTYPE, LAPI_DOCUMENTS.TOPICSUBTYPE, "Topic01",
createInfo, objectInfo);
connector.getStatus();
}
Can anyone help?
Rgds,
Hugo Torres