Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

EPiServer Connect with Salesforce

Vote:
 

Hi All,

i have EPiServer 6 R2, a developer account in SalesForce CRM, and I have installed the 'EPiServer Connect For CRM' module with the relevant details to connect to Salesforce. Using the GUI during installation, I tested the connection and it connected successfully.

I would like to now retrieve details from Saleforce. I have been looking at this article and I notice it mentions the CRMBaseFactory. So I then added references to the connector dlls installed by the Connector module - i.e.) EPiServer.CRMConnector.Core..

However, when I instantiate an instance of the CRMBaseFactory, I get a 'Cannot find LicenseSettingsAttribute in assembly' exception.

code:

 if (CRMBaseFactory.Current.TestConnection())
{
var contacts = CRMBaseFactory.Current.LoadContacts();
}
 
Any help would be greatly appreciated.
Thank You

 

#52614
Aug 05, 2011 10:06
Vote:
 

Hi,

Without having seen the stacktrace, I assume this exception is a LicenseException? If that is the case, do you have a lisence file for the CRM Connector?

Also, the CRMBaseFactory class creates instances of your business entities according to the settings in your web.config file. Maybe you could double check if your settings are correct (although they should be as you tested the connection during the installation).

Hopefully this gets you a small step forward :)

Karoline

#52622
Aug 06, 2011 0:49
Vote:
 

Hi Karoline, and thank you for your response - it was very beneficial.

My understaing was that you need a license for the site and I have a demo license for that. I wasn't aware that you need a separate license for the connector module.

Does that mean that once the site is ready to go live, our customers would require two licenses - one for the site and one for the Connect for CRM?

Also, regarding using the CRMBaseFactory class, I had to add references to the Connect dlls that were placed in the bin directory by the Connect module installation. Is there anything else I should have done?

Thank you

#52625
Aug 06, 2011 16:51
Vote:
 

Hi,

You also need a licence for EPiServer Connect for CRM. You can get a demo license here: http://license.episerver.com/public/GenerateDemoLicense.aspx

This means that your customer will need two licenses, one for the site and one for the connector. I can't remember the exact price of the license, but you can contact EPiServer if you need information about the pricing model.

As long as you add a license, reference the Connector dll's and configure the Connector as described in the article you've mentioned in your first post, you should be able to connect to Salesforce using CRMBaseFactory :)

Karoline

#52628
Edited, Aug 07, 2011 15:30
Vote:
 

Hi Karoline,

You've been a great help. Thank You

#52652
Aug 08, 2011 14:03
Vote:
 

Hi Karoline,

I have installed a demo license for the connector now and added the following code in the test Alloy site:

(Line 37.)   var x = CRMBaseFactory.Current.LoadAccounts();

...but I still get the following license exception:

[LicenseException: Cannot find LicenseSettingsAttribute in assembly]
   EPiServer.Licensing.LicenseRuntime.GetSettings(Assembly caller) +172
   EPiServer.Licensing.LicenseRuntime.ValidateLicense(String licenseFilePath) +44
   EPiServer.Licensing.LicenseRuntime.ValidateLicense() +6
   EPiServer.CRMConnector.Business.Common.CRMBaseFactory.GetByName(String name) +28
   EPiServer.CRMConnector.Business.Common.CRMBaseFactory.get_Current() +26
   EPiServer.Templates.Default.OnLoad(EventArgs e) in C:\EPiServer\Sites\AlloyTech\Default.aspx.cs:37
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

I notice that according to this article, I should also have a "EPiServer.CRMConnector.License" dll which I dont seem to have.

Just to clarify, I am using EPiServer CMS 6.2 and the EPiServerConnectForCRM 1.2 R2 and I have installed the Connect for CRM template package.

Any Ideas? - Thank you for your time.

#52675
Aug 09, 2011 13:11
Vote:
 

Hi Mohammed,

I've dug deep into the EPiServer assemblies in order to figure this out, but this it quite a challenge ;)

All modules that require a license have a custom attribute called LicenseSettings. The EPiServer.CRMConnector.Business.dll has this attribute.

When you use the CRMBaseFactory, the first thing that happens in the code is a check for a valid license. This is done in the EPiServer.Licensing.LicenseRuntime.ValidateLicense() method (as you can see from the stacktrace). In this method, the LicenseSettings attribute from the EPiServer.CRMConnector.Business.dll is retrieved in order to check the license file. The problem is that the attribute cannot be found (although the dll has it), and an exception is thrown. 

In the previous version of the CRM Connector (version 1.2), the licensing was handled by ElektroPost.Licensing instead of EPiServer.Licensing. So I'm gussing the transmission to EPiServer.Licensing has caused a bug in the CRM Connector.

If I were you, I'd register a Support Incident for this: http://world.episerver.com/Support/Register-Support-Incident/
EPiServer will probably be able to shed more light on this issue :)

Let me know how it goes, I'm dying to know what the issue is!

Karoline

#52679
Aug 09, 2011 16:40
Vote:
 

Hi,

The article was a bit outdated, now it is updated. You need only demo/developer license file ConnectForCrmLicense.config.

Regarding mentioned LicenseException: this is a bug in EPiServer Framework, the problem is related to JIT code compilation and optimization. This issue will be fixed in next release.

You can contact our Support department and officially request a hotfix, if this issue is critical for you.

For now you can try to build your code in Release mode and see if you still get the same license exception. Please let me know how it goes.

#52826
Aug 16, 2011 13:26
* 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.