IIQ Version 8.5
Problem Statement:
I want to set/add a classification via custom code. Removing a classification works, but adding one fails with the error “incompatible types: Classification cannot be converted to ObjectClassification” when calling bundle.addClassification(classf). I’ve included the relevant code snippets for reference; please advise how to correctly add a classification.
Code Snippets:
Bundle bundle = context.getObjectByName(Bundle.class, “Finance Approver”);
Classification classf = context.getObjectByName(Classification.class, “Compliance”);
bundle.addClassification(classf);
context.saveObject(bundle);
context.commitTransaction();
Error:
incompatible types: Classification cannot be converted to ObjectClassification
bundle.addClassification(classf);