on 10-23-2013 2:36 PM
Hello,
I am facing problem in instantiating Class object of SAPbobsCOM. The possible reasons I found on web is that the version of dll might be older which i am using for development than the actual application's version.
Code :
SAPbobsCOM.ActivityClass oAct = new SAPbobsCOM.ActivityClass();
Error :
“Retrieving the COM class factory for component with CLSID {5EC86D5B-840B-4676-8D5B-6154AD738D09} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)).”
Is there any other possibility for the error?
Best Regards,
Het Adhavryu
Hi Het,
B1 has factories for it's types. In the case of activities use the ActivitiesService.
ActivitiesService oActSrv = (ActivitiesService)oCmpSrv.GetBusinessService(ServiceTypes.ActivitiesService);
Activity oAct = (Activity)oActSrv.GetDataInterface(ActivitiesServiceDataInterfaces.asActivity);
ActivityParams oParams;
oAct.CardCode = "C001";
oAct.ContactDate = DateTime.Parse("15/01/2010");
oAct.Activity = BoActivities.cn_Conversation;
oAct.Notes = "Discuss next year's financial plan";
oParams = oActSrv.AddActivity(oAct);
long singleActCode = oParams.ActivityCode;
The sample above is from the SDK Help Center.
Best regards,
Pedro Magueija
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Het,
you should use getBusinessObject to do this.
Kind regards
Ad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
12 | |
10 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.