Friday, July 16, 2010

What is CredentialCache Class in CRM SDK

The CredentialCache class stores credentials for multiple Internet resources. Applications that need to access multiple resources can store the credentials for those resources in a CredentialCache instance that then provides the proper set of credentials to the Internet resource when required. When the GetCredential method is called, it compares the Uniform Resource Identifier (URI) and authentication type provided with those stored in the cache and returns the first set of credentials that match.

The DefaultCredentials property contains the system credentials of the current security context. For client applications, these represent the user name, password, and domain of the user who is currently logged in. For ASP.NET applications, the default credentials are the user credentials of the logged-in user or the user being impersonated.

How to cancel Save Operation in MS CRM4.0

Pass this line of code to prevent saving the current items in CRM.
// Cancel the save operation.
event.returnValue = false;

Read-Only fields Values don’t get saved in the database.

After changing the value of a read-only field with JavaScript the new value will not be saved into the database.

To save the newvalue set the ForceSubmit property of the field to true.

crmForm.all.new_customfield.ForceSubmit = true;

Attach an Event for a Lookup in JavaScript MS CRM 4.0

Some time we required to call a JavaScript function after selection the Lookup value for this use the below line of code to attach event.

crmForm.all.objectid.attachEvent("onafterselect", javaScriptFunctionName);

Split the String values with a special character in MS Flow to convert this into Array

 Many times we have a requirement to prepare the Mailing address for some of the documents, suppose there are Address Line1, Address Line2, ...