Danny Varghese's avatarDanny Varghese's Blog

There’s a new property called “NoLock” added to the QueryExpression class for Microsoft Dynamics CRM 2011.  I found this researching a locking issue on the database we were having for a client.    According to the Microsoft CRM 2011 SDK:

“The benefit of setting NoLock to true is that it allows you to keep the system from issuing locks against the entities in your queries; this increases concurrency and performance because the database engine does not have to maintain the shared locks involved. The downside is that, because no locks are issued against the records being read, some “dirty” or uncommitted data could potentially be read. A “dirty” read is one in which the data being read is involved in a transaction from another connection. If that transaction rolls back its work, the data read from the query using NoLock will have read uncommitted data. This type of read makes…

View original post 35 more words

How to – Pass parameters to JavaScript Web Resource function in CRM 2011.


Hi,

Suppose we want to pass few values as parameter to our JavaScript function.

Here we have a JavaScript library named new_test which has GetParameters function.

Here we are passing three parameters

  1. Pass execution context as first parameter. (Check box)

Using getEventSource method we can get the name attribute’s value.

  1. Sample String Parameter” = string value.
  2. name” = string value with schema name of the “name” attribute.

We can use the attribute’s  name in our Xrm.page.getAttribute method.

The JavaScript function

The alert box

Hope it helps!

Advertisements

Showing custom warning message on an entity form in CRM


Hi,

I was searching for a way to show custom warning message in an entity’s form and came across these two helpful posts

For CRM 4 :-

http://social.microsoft.com/Forums/br/crmdevelopment/thread/1791ab40-a1e6-4099-bb4b-6e52a9a45c18

For CRM 2011 : –

http://crm2011wiki.wordpress.com/2012/04/16/showing-custom-alerts-in-notifications-area/

Hope it helps.

 

“Object doesn’t support property or method ‘setFormMode’” error while closing the record’s form in CRM 2011.


Hi,

We had recently written a plugin for sending email. In the description of the email we were inserting the URL of the record

string recordUrl = string.Format(“<a href=’{0}/userdefined/edit.aspx?etc=4300&id={1}‘>Click here to open the record</a>”, this.serverName, marketingListGuid.ToString());

While clicking the link the record opens properly, however when we try closing the form’s window we get the below error

We have UR8 installed in our on premise development environment there we don’t get this error, however we are still getting the above error for our online dev and production environment.

http://social.microsoft.com/Forums/lv-LV/crmdevelopment/thread/0c0aa09e-0ea6-4150-8056-a2b7b91f3256?prof=required

Bye.

“The import file is too large to upload” error while importing csv file of more than 8 mb in CRM 2011.


Hi,

I was importing a csv file of size 11 mb using import data feature and got the below error.

The unsupported way we can resolve it for our on premise environment is by running the following update query against MSCRM_CONFIG database.

UPDATE ServerSettingsProperties

SET IntColumn =15

where columnname=‘ImportMaxAllowedFileSizeInMB’

Also refer to this support article

http://support.microsoft.com/kb/918609

Bye.

“System.ArgumentException: The specified string is not in the form required for a subject” error while sending mail through plugin in CRM 2011.


Hi,

We were getting the above error in one of our plugin which was using SendEmailRequest to send mail.

As it turned out it was because of the subject not being in proper format in the template

 

 

Hope it helps.