Hi Sophie,
I gave a quick try on the below code snippet & it is working as expected. I have tried this on BI 4.1 SP3.
I am posting my code snippet below for your reference:
-----------------------------------------------------------------------------
import com.businessobjects.sdk.plugin.desktop.auditeventinfo2.IAuditEventInfo;
import com.businessobjects.sdk.plugin.desktop.auditeventinfo2.IAuditEventInfo.AuditEventLevel;
import com.crystaldecisions.sdk.exception.SDKException;
import com.crystaldecisions.sdk.framework.CrystalEnterprise;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
public class ConfigureAuditLevel {
public static void main(String[] args) throws SDKException {
IEnterpriseSession enterpriseSession=CrystalEnterprise.getSessionMgr().logon("Administrator", "<Password>", "<Your BO-Server Name>", "secEnterprise");
IInfoStore infoStore=(IInfoStore) enterpriseSession.getService("", "InfoStore");
IInfoObjects objs= infoStore.query("SELECT * FROM CI_SYSTEMOBJECTS WHERE SI_KIND='" + IAuditEventInfo.KIND + "'");
IAuditEventInfo auditEventInfo = (IAuditEventInfo) objs.get(0);
auditEventInfo.setCurrentAuditLevel(AuditEventLevel.COMPLETE);
infoStore.commit(objs);
System.out.println("Audit Level Changes Done!!!");
enterpriseSession.logoff();
System.out.println("Log off Success!!!");
}
}
-----------------------------------------------------------------------------
The changes are reflected back once we logoff from CMC & relogin again.
Can you please confirm that Auditing level changes are not reflected after relogging to CMC, after running the code?
Thanks,
Shailendra