November Happy Hour will be moved to Thursday December 5th.

Cannot get account info from Salesforce

Vote:
 

I'm using the CRMBaseFactory with EPiServer 6 to get user details from Salesforce, and can successfully get the Contact details but not the Account details.  I'm using the following lines to get this:

            List<ICRMContact> contacts = CRMBaseFactory.Current.LoadContactsByEmail(new string[] { HttpContext.Current.User.Identity.Name });
            ICRMAccount account = CRMBaseFactory.Current.LoadAccountById(contacts[0]["AccountId"].ToString());

When debugging, I can see that I successfully get 1 object in contacts, but the keys and values in the account object are empty (count = 0).  Anyone know how I can find out what's going wrong?

Regards, Edmund

#42798
Sep 01, 2010 18:59
Vote:
 

Even if I try the following I get no accounts:

            List<ICRMAccount> allAccounts = CRMBaseFactory.Current.LoadAccounts();

#42822
Sep 02, 2010 11:56
Vote:
 

For your information, I found the solution to this problem was that one of the crmName attributes to one of the data mappings in the web.config had a mis-spelt entry.  It seems that if one of the attributes is wrong, none of them will be filled, even if the underlying object is initialised.  So the answer is double-check spellings of values of the attributes of items in the crmConnector->crms->entities section of web.config.

#43086
Sep 13, 2010 15:59
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.