In my past blog posts, I had mainly concentrated on the data security and management. I this post I will talk more about code base security. In day to day life the code security is most important task of management. Sage CRM has incorporated code base security by using .Net API. From Sage CRM 6.1 version Sage has provided .Net API which has made coding as well as life easiest.
In the latest Sage CRM versions Sage has improved an added many features for developer to use. Now if you are using .Net API and experienced any hurdle/problem then you can have a look at the below check points.
1. System’s Dot Net Dll Directory Path:
Sometimes whenever we prepare UAT or Development system, we usually restore the production database backup and maintain the latest system. In this case what happen is:
– We are not able to get the “.Net Admin” option at Administration > System as:
OR
– Not able to get the “customdotnetdll” option in the “Action” at Tab level customization as:
Now if you are facing this issue then you can try below settings and check:
– Basically Sage CRM stores the path where we should put the Dot Net Dlls. That path is set in the custom_sysparams table.
– You have to fire the below query in your CRM database to set the correct path. Generally this path is default to you CRM instance path (e.g. “C:SageCRMCustomDotNet”)
UPDATE custom_sysparams SET parm_value=’C:SageCRMCustomDotNet’
WHERE parm_name = ‘DotNetDllDirectory’
– After this data update, you will have to do CRM metadata refresh and IIS reset.
2. Calling dot net dll at tab level or from within dll methods:
Few days back I was working on the application in which I was supposed to call one dll on a company tab group named as Greytrix.CRM.dll. And the second dll named as CRMProject.dll at Opportunity tab level. I had added the new tab at company level with:
– Custom Dot Net Dll Name = Greytrix.CRM
– Method Name = RunCompnayTab
Same way at opportunity level as:
– Custom Dot Net Dll Name = Project
– Method Name = RunCompnayTab
Now here the tab at opportunity level is working fine but at company level I was getting the error message as:
After some investigation I came to know that if the DLL name contains the “.” in the name itself (like Greytrix.CRM) then we have to use it with “.dll” (like Greytrix.CRM.dll). These steps should also be followed whether preparing URLs in the solution code.