Monday, November 28, 2011

Ribbon Disappered from the main page in MS CRM 2011

I faced and wired situation, suddenly the Ribon control has dissapered from the main page, even if traversed to other entities , the ribbon did not rendered.
But if i opened any record the ribbon was rendering.

I tried hit on google did not get any...
just opened the main.aspx.. nothing change i saw...

How i hit it?
Even if its not the proper, but this is how it solved... :P
1. Opened the main.aspx, and just put some junk code, then refreshed the browser
i got error as side pic

next i redo the changes and refreshed the page
i got the warning message as side pic
the clicked the link, "View the data that will be sent to Microsoft"
in the message i saw a JS file "/_static/_common/scripts/maincontrols.js" .
tot may be ots not rendering properly.
so make some wired changes and refresh
again undo the changes in JS file and refresh browser.
Then it has come up...
hurrey... :)
again i faced the same issue, where the Ribbons were coming for one Org not coming for others.
So the above did not work for me.
then i just tried to increase the Disc Space from 256 to 512 and then refreshed , it started working.
So may be the temp files filder is reaching to the limit and its unbale to download.
 But am not sure abt it.
But this has worked for me.


yes.sudhanshu

Sunday, November 27, 2011

Minimum permissions required for Microsoft Dynamics CRM Setup, services, and components

Minimum permissions required for Microsoft Dynamics CRM Setup, services, and components

Microsoft Dynamics CRM is designed so that its components can run under separate identities. By specifying a domain user account that is granted only the permissions necessary to enable a particular component to function, you help secure the system and reduce the likelihood of exploitation.
This topic describes the minimum permissions that are required by the user account for Microsoft Dynamics CRM services and components.
Microsoft Dynamics CRM Server Setup
The user account used to run Microsoft Dynamics CRM Server Setup that includes the creation of databases requires the following minimum permissions:
  • Be a member of the Active Directory Domain Users group. By default, Active Directory Users and Computers adds new users to the Domain Users group.
  • Be a member of the Administrators group on the local computer where Setup is running.
  • Have Local Program Files folder read and write permission.
  • Be a member of the Administrators group on the local computer where the instance of SQL Server is located that will be used to store the Microsoft Dynamics CRM databases.
  • Have sysadmin membership on the instance of SQL Server that will be used to store the Microsoft Dynamics CRM databases.
  • Have organization and security group creation permission in Active Directory directory service. Alternatively, you can use a Setup XML configuration file to install Microsoft Dynamics CRM Server 2011 when security groups have already been created. For more information see Use the Command Prompt to Install Microsoft Dynamics CRM.
  • If Microsoft SQL Server Reporting Services is installed on a different server, you must add the Content Manager role at the root level for the installing user account. You must also add the System Administrator role at the site-wide level for the installing user account.
Services and CRMAppPool IIS application pool identity permissions
The user account that is used for the Microsoft Dynamics CRM services and IIS application pools require the following permissions:
Important
Microsoft Dynamics CRM services and application pool identity accounts must not be configured as a Microsoft Dynamics CRM user. Doing so can cause authentication issues and unexpected behavior in the application for all Microsoft Dynamics CRM users.
Managed service accounts, introduced in Windows Server 2008 R2, are not supported for running Microsoft Dynamics CRM services.
Microsoft Dynamics CRM Sandbox Processing Service
  • Domain User membership.
  • That account must be granted the Logon as service permission in the Local Security Policy.
  • Folder read and write permission on the \Trace, by default located under \Program Files\Microsoft Dynamics CRM\Trace, and user account %AppData% folders on the local computer.
  • Read permission to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM subkey in the Windows Registry.
  • The service account may need an SPN for the URL used to access the Web site that is associated with it. To set the SPN for the Sandbox Processing Service account, run the following command at a command prompt on the computer where the service is running.
    SETSPN –a MSCRMSandboxService/<ComputerName> <service account>
Microsoft Dynamics CRM Asynchronous Processing Service and Microsoft Dynamics CRM Asynchronous Processing Service (maintenance) services
  • Domain User membership.
  • Performance Log Users membership.
  • That account must be granted the Logon as service permission in the Local Security Policy.
  • Folder read and write permission on the Trace folder, by default located under \Program Files\Microsoft Dynamics CRM\, and user account %AppData% folder on the local computer.
  • Read and write permission to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM and HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\MSCRMSandboxService subkeys in the Windows Registry.
  • The service account may need an SPN for the URL used to access the Web site that is associated with it.
Deployment Web Service (CRMDeploymentServiceAppPool Application Pool identity)
  • Domain User membership
  • That account must be granted the Logon as service permission in the Local Security Policy.
  • Local administrator group membership on the computer where the Deployment Web Service is running.
  • Local administrator group membership on the computer where SQL Server is running.
  • Sysadmin permission on the instance of SQL Server to be used for the configuration and organization databases.
  • Folder read and write permission on the Trace and CRMWeb folders, by default located under \Program Files\Microsoft Dynamics CRM\, and user account %AppData% folder on the local computer.
  • Read and write permission to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM and HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\MSCRMSandboxService subkeys in the Windows Registry.
  • CRM_WPG group membership. This group is used for IIS worker processes. The group is created and the membership is added during Microsoft Dynamics CRM Server Setup.
  • The service account may need an SPN for the URL used to access the Web site that is associated with it.
Application Service (CRMAppPool IIS Application Pool identity)
  • Member of the Active Directory Domain Users group.
  • Member of the Active Directory Performance Log Users group.
  • Folder read and write permission on the Trace and CRMWeb folders, by default located under \Program Files\Microsoft Dynamics CRM\, and user account %AppData% folder on the local computer.
  • Read and write permission to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM and HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\MSCRMSandboxService subkeys in the Windows Registry.
  • CRM_WPG group membership. This group is used for IIS worker processes. The group is created and the membership is added during Microsoft Dynamics CRM Server Setup.
  • The service account may need an SPN for the URL used to access the Web site that is associated with it.
IIS Application Pool identities running under Kernel-Mode authentication and SPNs
By default, Internet Information Services (IIS) 7.0 and IIS 7.5 Web sites are configured to use Kernel-Mode authentication. When you run the Microsoft Dynamics CRM Web site by using Kernel-Mode authentication, you may not need configure additional Service Principal Names (SPNs) for the Microsoft Dynamics CRM Application Pool identities.

Thursday, November 24, 2011

hide show tab, section, field on ms crm 2011

some times we need to hide/show ms crm 2011 tabs, sections or fields

hide/Show a tab
var tabs = Xrm.Page.ui.tabs.get();
tabs[n].setVisible(boolean);
where n  is the index value of the tab, starts from 0
 and boolean is true or false

hide/show a section
var sections = Xrm.Page.ui.tabs.get(n).sections.get();
sections[m].setVisible(boolean);
where n  is the index value of the tab, starts from 0
m  is the index value of the section in the tab, starts from 0
 and boolean is true or false

hide/show a Field(attribute)
Xrm.Page.ui.controls.get(
where boolean is true or false.

thanks
yes.sudhanshu
"<attributeName>").setVisible(boolean);

Friday, November 18, 2011

emable Disable a filed in ms crm 2011

just get the attribute and call the "setDisabled()" function.

guys do not use unsupported methids if the supported way is there.

example

        Xrm.Page.ui.controls.get("<attribute_name>").setDisabled(true);//will disable the field
        Xrm.Page.ui.controls.get("<attribute_name>").setDisabled(false);// will enable the field

yes.sudhanshu

Sunday, November 13, 2011

Optionset or Two Options field in MS CRM 2011

In MS CRM we have two options "OptionSet" or "Two Options".
If we need two values, what we need to take? can i go for Two Options?
the Pros and Cons are as follows....
1. in "Two Options" you can have only two values, and the default value will be either "Yes" or "No"
2. if you want to make the default value as "Unassigned", then its not available in "Two Options", so go for "OptionSet"
3. also in both the data type will be different


yes.Sudhanshu

Wednesday, November 2, 2011

MS CRM 2011 OData Query Designer

a great tool to save time for building OData queries by selecting filter criteria, select attributes and order by attributes, allows you to Execute the query and view the ATOM and JSON data returned.
Here is the link to get the tool.

hv fun....

yes.sudhanshu

Tuesday, November 1, 2011

how to add photo, image in ms crm 2011 frame

Some times we need to add photo to a contact or account records in ms crm 2011.
this can be done in bit tricky.
u should have the mapping photos in your system.
then just follow the followings...
1. create an iframe in the header of the account/conact form
2. add the web resource to it
3. create the web resource
 source code for web resource

<HTML><HEAD>
<META charset=utf-8>
<SCRIPT>
function chagePic(){
var _name = this.parent.document.getElementById("firstname").value;
if(_name != null & _name.length > 0){
document.getElementById("photo").src = "/_imgs/images/"+_name+".jpg";
}
}
</SCRIPT>
</HEAD>
<BODY contentEditable=true onload=chagePic()>
<DIV style="POSITION: relative; TOP: -14px; LEFT: -9px"><IMG style="WIDTH: 217px; HEIGHT: 162px" id=photo src="/_imgs/images/sample.jpg" width=229 height=162> </DIV></BODY></HTML>

here, in js, it will fetch the first name of the contact from the contact form.
and the photo name should be in that name as well in the system.
keep a sample photo, which will be used, if the photo in the name is not available in the system.

Set Required Level for attributes in MS CRM 2011

sometimes we need to make the attributes required level on basis of some logic.
so in javascript we can do as follows

Xrm.Page.data.entity.attributes.get("AattributeName>").setRequiredLevel("<requirementLevel>");

teh avlues are
One of the following values:


none
required
recommended

ms crm 2011 metadata browser

most of us knew that the metadata browser in ms crm 4.0 was something like
http://<serverename>:<portnumber>/<orgname>/sdk/list.aspx

but in ms crm 2011, this is not present in this way, directly.
so to get it we need to do any of the follwoings...

1. download the sdk from here and extarct it, then get the file "metadatabrowser_1_0_0_1_managed.zip" from the sdk->tools->metabrowser folder.
next import this in corresponding organosation by going to setting -> customization -> solutions.
so the metadata browser will be available under customization section as in the image.
by right clicking in the records, you have other options.

2. next you can use the tool in codeflex, available here, install it and use. it has export to excel in additionally.

hope this helps

yes.sudhanshu