How to activate a certification

Hi, everyone

I have a plugin that has the objective of create certifications, it is working well but at the end stops in “prepared” status. i wish i could change the status and activate the certification through the plugin, without manual changes. there’s a way to do it ?

Code example:

CertificationScheduler scheduler = new CertificationScheduler(context);
CertificationSchedule schedule = scheduler.initializeScheduleBean(requestor, Certification.Type.Focused);
schedule.setRunNow(true);
schedule.setActivated(new Date());
 
CertificationDefinition definition = schedule.getDefinition();

** set attributes for certification definition

TaskSchedule taskSchedule = scheduler.saveSchedule(schedule, false);

@cris try below code

definition.setStagingEnabled(false);
then save definition

let me know. thanks

1 Like

it worked, thank u so much!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.