tag:blogger.com,1999:blog-35214147575097654652024-03-21T05:22:19.669-07:00MS CRM 4.0 HospitalSome of my experience on MS CRM 4.0.yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.comBlogger76125tag:blogger.com,1999:blog-3521414757509765465.post-87140613791743306542014-02-06T20:54:00.000-08:002014-02-06T20:54:06.809-08:00Unable to validate SQL Server Reporting Services Report Server installation. Please check that it is correctly installed on the local machine. MS CRM 4.0 srsconnector installation on report server<div dir="ltr" style="text-align: left;" trbidi="on">
while installing the srsConnector for MS CRM4.0 I got the below error....<br />
<br />
"<strong>Unable to validate SQL Server Reporting Services Report Server installation. Please check that it is correctly installed on the local machine.</strong>"<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX8EF8pr4cRXUh7KTu8kuRlsqpUidaGzOQEliAfPRiAvj-leBC8HpwJ9ohQYsXNddMwMlgyKpg9z1Y3BtPIJtO2hp8kb2vGgtIHYvJlKKfZ6FGOK92DlajvUqephaFJRHzooNwbMGFi8rf/s1600/srsconnector_error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX8EF8pr4cRXUh7KTu8kuRlsqpUidaGzOQEliAfPRiAvj-leBC8HpwJ9ohQYsXNddMwMlgyKpg9z1Y3BtPIJtO2hp8kb2vGgtIHYvJlKKfZ6FGOK92DlajvUqephaFJRHzooNwbMGFi8rf/s1600/srsconnector_error.png" height="242" width="320" /></a></div>
<br />
then after asking to google, got to know you must use the patches as my servers are not connected to internet.<br />
<br />
you need to use config files and do command line installation.<br />
so include the patch in the config as below...<br />
you will find the '<strong>install-config.xml</strong>´ under the srsConnector folder.<br />
add the below tags inside <crmsetup> </crmsetup><br />
<br />
<em><patch update="true"><path folder="" kept="" the="" to="" u="">\SRS_ENU_amd64.MSP</path></patch></em><br />
also the report server URL<br />
<em><reportserverurl>http://<servername>/Reportserver</servername></reportserverurl></em><br />
<em></em><br />
then go to command (run as Admin)<br />
cd "<path folder="" srsconnector="" the="" to=""></path><br />
SetupSrsDataConnector.exe /<strong>CONFIG</strong> install-config.xml<br />
<br />
then it should go smoothly...<br />
<br />
Regards,<br />
yes.sudhanshu<br />
</div>
<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-56422489451597499592013-08-30T00:07:00.002-07:002013-08-30T00:07:58.000-07:00Service msftesql was not found on computer ‘server_name’.The specified service does not exist as an installed service (MS CRM 4.0 installation error)<div dir="ltr" style="text-align: left;" trbidi="on">
while installing ms crm 4.0 i got the below error: Service msftesql was not found on computer ‘server_name’...<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidlhzVtyrjpCM74Jlkn9dtz_KAM_TwH3ZWUF-kE4tBiNZf80CY3s8O-yfQ6WTfHpByMiCt0Sf-dT201TkZZUMEZ9M2OHSfLkx_XoDLkrMCT45PcLDAJ-9ggkCuXmRp12Wvf6_gNa_4YVEG/s1600/msftesql_mscrm4.0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="279" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidlhzVtyrjpCM74Jlkn9dtz_KAM_TwH3ZWUF-kE4tBiNZf80CY3s8O-yfQ6WTfHpByMiCt0Sf-dT201TkZZUMEZ9M2OHSfLkx_XoDLkrMCT45PcLDAJ-9ggkCuXmRp12Wvf6_gNa_4YVEG/s320/msftesql_mscrm4.0.png" width="320" /></a></div>
<br />
so the solution is as follows...<br />
<strong>to do this you must have admin privilege</strong><br />
<strong>take a back up of the keys...</strong><br />
<div style="margin: 0px 0px 10px; padding: 0px;">
Run (window + R) > Regedit<br />- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services<br />- Rename MSSQLFDLauncher Folder to msftesql<br />- Reboot System<br />- Administrative Tools > Services > SQL Full-text Filter Daemon Launcher (MSSQLSERVER) and Check START Status</div>
<div style="margin: 0px 0px 10px; padding: 0px;">
if you have SQL as named instance, then u will get the error "Service msftesql$<strong>instancename</strong> was not found on computer ‘server_name’.</div>
<div style="margin: 0px 0px 10px; padding: 0px;">
sos you have to Rename MSSQLFDLauncher$<strong>instancename</strong> Folder to msftesql$<strong>instancename</strong> .</div>
<div style="margin: 0px 0px 10px; padding: 0px;">
this is the trick....make sure other application(if used the same DB) does not affected....</div>
<div style="margin: 0px 0px 10px; padding: 0px;">
</div>
<div style="margin: 0px 0px 10px; padding: 0px;">
Regards,</div>
<div style="margin: 0px 0px 10px; padding: 0px;">
yes.Sudhanshu</div>
</div>
<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com3tag:blogger.com,1999:blog-3521414757509765465.post-55280961850711152752012-05-16T21:49:00.000-07:002012-05-16T21:49:49.858-07:00System.Exception: Action Microsoft.Crm.Setup.Server.GrantConfigDBDatabaseAccessAction failed. ---> System.Data.SqlClient.SqlException: Windows NT user or group '\SQLAccessGroup {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}' not found. Check the name again.<div dir="ltr" style="text-align: left;" trbidi="on">
Sometimes while installing MS CRM 4.0 or 2011 we used to get the bellow error.<br />
this happens while its doing the installation where as the environment checking is over and successful.<br />
<br />
<strong>Error:</strong><br />
<br />
"System.Exception: Action Microsoft.Crm.Setup.Server.GrantConfigDBDatabaseAccessAction failed. ---> System.Data.SqlClient.SqlException: Windows NT user or group '<domainname>\SQLAccessGroup {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}' not found. Check the name again. "</domainname><br />
<br />
there are many many resolutions for different people..<br />
<br />
1. someone who clicked the retry , it works.. but latter they may face while adding users to CRM<br />
2. some hot fixes will resolve the issue<br />
3. some where uninstalled and installed again works<br />
4. some where installing with minimun credentials with the config file by precreated groups in ad works<br />
5. some where by creating the group in manually in db and click retry also works<br />
6. <strong><span style="font-size: large;">ask the AD admin , how much it takes to reflect the ad groups once its created , then wait more than that much time and click retry, it should pick it up, so its not getting the groups or user with the name specified...</span></strong><br />
7. This can be caused due to the CRM privilege groups being left in the SQL Server Security folder when CRM is uninstalled.<br />
<br />
below are some links to the above possible solutions<br />
<a href="http://blog.expertsoftware.co.uk/post/2010/05/04/CRM-4-Install-and-SQL-Error-15401.aspx">http://blog.expertsoftware.co.uk/post/2010/05/04/CRM-4-Install-and-SQL-Error-15401.aspx</a><br />
<a href="http://support.microsoft.com/kb/976494">http://support.microsoft.com/kb/976494</a><br />
<a href="http://social.microsoft.com/Forums/eu/crm/thread/65543208-6263-45d0-9801-237c0767a4da">http://social.microsoft.com/Forums/eu/crm/thread/65543208-6263-45d0-9801-237c0767a4da</a><br />
<a href="http://kaustubhghanekar.blogspot.com/2011/02/crm-deployment-problems-with-windows.html">http://kaustubhghanekar.blogspot.com/2011/02/crm-deployment-problems-with-windows.html</a><br />
<br />
point 6 is bit weired but works...<br />
<br />
hope this will help...<br />
<br />
thanks,<br />
yes.sudhanshu</div>
<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com1tag:blogger.com,1999:blog-3521414757509765465.post-68506383963744338962012-05-15T22:12:00.001-07:002012-05-15T22:12:22.507-07:00Workflow Error Message in MS CRM 4.0<div dir="ltr" style="text-align: left;" trbidi="on">
if any of the workflows are getting failed in ms crm 4.0, then if we will go to system jobs and see the error, it will not give the details of the message, but it will give a short and general description as "An Error has occured".<br />
to get the details , you just go to advanced find and edit the view by adding the "Message" column, this contains the "details message..." and it will have meaningful description...<br />
<br />
in 2011, its very clear.. you will have a details section in the record...<br />
<br />
thanks,<br />
yes.sudhanshu</div><div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-24333477737180785852012-05-09T02:04:00.001-07:002012-05-09T02:20:09.761-07:00Line feeds are not used when you send an e-mail message that uses an e-mail template to render data that has line feeds in Microsoft Dynamics CRM 4.0<div dir="ltr" style="text-align: left;" trbidi="on">
<strong><u>Problem</u></strong><br />
When you send an e-mail message that uses an e-mail template to render data that has line feeds in Microsoft Dynamics CRM 4.0, the line feeds that are included in the data are not used. Instead, the data in the e-mail message is concatenated together. The data does not appear on separate lines. <br />
<br />
For example, you create a contact type e-mail template that contains the {!Contact:Description;} code. When you try to send an e-mail message that uses the e-mail template for a contact record, the e-mail message should display a description as follows: <br />
<div class="indent">
Line 1 <br />
Line 2 <br />
Line 3</div>
However, the e-mail message displays the description without line feeds, as follows:<br />
<div class="indent">
Line 1Line 2Line 3</div>
This problem occurs if the e-mail template renders data that merges the <b>nvarchar</b> data type and the <b>ntext</b> data type.<br />
<br />
<strong><u>Reason</u></strong><br />
This problem is fixed in the latest cumulative update rollup for Microsoft Dynamics CRM 4.0.<br />
<strong>Important</strong> This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. <br />
Install this cumulative update rollup on computers that are running the Microsoft Dynamics CRM 4.0 server components<br />
<br />
Use the following registry keys(<strong>DWORD</strong>) to enable the fix:<br />
<ul>
<li>On the Microsoft Dynamics CRM Server, locate the following registry subkey: <div class="indent">
SOFTWARE\Microsoft\MSCRM\SDKEmailTemplateHTMLLineBreak = 1</div>
</li>
<li>On the Microsoft Dynamics CRM client for Outlook, locate the following registry key:<div class="indent">
SOFTWARE\Microsoft\MSCRMClient\SDKEmailTemplateHTMLLineBreak = 1</div>
</li>
</ul>
<div class="indent">
ref: <a href="http://support.microsoft.com/kb/955452">http://support.microsoft.com/kb/955452</a></div>
<div class="indent">
<br /></div>
<div class="indent">
thanks,</div>
<div class="indent">
yes.sudhanshu</div>
</div><div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-30850186892130362022012-05-09T01:56:00.003-07:002012-05-09T01:56:39.892-07:00A hyperlink text that is generated from an e-mail template is incomplete when you add the template to a body of an e-mail activity in Microsoft Dynamics CRM 4.0<div dir="ltr" style="text-align: left;" trbidi="on">
<strong><u>Problem</u></strong><br />
Consider the following scenario. You create a hyperlink in an e-mail template in Microsoft Dynamics CRM 4.0. The hyperlink text contains query string variables. The query string variables include special characters, such as the slash mark (/) or the equal sign (=). Then, you add the template to the body of an e-mail activity. In this scenario, the generated hyperlink text in the body of the e-mail activity is incomplete.<br />
<strong><u>Reason</u></strong><br />
This problem occurs because the e-mail template editor uses a SPAN element to create the body of an e-mail activity. If a URL contains characters that are used as part of a query string variable in a hyperlink, the URL is entered into the SPAN element. If the characters are not encoded by using hexadecimal values, the characters cannot be returned.<br />
<strong><u>Solution</u></strong><br />
To resolve this problem, encode the special characters by using hexadecimal values. For example, encode the slash mark (/) by using the hexadecimal value %2f.<br />
to get the values from <a href="http://www.w3schools.com/tags/ref_urlencode.asp">URL Encoding Values</a><br />
<br />
ref: <a href="http://support.microsoft.com/kb/976661">http://support.microsoft.com/kb/976661</a><br />
<br />
thanks,<br />
yes.sudhanshu </div><div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-6220369189922460892012-05-04T22:02:00.000-07:002012-05-04T22:02:24.189-07:00MS CRM 4.0 plug-in update of email statuscode<div dir="ltr" style="text-align: left;" trbidi="on">
SetStateEmailRequest request = new SetStateEmailRequest();<br /> request.EntityId = new Guid(context.InputParameters.Properties["EmailId"]+"");<br /> request.EmailState = EmailState.Completed;<br /> request.EmailStatus = 3;<br /> ICrmService service = context.CreateCrmService(true); // this is the services getting form context as its from plugin code, other way you ca create the service...<br /> service.Execute( request );</div><div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-32486666041105997102011-12-06T03:57:00.000-08:002011-12-06T03:57:55.484-08:00uCertify , The fastest way to IT CertificationI got the kit for ms crm 4.0.<br />
it looks good .<br />
Waiting for the kit for MS CRM 2011.<br />
Will post my review about MS CRM 2011 on my blog <a href="http://ms-crm-2011-beta.blogspot.com/">MS CRM 2011 Blog</a><br />
<b>Top 12 features of our Award Winning Prepkits</b><br />
<br />
1. Simple, intuitive, user-friendly interface<br />
2. One click dashboard makes it easy to find what you need<br />
3. Guided learning steps you through the process of learning<br />
and test preparation, including crucial information about<br />
the exam format and test preparation tips<br />
4. Reference Notes and Study Guides organized according to<br />
the actual test objectives<br />
5. Numerous study aids, including study notes, flash cards,<br />
pop quizzes and more<br />
6. Useful Technical Articles section contains information<br />
written by industry experts and How To’s that help for easy<br />
look up to specific questions<br />
7. Collaboration<br />
8. Exhaustive practice questions and tests, starting with<br />
Diagnostic tests to determine your initial level<br />
9. Learning and test modes<br />
10. Customize your tests – decide how many questions,<br />
combine one or more topics of your choice, quiz yourself<br />
on a study note, increase the level of difficulty based on<br />
your performance at any point in time, even create a test<br />
based on the amount of time you have to take a test!<br />
11. Feedback and assessment when you need it, including Gap<br />
Analysis that clearly indicate your areas of strength and<br />
weakness<br />
12. Full length Final Practice test that closely simulates those<br />
on the certification exam to gauge your preparation level<br />
for the actual exam<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-23349544295577402412011-08-01T19:55:00.000-07:002011-08-01T19:56:06.205-07:00User accesible issue in ms crm 4.0i faced one issue, that the user in MS CRM is unable to log in, its showing you do not have sufficient permission to view these records.<br />Even if the user is in enabled list.<br />i also can disable and enable the user, still the user cud not logged in.<br /><br /><strong>OBSERVATION</strong><br />May be the user has been deleted from the AD and after that again created.<br /><br /><strong>WORK AROUND</strong><br />What i did is, i just opened the user in crm , then i changed the same to another user, which is not in ms crm, suppose a temp user.<br />Then i tried to log in using the temp user, i am able to login.<br />Then what i did is, i swaped back from temp user to the actual user.<br />Then the actual user was able to login.<br />This works,<br />hope this will help somebody really...<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-29693968871774886312011-06-08T00:08:00.000-07:002011-06-08T00:33:49.289-07:00alternate colors in the main grid of ms crm 4.0Sometimes the requirement used to come as the records in the main grid to be alternate colors as in normal grid controls.<br /> keep it in mind we are going to alter the aspx page provided by MS CRM :P<br />To achieve it in CRM just needs some JS code.<br /><br />1. open the <strong>HomePage.aspx</strong> from the <strong>_root</strong> folder<br />2. append a method onload of the body as <<em>body class="stage" onload="alterGridRecords()"</em>><br />3. now the function alterGridRecords should be as followed<br /><br />function alterGridRecords(){<br /> var grid = document.getElementById("<strong>gridBodyTable</strong>").lastChild; //gridBodyTable is the id, wch will help<br /> for (var i = 0; i < grid.childNodes.length; i++) <br /> { <br /> if ((i % 2) == 0) {<br /> grid.childNodes[i].style.backgroundColor = "#EEEEEE"; //put color as per the user requested<br /> grid.childNodes[i].colourised = true; <br /> }<br /> else {<br /> grid.childNodes[i].style.backgroundColor = "#FFFFFF"; //put color as per the user requested<br /> grid.childNodes[i].colourised = true; <br /> } <br /> } <br />}<br /><br />this is so simple<br /><br />one prob in the above is that you will not be able to make the selected records in diff color.<br />so just a bit twist <br />grid.childNodes[i].<strong>childNodes[2].</strong>style.backgroundColor = "#FFFFFF"; <br />this will make alternate colorsonly the 1st column as its being implemented as only one color in ms crm 2011. :P<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-49208409918552785302011-04-19T05:03:00.000-07:002011-04-19T05:05:57.574-07:00Calling external JS files from MS CRM 4.0 formfunction LoadFunction() { }<br />//create a Script loader object + function to be called when the script has <br />//finished loading <br />window.ScriptLibrary = new ScriptLoader(LoadFunction);<br />//url , false - cache, true - no cache<br />ScriptLibrary.Load('/<relative path to crm installation>/FileName.js', true);<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-18915383555981617302011-02-16T00:32:00.000-08:002011-02-16T00:33:10.169-08:00Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the error message:if u will get error message like this while in plugin or else using the sdk for any external application.<br />make sure the crmserver url is correct.<br />some times we used to forget to add the port number if its thr.<br /><br />yes.sudhanshu<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-81263193408111791542011-02-16T00:30:00.000-08:002011-02-16T00:31:46.485-08:00Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the error message:if u will get error message like this while in plugin or else using the sdk for any external application.<br />make sure the crmserver url is correct.<br />some times we used to forget to add the port number if its thr.<br /><br />yes.sudhanshu<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-79352108297388768982011-02-16T00:26:00.000-08:002011-02-16T00:29:25.316-08:00Invalid Action, the selected action was not valid error in ms crm 4.0If such kind of error <strong>Invalid Action, the selected action was not valid</strong> in ms crm 4.0 while loggin in or else already logged in and trying to acces any record or doing some action, <br />then just try to make the MSCRMAsynchronous Service up.<br />Even if its showing started in the services, just restart it.<br /><br />This is a way i hv solved.<br /><br />yes.sudhanshu<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-24567654245480152652011-02-09T19:52:00.000-08:002011-02-09T19:56:28.353-08:00refreshing continuously the textbox(textarea) in dot netsome times we need to show the status to the user if some log process is going on. also if any exception in that process.<br />for that if we will write the message to a textbox(textarea), it will look like realtime message as follow.<br /><br />the textbox(textarea) control name is "txtStatus"<br />//each time append the new text to the previous text<br />txtStatus.Text += "Message from the businees logic to be displayed.";<br />// this main to just update the control , so that the new text will refreshed<br />txtStatus.Update(); <br /><br />yes.sudhanshu<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-16037748959660945272011-02-09T19:49:00.000-08:002011-02-09T19:51:54.076-08:00Getting project current path in dot netjust use this to get the project current path.<br />soem times we need to create the log folder inside the project path with bin and other folders. <br />this is in windows application.<br /><br />string path = Directory.GetParent(Path.GetDirectoryName(Application.StartupPath)).FullName;<br /><br />yes.sudhanshu<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-48202814091405010092011-01-30T19:39:00.000-08:002011-01-30T19:45:52.492-08:00Organise the NameSpaces in visual studioSometimes we used some namespaces and we delete the references. still the using statement will be there. to make it clean we can use a shortcut, which wecan configure as follows.<br /><br />go to <strong>Tools</strong> -> <strong>Options</strong> from visual studio.<br />Select Keyboard from left items.<br />then select "<strong>Edit.RemoveAndSort</strong>"<br />Now ether the key strokes you like in <strong>press Shortcut key</strong> text box (suppose ctrl+shift+w).Keep in mind all the three you have to press @ one short.<br /><br />yes.sudhanshu<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-36501590386949121012011-01-27T19:21:00.000-08:002011-01-27T19:29:19.622-08:00Default look up value with out knowing the GUID only the text in MS CRM 4.0Hi,<br /><br />The default lookup can be done clearly and in supported way as in sdk in my othe r link. <a href='http://bproud2banindian.blogspot.com/2009/12/default-value-for-lookups.html'>Default lookup value with GUID</a>.<br /><br />Some times while working in dev,UAT and prodution and moving from here to there<br />or if any one deleted the record and recreated again , means in any chance the GUID got changed , then it will not work.<br />But one thing here is , only one record should be there in the same name.<br />Even if its unsupported, still very usefull.<br /><br />document.all.<FieldScemaName>_ledit.value = 'Default Lookup Value';<br />document.all.<FieldScemaName>_ledit.fireEvent("onblur");<br />document.all.<FieldScemaName>_ledit.value = '';<br /><br />Hope it will help many more.<br /><br />yes.sudhanshu<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com1tag:blogger.com,1999:blog-3521414757509765465.post-87111591479481628222011-01-20T20:04:00.000-08:002011-01-20T20:06:57.903-08:00Enable Tracing Ms Crm 4.0Some times we nned to enable the tracing in ms crm server to get the error details.<br />But do not forget to disable it again after getting the error details , as it will slow down the process.<br />for the same just follow the link<br /><br /><a href="http://support.microsoft.com/kb/907490">Enable Tracing</a><div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-66817660650082460882011-01-20T00:24:00.000-08:002011-01-20T00:47:25.417-08:00saving another entity form from one formSuppose we want to put an entity record in another entity form and on change of anything in the parent we also want to put the value in the child record and also want to save that. This can be done :)<br /><br />var iframe = crmForm.all.IFRAME_CustomEntity <br />var iDoc = iframe.contentWindow.document;<br />var iframe_isSaved = true;<br /> <br />// checking if the Custom Entity has been changed<br />if (iDoc.crmForm.IsDirty())<br />{<br /> // save Custom Entity<br /> var iframe_isSaved = iDoc.crmForm.Save(); <br />}<br /> <br />if (iframe_isSaved == false) // validation failed on Custom entity<br />{<br />event.returnValue = false; // Cancel the SAVE on Account<br />return false;<br />}<br /><br />Just test and see.<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-10765395833678424852011-01-10T18:54:00.000-08:002011-01-10T18:59:18.820-08:00How to Load external JS files in MS CRM FormSome times its really helpful to link the external js files to a form.<br />It will help you, that you can srite in a file by using VS studio or any js editor.<br /><br />//create the function which will load the file<br />function LoadExternalScript(scriptFile)<br />{<br /> var netRequest = new ActiveXObject("Msxml2.XMLHTTP"); <br /> netRequest.open("GET", scriptFile, false); <br /> netRequest.send(null); <br /> eval(netRequest.responseText); <br />}<br /><br />//call the above function by passing your file name(absolute path)<br />LoadExternalScript("/ISV/js/filename.js");<br />//now call the OnLoad function, which has defined in the external JS file<br />//also you can define and call other function, in the external JS files<br />OnLoad();<br /><br />Have a wonderful coding.<br /><br />Sudhanshu<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-40827168507355003812010-12-30T20:34:00.000-08:002010-12-30T20:40:34.235-08:00Assign roles to users using CodeThere are times when we need to assign roles promatically may plugin or else threu any applications suing the sdk.<br />here is the code to assign the role.<br />make sure u have the suer GUID and the roles GUIDs u wan to assign.<br />and keep it in mind that the higher role previlege will apply for that user.<br /><br />private static void assignRole(Guid userGUID, Guid[] rolesGUID)<br /> {<br /> // Set up the CRM service.<br /> CrmAuthenticationToken token = new CrmAuthenticationToken();<br /> // You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.<br /> token.AuthenticationType = 0;<br /> token.OrganizationName = "Default";<br /><br /> CrmService service = new CrmService();<br /> service.Url = "http://<server>:<port>/mscrmservices/2007/crmservice.asmx";<br /> service.CrmAuthenticationTokenValue = token;<br /> service.Credentials = System.Net.CredentialCache.DefaultCredentials;<br /><br /> // Create the request object.<br /> AssignUserRolesRoleRequest assign = new AssignUserRolesRoleRequest();<br /><br /> // Set the properties of the request object.<br /> assign.UserId = userGUID;<br /> // Set the ID of a role that is in the same business unit as the user.<br /> assign.RoleIds = rolesGUID;<br /><br /> // Execute the request.<br /> AssignUserRolesRoleResponse assigned = (AssignUserRolesRoleResponse)service.Execute(assign);<br /> }<br /><br />Sudhanshu<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-21095656298680410612010-12-21T20:42:00.000-08:002010-12-22T01:11:59.290-08:00Use Custom View in the in form MS CRM 4.0There is some times a requirement like people want to use custom views in MS CRM form instead of the available views also with some filtering criterias.<br />This is how it will work.<br /><br />The followings are the things need to be taken care<br />1. collect the entity details<br />2. create an IFRAME<br />3. make sure the columns you want to put are present in CRM and searchable(imp)<br />4. this is just a sample, change it as per your requirements<br />5. this is just showing the record which you have selected, by taking the guid<br /><br />so check the code,against most of the lines we have comments which will make it easy<br /><br />//the main function which will do the majic<br /><br />function EmbedAdvancedFindView (iFrameId, entityName, fetchXml, layoutXml, sortCol, sortDescend, defaultAdvFindViewId, entityTypeId) {<br />// Initialize our important variables<br />var httpObj = new ActiveXObject("Msxml2.XMLHTTP");<br />var url = SERVER_URL + "/AdvancedFind/fetchData.aspx";<br />var iFrame = document.getElementById(iFrameId);<br />var win = iFrame.contentWindow;<br />var doc = iFrame.contentWindow.document;<br /><br />// Provide a global function within the parent scope to avoid XSS limitations<br />// in updating the iFrame with the results from our HTTP request<br />PushResponseContents = function (iFrame, httpObj, entityTypeId) {<br />var win = iFrame.contentWindow;<br />var doc = iFrame.contentWindow.document;<br />var m_iFrameShowModalDialogFunc = null;<br />var m_windowAutoFunc = null;<br /><br />// Write the contents of the response to the Iframe<br />doc.open();<br />doc.write(httpObj.responseText);<br />doc.close();<br /><br />// Set some style elements of the Advanced Find window<br />// to mesh cleanly with the parent record's form<br />doc.body.style.padding = "0px";<br />doc.body.scroll="no";<br /><br />// Should we overwrite the functionality of the "New" button?<br />if ((typeof(entityTypeId) != "undefined") && (entityTypeId != null)) {<br />var buttonId = "_MBopenObj" + entityTypeId;<br />var newButton = doc.getElementById(buttonId);<br /><br />eval("newButton.action = 'locAddRelatedToNonForm(" + entityTypeId + ", " + crmForm.ObjectTypeCode + ", \"" + crmForm.ObjectId + "\",\"\");'");<br />}<br /><br />// Swap the showModalDialog function of the iFrame <br />if (m_iFrameShowModalDialogFunc == null) {<br />m_iFrameShowModalDialogFunc = win.showModalDialog;<br />win.showModalDialog = OnIframeShowModalDialog;<br />}<br /><br />if (m_windowAutoFunc == null) {<br />m_windowAutoFunc = win.auto;<br />win.auto = OnWindowAuto;<br />}<br /><br />// Configure the automatic refresh functionality for dialogs<br />function OnIframeShowModalDialog(sUrl, vArguments, sFeatures) {<br />m_iFrameShowModalDialogFunc(sUrl, vArguments, sFeatures);<br />doc.all.crmGrid.Refresh();<br />}<br /><br />function OnWindowAuto(otc) {<br />doc.all.crmGrid.Refresh();<br /><br />m_windowAutoFunc(otc);<br />}<br />}<br /><br />// Without a null src, switching tabs in the form reloads the src<br />iFrame.src = null;<br /><br />// Preload the iFrame with some HTML that presents a Loading image<br />var loadingHtml = ""<br />+ "<table height='100%' width='100%' style='cursor:wait'>"<br />+ " <tr>"<br />+ " <td valign='middle' align='center'>"<br />+ " <img alt='' src='/_imgs/AdvFind/progress.gif' />"<br />+ " <div /><i>Loading View...</i>"<br />+ " </td>"<br />+ " </tr>"<br />+ "</table>";<br /><br />doc.open();<br />doc.write(loadingHtml);<br />doc.close();<br /><br />// Compile the FetchXML, LayoutXML, sortCol, sortDescend, defaultAdvFindViewId, and viewId into<br />// a list of params to be submitted to the Advanced Find form<br />var params = "FetchXML=" + fetchXml<br />+ "&LayoutXML=" + layoutXml<br />+ "&EntityName=" + entityName<br />+ "&DefaultAdvFindViewId=" + defaultAdvFindViewId<br />+ "&ViewType=1039" // According to Michael Hohne over at Stunnware, this is static<br />+ "&SortCol=" + sortCol<br />+ "&SortDescend=" + sortDescend;<br /><br />// Establish an async connection to the Advanced Find form<br />httpObj.open("POST", url, true);<br /><br />// Send the proper header information along with the request<br />httpObj.setRequestHeader("Content-type", "application/x-www-form-urlencoded");<br />httpObj.setRequestHeader("Content-length", params.length);<br /><br />// Function to write the contents of the http response into the iFrame<br />httpObj.onreadystatechange = function () {<br />if (httpObj.readyState == 4 && httpObj.status == 200) {<br />parent.PushResponseContents(iFrame, httpObj, entityTypeId);<br />}<br />}<br />//alert(params);<br />// Set it, and forget it! and enjoy :)<br />httpObj.send(params);<br />}<br /><br />///*********************************************<br />//Create the objects<br /><br />//get the current record's GUID<br />var IFRAME_Name = "IFRAME_Accounts";<br />var entityName = "new_residencestatus";<br /><br />var currentGUID = crmForm.ObjectId.toString();<br /><br /><br />// Embed an AF window<br />fetchXml = ""<br />+ "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>"<br />+ " <entity name='new_residencestatus'>" //the enityname for whoch u want to create the view<br />+ " <attribute name='new_residencestatusid'/>" //columns u want to fetch<br />+ " <attribute name='new_name'/>" //same as above<br />+ " <order attribute='new_name' descending='false'/>" //for which column u want to order<br />+ " <filter type='and'>" <br />+ " <condition attribute='new_residencestatusid' operator='eq' value='" //pass your conditional value<br />+ currentGUID <br />+"'/>"<br />+ " </filter>"<br />+ " </entity>"<br />+ "</fetch>";<br /><br />layoutXml = ""<br />+ "<grid name='resultset'>"<br />+ " <row name='result' id='new_residencestatusid'>" //be careful for this is , it should be same as the primarykey<br />+ " <cell name='new_name' width='150' />" //columns you want to show and fetched in the column list<br />+ " </row>"<br />+ "</grid>";<br /><br />var sortColumnName = "new_name";<br />var sortDescend = "false";<br />var associatedViewGUID = "{93A408E0-A6E5-4149-9510-4EF333C0FC43}";<br />var objectTypeCode = crmForm.ObjectTypeCode.toString();<br /><br />//call the master and majic method :)<br /><br />EmbedAdvancedFindView(IFRAME_Name, entityName, fetchXml, layoutXml, sortColumnName, sortDescend, associatedViewGUID, objectTypeCode);<br /><br />//hide the unnecessary menu bar from the grid<br /><br />function hideViewMenu(){<br />var formview = document.all.IFRAME_Accounts;<br />if( formview.readyState != 'complete' )<br />return;<br /><br />formview.contentWindow.document.getElementById("gridMenuBar").style.display = "none";<br />formview.contentWindow.document.getElementById("mnuBar1").parentNode.style.display = "none";<br />}<br />//hide the menubar from the view<br />var Form = crmForm.all.IFRAME_Accounts;<br />Form.attachEvent("onreadystatechange",hideViewMenu);<br />Sudhanshu<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com1tag:blogger.com,1999:blog-3521414757509765465.post-9925466929240500442010-12-20T17:50:00.000-08:002010-12-20T17:54:27.031-08:00DateTime to CrmDateTime conversionWe all know that DateTime in C# is different than CrmDateTime.<br />In CrmDateTime we also have two things 1. UserTime and 2. UniversalTime.<br />To convert from normal DateTime to CrmDateTime follow the follwoing code.<br /><br />public static CrmDateTime ConvertToCRMDateTime(DateTime dateTime)<br /> {<br /> CrmDateTime crmDateTime = new CrmDateTime();<br /> crmDateTime.date = dateTime.ToShortDateString(); //assign the date<br /> crmDateTime.time = dateTime.ToShortTimeString();//assign the time<br />//now create the offset from the timezone<br /> TimeSpan offset = TimeZone.CurrentTimeZone.GetUtcOffset(dateTime);<br /> string sOffset = string.Empty;<br /> if (offset.Hours < 0)<br /> {<br /> sOffset = "-" + (offset.Hours * -1).ToString().PadLeft(2, '0') + ":";<br /> }<br /> else<br /> {<br /> sOffset = "+" + offset.Hours.ToString().PadLeft(2, '0') + ":";//"<strong>:</strong>" is more inmportant<br /> }<br /> sOffset += offset.Minutes.ToString().PadLeft(2, '0');<br /> crmDateTime.Value = dateTime.ToString(string.Format("yyyy/MM/ddTHH:mm:ss{0}", sOffset));<br /> return crmDateTime; //finally return the CrmDateTime format<br /> }<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0tag:blogger.com,1999:blog-3521414757509765465.post-25353821772602018282010-12-19T20:26:00.000-08:002010-12-19T21:10:55.697-08:00Create a header with the form information in ms crmSome times we need to show a header informations in ms crm 4.0.(but its available OTB in 5.0). as in pic.<br /><br />just follw the followings and change ur attributes as per your requirements.<br /><br />var elem = document.getElementById("leftNavBreadcrumbText");<br /><br />var fullName = (crmForm.all.name.DataValue != null) ? crmForm.all.name.DataValue : "";<br />var NRIC = (crmForm.all.new_nric.DataValue != null) ? crmForm.all.new_nric.DataValue : "";<br />var handPhone= (crmForm.all.new_handphone.DataValue != null) ? crmForm.all.new_handphone.DataValue : "";<br /><br />if (elem != null) {<br />var actualHTML = elem.innerHTML;<br />actualHTML += ' <table width="100%"><tbody><tr><td>actualHTML</td><td></td></tr></tbody></table>';<br />elem.innerHTML = actualHTML ;<br />}<br /><br />Sudhanshu<div class="blogger-post-footer"><script type="text/javascript"><!--
google_ad_client = "ca-pub-4710732324449404";
/* MS CRM 2011 Hospital */
google_ad_slot = "5180174083";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>yes.sudhanshuhttp://www.blogger.com/profile/10997115922535041883noreply@blogger.com0