Exporting more than 10,000 records to excel

Hi,

I want to show how to export more than 10,000 records from CRM to excel. By default, 10,000 records are permitted to export. To change this, simply access to the
_MSCRM database and open OrganizationBase table.

Edit column “MaxRecordsForExportToExcel”
and enter the value you want.

This is it.
Happy CRM.

Posted in MSCRM | Leave a comment

Invalid user authorization error

Hello everybody,

Today i faced a weird error. Suddenly CRM stopped working with an “invalid user authorization” error. After restarting the box, the problem disappeared. I had worked on this and found that it has something to do with <strong>”IIS Admin Service” </strong>and <strong>”World Wide Web Publishing Service”</strong>.

<strong>Restarting these two services</strong> resolve the problem, and CRM comes back. This is much better solution comparing to restarting the server.

I still have no clue, why suddenly a problem occurs on IIS Admin Service or World Wide Web publishing service. Maybe it has something to do with updates? I dont know.

Good days.

Posted in 4.0, MSCRM, Setup & Installation | Leave a comment

Setting field requirement level with javascript

Hi,

setting field level requirements through scripting is possible and helps a lot while customizing CRM.

Basically to change the requirement level, write the below code to your necessary event…(onChange, onLoad, onSave, etc…)

To set no requirement;

crmForm.SetFieldReqLevel(“fieldname”,0);

To set “business required” level:

crmForm.SetFieldReqLevel(“fieldname”,1);

To set “business recommended” level:

crmForm.SetFieldReqLevel(“fieldname”,2);

This is it.

Have fun.

Posted in 4.0, Form Scripting, MSCRM | Leave a comment

Modify web.config after installing rollup

Hello,

After you install Rollup for MSCRM, you should add below lines for CRM to work properly. Especially workflows encounter problem (you can not publish workflows) if you do not add below lines:

<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ Namespace=”System” TypeName=”Void” Authorized=”True”/>

<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ Namespace=”System” TypeName=”Math” Authorized=”True”/>

<authorizedType Assembly=”mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ Namespace=”System.Globalization” TypeName=”CultureInfo” Authorized=”True”/>

<authorizedType Assembly=”Microsoft.Crm.SdkTypeProxy, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ Namespace=”Microsoft.Crm.SdkTypeProxy” TypeName=”CrmService” Authorized=”False”/>

<authorizedType Assembly=”Microsoft.Crm.SdkTypeProxy, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ Namespace=”Microsoft.Crm.SdkTypeProxy.Metadata” TypeName=”MetadataService” Authorized=”False”/>

These lines shoud be added under <authorizedTypes> node which is a child node of <System.Workflow.ComponentModel.WorkflowCompiler>.

The source of this information can be found here.

Posted in 4.0, MSCRM, Setup & Installation | Leave a comment

Hide and show sections in MSCRM 4.0

Hi,

To hide the second section of the first tab, here is the code;

var sec = document.getElementById(“tab0″);
sec.childNodes[0].rows[1].style.display = “none”;

we need to keep in mind that all tabs and sections are zero-based index. because of this, first tab is called as “tab0″. For the same reason second row is called as “rows[1]“.

To show the section again,

var sec = document.getElementById(“tab0″);
sec.childNodes[0].rows[1].style.display = “inline”;

This is it, happy Crm customizations.

Posted in 4.0, Form Scripting, MSCRM | Leave a comment

Changing ports in Microsoft Dynamics CRM 4.0

Hello everyone,

After i installed Microsoft Dynamics CRM 4.0, i needed to change its port from 80 to 1923. After i completed changing the port from IIS, i also changed configuration in MSCRM_Config as well. Everything was going fine until i found out that plugins were having trouble.

I noticed that i skipped to change “LocalSdkPort” in registry, i did that too and now plugins are working as charm.

Summarizing, i made below changes after i switched ports:

SQL Server Databases:

MSCRM_Config, DeploymentProperties table:
1. Goto “DeploymentProperties” table and edit the below entries:
ADSdkRootDomain: Change the port number which you will notice on “nvarchar” column
ADWebApplicationRootDomain: Change the port number which you will notice on “nvarchar” column

Deployment Properties Table

Deployment Properties Entry Names

Deployment Properties Entries

2. Goto registry: HKLM\Software\Microsoft\MSCRM. Edit “LocalSdkPort” value and change it according to your new port.

Registry setting

This is it. Please note changing registry settings and MSCRM_Config database is a very risky process, do these on your own risk.

Posted in 4.0, MSCRM, Setup & Installation | Leave a comment

Showing Many to Many Relationships in an IFRAME

Hi,

Today i would like to show how we can show many to many relations in an  CRM IFrame. It is very similar to one to many relationships, except the parameter called “RoleOrd”.

Let’s think the relationship between “vehicles” and “spare part categories”. One vehicle may have many spare part categories,  and also one spare part category may belong to many vehicles.

To show this many to many relationship in an entity, we are using the below jscript code. You should register the code to “onLoad” event of CRM form.

var navSpareParts;
navSpareParts= document.all.navnew_contact_new_sparepart;

if(navSpareParts != null)
{
     navSpareParts.style.display = “none” ;
     document.all.IFRAME_SpareParts.src = “/sfa/conts/areas.aspx?oId=” + crmForm.ObjectId + “&oType=2&security=852023&tabSet=areanew_contact_new_sparepart&roleOrd=1“;     �
}
else
{
      alert( ‘ Navigation to spare parts could not be found. navnew_contact_new_sparepart does not exist ‘ );
}

Attention to roleOrd parameter!! That is the parameter required to show many to many relationships in IFrame.

Posted in 4.0, Form Scripting, MSCRM | 2 Comments

Blank.aspx error in MSCRM

Hi,

If some of the users see the below pop-up window every time they try to access to CRM, you should apply the following solution.

Blank.aspx error

Blank.aspx error

This problem occurs if hotfix KB953838 was applied to user’s computer.

Solution:

1. Remove hotfix KB953838.

Or,

2. When you are prompted to save the file, save it to desktop.
Open the file. Select IE, when you are asked to select program. Mark, always use too.

Happy coding.

Posted in 4.0, MSCRM, Setup & Installation | Leave a comment

Report Manager History Error

Hi,

When you are working with report subscriptions, it is most likely that you will require to see the history of the snapshots created. This list is managed through report manager.

report manager history screen

Normally you should screen no errors like shown above. But you may encounter a message like below:

“EXECUTE permission denied on object ‘xp_sqlagent_notify’, database ‘mssqlsystemresource’, schema ‘sys’.”

 

USE master

GO

GRANT EXECUTE ON master.dbo.xp_sqlagent_notify TO RSExecRole

GO

GRANT EXECUTE ON master.dbo.xp_sqlagent_enum_jobs TO RSExecRole

GO

GRANT EXECUTE ON master.dbo.xp_sqlagent_is_starting TO RSExecRole

GO

USE msdb

GO

– Permissions for SQL Agent SP’s

GRANT EXECUTE ON msdb.dbo.sp_help_category TO RSExecRole

GO

GRANT EXECUTE ON msdb.dbo.sp_add_category TO RSExecRole

GO

GRANT EXECUTE ON msdb.dbo.sp_add_job TO RSExecRole

GO

GRANT EXECUTE ON msdb.dbo.sp_add_jobserver TO RSExecRole

GO

GRANT EXECUTE ON msdb.dbo.sp_add_jobstep TO RSExecRole

GO

GRANT EXECUTE ON msdb.dbo.sp_add_jobschedule TO RSExecRole

GO

GRANT EXECUTE ON msdb.dbo.sp_help_job TO RSExecRole

GO

GRANT EXECUTE ON msdb.dbo.sp_delete_job TO RSExecRole

GO

GRANT EXECUTE ON msdb.dbo.sp_help_jobschedule TO RSExecRole

GO

GRANT EXECUTE ON msdb.dbo.sp_verify_job_identifiers TO RSExecRole

GO

GRANT SELECT ON msdb.dbo.sysjobs TO RSExecRole

GO

GRANT SELECT ON msdb.dbo.syscategories TO RSExecRole

GO

Posted in 4.0, MSCRM, Setup & Installation | Leave a comment

Custom web pages behaving differently when deployed to MSCRM

Hi,

I have been asked “why my web page behaves as expected on my local computer, but behaves unexpected when deployed to crm server” several times. A common symptom of this is, the values stored in a custom web page is lost when you deploy the site on MSCRM server.

Well, the reason is quite obvious. On the local computer the viewstate is enabled, but on mscrm server it is not.
To resolve this, you need to enable viewstate on your custom website’s web.config file.

On your website’s web.config file,
Locate “pages” element.
Add the attribute “enableViewState=true”.

This will resolve the issue.

Never, enable viewstate on MSCRM web.config file (usually under: C:\inetpub\wwwroot\web.config)
Viewstate is a big stuff of information, and will obviously decrease CRM’s performance if you enable it.

Happy coding.

Posted in 4.0, 4.0 SDK, Extending 4.0, MSCRM | Tagged | Leave a comment