Tuesday, January 31, 2012

Entity, Form, Attribute, Field, View , Section, Tab names length :P in MS CRM 2011

Hi just a quick observation in MS CRM 2011, but its funny. no consistency ...
just check the fields display name and schema name length for different types of items.


Item
DisplayName
SchemaName
Entity
50,plural also 50
39+4
View
100
 + 4 for new_
Field
50
41+4
Lookup Type Field
unlimited
unlimited
Section
100
100
Tab
255
255
Subgrid
255
255
WebResource
100
100
Iframe
100
RelationshipName
41 + 4
lookup field
50
41+4


ha haaa.... FUNNY...

yes.sudhanshu 

Monday, January 30, 2012

N:N (many to Many) Relationship in MS CRM 2011

N:N (many to Many) Relationship in MS CRM 2011 is good feature to build up direct relationship from UI.
This is a good link to go through it. http://www.dynamicscrmtrickbag.com/2011/05/08/many-to-many-relationships-in-dynamics-crm-2011/

If we are going through system N:N relationship, how can we bind records by through CODE?
its the same way as we used to do with 1:N and N:1.
System also used to take the help of the intermediate entity which keeps the GUID from the both main entities.
Suppose we want to create an N:N relationship between new_EntityA and new_EntityB.
So the system will create an intermediate entity called new_new_EntityA_new_EntityB (this can be renamed), this will contain its own guid as well as guid of other two entities new_EntityA and new_EntityB.

So if we want to create N:N relation then just put the EntityReference of new_EntityA to new_new_EntityA_new_EntityB and new_EntityB to new_new_EntityA_new_EntityB .

Actually internally, the system builds 1:N relationship from new_new_EntityA_new_EntityB to new_EntityA and again 1:N relationship from new_new_EntityA_new_EntityB to new_EntityB.
So there is a relationship of N:N from new_EntityA to new_EntityB.

thanks,
yes.sudhanshu

Friday, January 27, 2012

The option value you specified does not use this solution's option value prefix (10,000).


If we are creating an optionset value in MS CRM 2011, then if we will enter any value other than 1,000,001 format or less than this it will prompt something as the attached image.



This can be configured as teh side image in settings -> Customization -> Publishers -> Default Publisher

check as the highlighted value. This picks from here.

Tuesday, January 17, 2012

The Group PrivReportingGroup is not valid. A Referral was retrurned from the server. MS CRM 2011 installation

while installting MS CRM 2011 with pre created groups in AD, i got the following error
"The Group is not valid. A Referral was retrurned from the server"
this has come for the "PrivReportingGroup".
for other groups it passed.

Solution

the group has been given the "Global" group scope by default.
This i did not know as i was not given acces to AD,  by the client.
Dimain Local was disabled in the AD, so i tried with "Universal" one.
then i need to make “AutoGroupManagementOff”  was set to true.
with False  it did not work, do not know why?

thanks,

yes.sudhanshu

Sunday, January 15, 2012

getting the simple OrganizationServiceProxy Service in MS CRM 2011

 this may help in creating console applications, to test few things before putting in plugin or nay type of interface dlls.
just to test we can create a console application and try the scenarios as possible.
to do so we can create the service object of "OrganizationServiceProxy" as follows
add the corresponding the namespaces...

ClientCredentials creds = new ClientCredentials();
creds.UserName.UserName = "<username>";
creds.UserName.Password = "<password>";
IOrganizationService service = new OrganizationServiceProxy(new Uri("http://<serverName>:<portNumber>/<orgName>/XRMServices/2011/Organization.svc"), null, creds, null);


then u can use the service object to execute,create,update or delete functions.

thanks,

yes.sudhanshu

Thursday, January 12, 2012

tcp provider error 0 no connection could be made because the target machine actively refused it miscosoft sql server, error: 10061 MS CRM 2011

some error has come while using MS CRM.
It was due to the SQL server not getting connected and it was not listeing from out side the server as well as from the same server.
the error was as "tcp provider error 0 no connection could be made because the target machine actively refused it miscosoft sql server, error: 10061"

I have checked the TCP and the pipeline are enabled and the services were running except the SQL Server(MSSQLSERVER) service.
when ever i was starting the service and refreshing the service was getting stopped again and again.
so only it was not working.

i have just added ;-T902 at the "Startup Parameters" of the properties of the "SQL Server" in advance tab as in the image.
then restaretd the services, then it has come upp....

thanks,
yes.sudhanshu

Wednesday, January 11, 2012

Log file path for installation of MS CRM 2011 or MS CRM

the log file will be created in the following path in the name of the time and the type of process
C:\Users\<userName>\AppData\Roaming\Microsoft\MSCRM\Logs
userName : Administrator or the user name that you are using for installation

Tuesday, January 10, 2012

Change the icon of Site Map items in MS CRM 2011 online

How we can change the sitepam icons in MS CRM 2011 online as in the side image?
As we do not have access to the server disc space, so we can not load the images and use the url in the sitemap.xml.

for custom entities you can dos o by clicking the "update icon" button in the tool bar on top from the customization -> click the entity form the left side entity list.

for this, just upload an image of size 24x24 into the web resourcses and use the relative url in the sitemap.xml file.
this will work for sure.

thanks,

yes.sudhanshu

File (Empty File) attachement in MS CRM 2011

If you are attaching any file, which are empty, the MS CRM will prompt that the "Empty File", The specified File is either empty or does not exist. Check the file name is correct or specify a different file and try again.
as in the side image.

Monday, January 9, 2012

Access Denied Error in REST Query in MS CRM 2011

I was using the REST to fire some query.
i was using the context.getServerURL() to get the generic URL with the org name.
wheni was using the IP or the localhost, i got the "access denied issue".
 so if you will use the servername , then the issue will not come.

thanks,
yes.sudhanshu

Sunday, January 8, 2012

The specified entity does not exist ms crm 2011 rest point call

i was using a REST call from javascript for an entity, suppose new_test
if i use the url(query) as the entity name with out Set with the entity, then it will give error "The specified entity does not exist"."/XRMServices/2011/OrganizationData.svc/" +  "new_patient?$top=1&$filter=new_Name eq '" + "test" + "'";
serverUrl +

so make it
serverUrl + "/XRMServices/2011/OrganizationData.svc/" +  "new_patientSet?$top=1&$filter=new_Name eq '" + "test" + "'";
Also make sure that attribute names ex; new_name is as new_Name, if its as new_Name, n is caps letter, else it will show the speficied column is not present.

thanks,

yes.sudhanshu

Friday, January 6, 2012

ms crm 2011, console application does not work, dlls do not detect

If you will create a direct console application for MS CRM 2011 and try to add the Microsoft.Xrm.Sdk.dll
Then if you are getting built error as using Microsoft.Xrm.Sdk does not work, then make sure the Target in the properties file of the project is as “.NET Framework 4” instead of “.NET Framework 4 Client Profile.”

Thursday, January 5, 2012

Build a Console Application That Connects to Microsoft Dynamics CRM 2011 Using Developer Extensions

Build a Console Application That Connects to Microsoft Dynamics CRM 2011 Using Developer Extensions

Create a New Console Application Project in Visual Studio

  1. Create a project in Visual Studio Create a new console application named “ConsoleAppWalkthrough”.
  2. Add the following references from the SDK\bin folder.
    • AntiXSSLibrary.dll
    • Microsoft.Crm.Sdk.Proxy.dll
    • Microsoft.Xrm.Client.dll
    • Microsoft.Xrm.Portal.dll
    • Microsoft.Xrm.Portal.Files.dll
    • Microsoft.Xrm.Sdk.dll
  3. Add the following references from .NET.
    • Microsoft.IdentityModel.dll
    • Microsoft.ServiceBus.dll
    • System.Data.Services.dll
    • System.Data.Services.Client.dll
    • System.Runtime.Serialization.dll

    If you do not have the Microsoft.IdentityModel.dll file, you must install Windows Identity Foundation .
  4. Set target frameworkMake sure the console project is specifying “.NET Framework 4” as the target framework and not “.NET Framework 4 Client Profile.” Check the properties of the project by selecting the Console project in Solution Explorer and clicking Alt-Enter.
The step 4 is important , so make sure the option is “.NET Framework 4” as the target framework and not “.NET Framework 4 Client Profile.”.

Thanks,
yes.sudhanshu

New DataTypes in the MS CRM 2011

In Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online, the programming model has been changed to use native .NET types whenever possible.

Type Mapping Between Versions
The following table shows the mapping between the defined type for an entity attribute, the type that is used in a record, and the type that was used in Microsoft Dynamics CRM 4.0.


AttributeTypeCode
Microsoft Dynamics CRM 2011 type
Microsoft Dynamics CRM 4.0 type
long
N/A
bool
EntityCollection or CalendarRules[]
System.DateTime
decimal
double
string
Attributes with ObjectTypeCode in DisplayMask
int
N/A
string
System.String
EntityCollection or ActivityParty[]
AttributeType. Uniqueidentifier (Formerly PrimaryKey)
System.Guid
string
System.String
OptionSetValue or enumeration generated for the entity state
EntityNameStateInfo
System.Guid
Not used in records.
Not used in records.



Other Type Changes
The following table lists other notable type changes that were not listed in the table above.


Microsoft Dynamics CRM 4.0 type
Microsoft Dynamics CRM 2011 type