How can I get the "SOFPART" attribute value of the document type object in the promotion?
How can I get the "SOFPART" attribute value of the document type object in the promotion?
SOFPART contains multiple string values
I wrote a code to deal with this situation, but the attribute value is empty. Where am I making a mistake?
CODE:
try {
wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice) primaryBusinessObject;
wt.fc.QueryResult qr = wt.maturity.MaturityHelper.service.getBaselineItems(pn);
while (qr.hasMoreElements()) {
java.lang.Object obj=(java.lang.Object)qr.nextElement();
if (obj instanceof wt.doc.WTDocument) {
wt.doc.WTDocument wtdoc = (wt.doc.WTDocument) obj;
wt.content.ContentHolder contentHolder = wt.content.ContentHelper.service.getContents(wtdoc);
wt.content.ContentItem item = wt.content.ContentHelper.getPrimary((wt.content.FormatContentHolder) contentHolder);
com.ptc.core.lwc.server.PersistableAdapter persistableAdapter = new com.ptc.core.lwc.server.PersistableAdapter(wtdoc, null, java.util.Locale.getDefault(), new com.ptc.core.meta.common.UpdateOperationIdentifier());
persistableAdapter.load("SOFPART");
SOFPART = (java.lang.String) persistableAdapter.get("SOFPART");
}
}
} catch (Exception wte) {
wte.printStackTrace();
}

