Hi Srinivas,
If you are properly connected to a company and object is also available, then there should be no such error.
I would suggest you to make sure that you are connected to a company. I use it like this:
SAPbobsCOM.GeneralService oGeneralService = null;
SAPbobsCOM.GeneralData oGeneralData = null;
SAPbobsCOM.GeneralDataParams oGeneralParams = null;
SAPbobsCOM.CompanyService sCmp = null;
SAPbobsCOM.GeneralData oChild = null;
SAPbobsCOM.GeneralDataCollection oChildren = null;
sCmp = SBO_Company.GetCompanyService();
oGeneralService = sCmp.GetGeneralService("CRTSERVCE");
Hope it is helpful.
Thanks & Regards
Ankit Chauhan