Displaying a lookup as a dropdown in a CRM 2011 form

In crm2011 through some customizations and javascript we can display Lookup filed as Dropdown by just following the steps mentioned here

Hope this helps..

 

 

 

Advertisements
Categories: CRM 2011 Tags:

How to get Object Type Codes of Entities in CRM 2011

Hi,

Below are the different ways to fecth the entities “Object Type Codes”

1) Using Metadata

We need to pass entity logicalname and Icrmservice here.

public string GetObjectTypeCode(string strEntityName, ICrmService service)

{

      // Execute RetrieveEntityMetadata.

Microsoft.Crm.SdkTypeProxy.Metadata.RetrieveEntityRequest entityRequest = new Microsoft.Crm.SdkTypeProxy.Metadata.RetrieveEntityRequest();

entityRequest.EntityItems = Microsoft.Crm.Sdk.Metadata. EntityItems.EntityOnly;

entityRequest.LogicalName = strEntityName;

Microsoft.Crm.SdkTypeProxy.Metadata.RetrieveEntityResponse entityResponse = (Microsoft.Crm.SdkTypeProxy.Metadata.RetrieveEntityResponse)service.Execute(entityRequest);

Microsoft.Crm.Sdk.Metadata.EntityMetadata entity = entityResponse.EntityMetadata;

return entity.ObjectTypeCode.Value.ToString();

}

2)Using SQL Query

SELECT ObjectTypeCode,*

FROM

ENTITYVIEW

 

3)Using JScript:

var ObjectTypeCode= Xrm.Page.context.getQueryStringParameters().etc

 

4) Link system entities object typecodes

http://technet.microsoft.com/en-us/library/ms955729.aspx

Categories: CRM 2011

CRM 2011 custom entity default prefix

This is picked from the publisher for the solution in which you are creating the entity . Like for default solution it is picked from Default publisher . you can go and change the prefix specified in the default publisher.
Navigation : Settings> Customizations>Publishers>

For more Info: here

Categories: CRM 2011

Dynamics CRM 2011 Developer Training Kit

February 21, 2011 Leave a comment

Very helpful training kit to learn the development features of Dynamics CRM with Videos , Presentations , Walkthoughs and much more …

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=78498c29-28ac-440b-9c20-ec5da6ee6e98

Categories: CRM 2011

Java Script to Hide form left navigation in crm 2011

February 18, 2011 Leave a comment

These code snippets will hide specific areas of the Form.

// Toggle the Ribbon Toolbar to Show/Hide (same as clicking the show/hide Ribbon button)
window.top.document.getElementById(“minimizeribbon”).fireEvent(“onclick”);

// Hide the Ribbon Toolbar and move the form Content area to the top of the window.
window.top.document.getElementById(“crmTopBar”).style.display = “none”;
window.top.document.getElementById(“crmContentPanel”).style.top = “0px”; // Move Form Content area up to top of window, initial style.top is 135px

// Hide Left Hand Nav bar / pane
document.getElementById(“crmNavBar”).parentElement.style.display = “none”;
document.getElementById(“tdAreas”).parentElement.parentElement.parentElement.parentElement.colSpan = 2;

// Hide the Breadcrumb and Record Set Toolbar
document.getElementById(“recordSetToolBar”).parentElement.style.display = “none”;

// Hide the Form Footer Bar
document.getElementById(“crmFormFooter”).parentElement.style.display = “none”;
—-

// show only information section in the form

// hide the related section and the table below it.

document.getElementById(“crmFormNavSubareas”).parentElement.style.display = “none”;
document.getElementById(“crmFormNavSubareas”).parentElement.parentElement.previousSibling.style.display = “none”;

Find more info here

Categories: CRM 2011

Characteristics of Plugins and Workflows

February 2, 2011 Leave a comment
Criteria Plug-in Workflow
Execution before or after the core platform operation (Create, Update, Delete, and so on) Executes immediately before or after the core operation (synchronous).Can also be queued to execute after the core operation (asynchronous). Queued to execute after the core operation (always asynchronous).
Performance impact on the server Synchronous plug-ins can increase the platform’s response time because they are part of the main platform processing.Asynchronous plug-ins have less impact on server response time because the code is run in a different process. Less impact on server response time because the code is run in a different process.
Security restrictions To register a plug-in with the platform requires a System Admin or System Customizer security role and membership in the Deployment Administrator group. Users can interactively create workflows in the Web application.However, to register a custom workflow activity, the deploying user must have the same security roles as those required for registering plug-ins.
Microsoft Dynamics CRM version (SKU) support Supported in Microsoft Dynamics CRM Online when registered in the sandbox. May be supported in partner-hosted installations at the discretion of the partner. Workflows without custom workflow activities are supported by all product versions. Custom workflow activities are not supported on Microsoft Dynamics CRM Online.
Length of processing time A plug-in registered for synchronous or asynchronous execution is restricted to complete its execution within a 2 minute time limit. Works well for either short or long processes.
Works when the Microsoft Dynamics CRM for Outlook client is offline Both online and offline are supported. Workflows do not execute when offline.
Process and data persistence Plug-ins execute to completion. Plug-ins must be written to be stateless where no in-memory data is persisted. Workflows can be paused, postponed, canceled, and resumed through SDK calls or by the user through the Web application. The state of the workflow is automatically saved before it is paused or postponed.
Impersonation Plug-ins can perform data operations on behalf of another system user. Workflows cannot use impersonation.
Categories: CRM 4.0

Javascript and CRM 2011

In crm 2011 the way to interact with objects thru JS is different than crm 4.0.
so for a simple way to make practice follow the followings

Please follow the below steps:

Create a .JS file and put the below code in file and Save the file.

function CallLoad()
{
var accountNameAttribute = Xrm.Page.data.entity.attributes.get(“”);
alert(accountNameAttribute.getValue());
}

1. Go to Customisations -> Account Entity -> Forms -> Open Main “Information” Form

2. Go to Form Properties.

3. Add a new Web Resource by pointing and uploading the file [Please specify the values when creating the Web Resource: Type = Script (JScript), Language = English, and upload the file.]

4. Once you upload and select the web Resource, Go to Event Handlers Section in Form Properties. select CONTROL = FORM and Event = OnLoad or OnSave

5. Add a new Libraty, Select Library = uploaded Web Resource EG: new_AccountJS [Web Resource Name]).

6. Specify the function name = CallLoad

7. Chech the Enabled check box.

8. Click Ok, Click Ok to close the Form Properites window.

9. Save the Form, Publish the Entity.

10. Refresh your CRM Applciation.

And, here you are all set to have fun with Javascript in CRM 2011 Beta.

Categories: CRM 2011