Tuesday, February 7, 2012

Early Bound – generate Entity class

Early Bound – generate Entity class

CRM 3, 4 and now in 2011 have 2 options to work with attributers.

Strong type (early bound) and Late bound Dynamic Entity\Entity)

The different code between two options:

If you need to work for CRM online strong type not good for you because plugin issues.

Nice to work strong type and maybe faster but I prefer Entity

1 strong type example:

Contact c= new contact

c.firstname = “rami;

 2. late bound (dynamic entity was for CRM 3, 4):

Entity c= new Entity (“contact”);

C[“firstname”]= “rami”;…..

To generate data.cs file with metadata attributes need to use file:crmsvcutil.exe

Crmsvcutil.exe must reference the next files:

1.       Microsoft.xrm.client.codegeneration.dll

2.       Microsoft.xrm.client.dll

3.       Microsoft.xml.sdk.dll

Create Bat file CreateMetadata.bat and set inside the next command:

Define:

CrmSvcUtil.exe /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration" /out:OutputfileName/url:http://Server/organizationName/XRMServices/2011/Organization.svc /domain:DomainName/username:UserName/password:password/namespace:Xrm /serviceContextName:XrmServiceContext

 Example:

CrmSvcUtil.exe /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration" /out:Xrm.cs /url:http://crm2011/CRM/XRMServices/2011/Organization.svc /domain:CONTOSO /username:administrator /password:pass@word1 /namespace:Xrm /serviceContextName:XrmServiceContext

After run the batch file get file Xrm.cs.

Now u can use this file in your code. (Don’t forget to generate after change the entities.

Enjoy,
Rami Heleg

Multiple Forms for Each Entity

A new feature in CRM 2011 has been added is Multi Forms.

Multi forms used to create and custom Main page and change the layout for each forms.

The example for this feature if customer has a few Business Unit and each one of them should see case (incident) with a different fields (different layout)

Example:
Define the form layout
  Assign security roles to view the forms

Publish the changes and connect with user assign to security role. (Need to remove the default Main Form from the relevant security role.
1.       In summary this feature ( I think this is more the standard feature) very very useful to develop a good program from correct customer structure
Enjoy,
Rami Heleg

Field security Profile

Field security Profile

A new feature in CRM 2011 has been added is Field Security Profile

This option manages view\hide\edit fields.

The feature is very used because in CRM 3, 4 we used to hide fields and now it is in the box

Example:

1.       Create a new field and change the property Field Security = Enable


2.       Add field to entity

1.       Publish the change and view the field.
2.       Now the next step is to define the authorization
3.       Open solution and select field security Profiles, create a new record like next example:
 

set name and description
Define permission for the field. (Get this field because was defined has security field
In this example I add users for this example but because I use a diffident user which not added user should see the value
Enjoy
Rami Heleg.



Saturday, February 4, 2012

Global Option set

Global option Set
New feature in CRM 2011 is a global option list.
advantage of this option is to use the same option list ,the same order in many entites.

I want to create a new option list and use in a few entities

1.       Add global option set and set values



2.       Create new field for relevant entity




3.       Publish

Thanks,
Rami Heleg

Friday, February 3, 2012

CRM 2011 – Create a new activity entity

In CRM versions 3, 4 many developers customize existing activity like phone call, email, letter for a different target. CRM 2011 add the ability to create a new entity based Activity and like the create and the linked to entities.

2. publish the change and view the option to create mobile entity
3. mobile dialog opened:

Bye,
Rami Heleg

Customize Queue Items views

CRM 2011 – View Queue
CRM 3, 4 contain limitation to custom queue screen.
 The solution for CRM 3, 4:  create custom pages (a lot of work, I did it in CRM 4).
CRM 2011 allows customize Queue item screen and add columns from all related entities.

Steps:
1.       Open solution
2.       Add existing entity and select Queue Item

      3.    Open record All Items

       4.       Select fields from required entity

       5.  Save and Publish

Thanks,

Rami Heleg