Dear All,
i am trying to do a small customization on business portal
i have found this white paper helpful in this matter ,
Using Web Services in Business Portal
http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=22249
when ever i try the code attached , to create the functionality descried in the white paper
it is given me the following error message
The Microsoft Business Framework must be started using EnterpriseSession.Initialize().
which is related to these lines
using Microsoft.BusinessFramework
using Microsoft.BusinessFramework.Entity;
//Method to use company database ID from BP session
public int GetDBID()
{
int dbID;
EntityKey eK;
eK = (Microsoft.Dynamics.Common.Company.Company.Key)EnterpriseSession.DefaultParentKey;
Microsoft.Dynamics.Common.Company.Company company = (Microsoft.Dynamics.Common.Company.Company)eK.GetEntity();
dbID = company.ID;
return dbID;
}
am i doing some thing wrong , or what
any help will be very thankful