27 December 2008

CRM 4: Insufficient Permissions

I faced a weird issue where some of the users with same role privilege in CRM Titan can not log on to CRM web. After doing some research and study the CRM trace log text file, the workaround is to grant at least an user level on Write User Setting in the specific role.
(at least a value 1 in PrivilegeDepthMask column in RolePrivileges Table)



You can find on the security setting page>roles>Business Management Tab.

26 December 2008

ASP.NET: Access Denied on Event Log

When we use windows event log to handle our web app's exception, normally we will hit access denied when the application try to write a log into the specific machine.

Common cause of issue will be the security access rights to their event logs.

*SDDL=security descriptor definition language
*ACE String
*SID String
*Microsoft Support
In order to check the event log machine's access rights, Run>regedit then

browse;

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\CustomSD


from the Data, we can see the SDDL configuration of event log. Example from my machine:
O:BAG:SYD:(D;;0xf0007;;;AN)(D;;0xf0007;;;BG)(A;;0xf0007;;;SY)(A;;0x7;;;BA)(A;;0x7;;;SO)(A;;0x3;;;IU)(A;;0x3;;;SU)(A;;0x3;;;S-1-5-3)(A;;0x7;;;NS)

To construct an SDDL string, note that there are three distinct rights that pertain to event logs: Read, Write, and Clear. These rights correspond to the following bits in the access rights field of the ACE string:
1= Read
2 = Write
4 = Clear


(0x3 means read&write, depend on what you want, such as 0x7) Reference the value above. Just copy another set and paste behind, eg.:I bold with blue color..



The word I highlight with red color above "IU" is refer to Interactively logged-on user;now, you may ask how I know which SID string I need to put if I want to allow NETWORK SERVICE user to have write access to event log.

I listed down some of the most common use of SID string and its value, detail please refer to the link i posted above.

(AU)AuthenticatedUser; (NU)Network logon user; (NS)Network service account; (SU)Service logon user

When hit this kind of error, first must find out which account do not have the access rights to event log and then grant the correct rights solved the problem.

Hope this post can help you!

22 December 2008

Service Unavailable when browsing CRM

After doing some configuration on CRM 4 server, i hit the "Service Unavailable" error when browsing CRM default homepage.

I am using CRM 64 bits version in windows 2003 with IIS6.
Problem cause by the IIS is not pointing to .NET framework v2.0 64bits anymore, since it is 32bits/64bits compatible. I suspect it default back to 32bits version.

Solution: What I did was open Command Prompt browse to [C:\Windows\Microsoft.NET\Framework64\v2.0.50727>] then do an "aspnet_regiis.exe -i" to register it back.

Work like charm for me.
Hope this help others who facing the same problem.

13 December 2008

How to enable custom query string passing in CRM 4

Scenario: Auto fill in lookup fill on prospect create mode.

By default, MSCRM do not allow us to change the url of the CRM form,it will prompt CRM error page, for example the new prospect form. Url ended with this" /sfa/leads/edit.aspx"

How can I add custom parameter behind? " /sfa/leads/edit.aspx?user=Yang"
So that I can use javascript grab the parameter and perform additional tasks.

Solution:What
we need to do is change/add a DWORD registry key
named [DisableParameterFilter] under [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM],
set the value to 1.

Run iisreset, now you can append your custom parameters like normal ASP.NET web form.



06 December 2008

My two cents for SQL Reporting Services

Working with SRS200 this few weeks, some of the trouble wasted me few hours to solve it.
So share some of the issues you might be looking for it.
Index was outside the bounds of the array









This error pop when I hit view report after I had changed the fields included in report. Click refresh button in preview mode remove the error.
It is cause by the report cahce previous columns in preview mode.
The report parameter is read-only and cannot be modified.
The Report parameter is set to read only, for SRS2005, this can be happen when you checked the Internal checkbox in report parameter screen
How to use RowNumber in grouping matrix table
put this expression in the row grouping 1st column.
=RunningValue(Fields!NAME_S.Value,CountDistinct,Nothing)

03 December 2008

CRM Plugin: 32bits / 64 bits environment

Recently I found a post on CRM blog, most of the CRM developers develop plugin using 32 bits environment and then need to deploy to 64 bits production server. Latest SDK also included DLL for Microsoft.Crm.Sdk.dll and Microsoft.Crm.SdkTypeProxy.dll

  1. If you build using platform neutral, then it should works for both 32 & 64 bits environment CRM
  2. If you build using 32bits extension, then it should work on 32bits CRM only.
  3. If you build using 64bits extension, then it should work on 64bits CRM only.

Reference from ascentium CRM blog

29 November 2008

CRM 4.0 Update Rollup 1

Finally the rollup for CRM 4.0 is availabled. Just like usual, it accumulate all the hotfix packages into one installer.

This rollup 1 can be uninstalled.
List of changes can be view on Microsoft KB952858

Make sure you backup your database before apply this rollup!
For those who use development /production server, importing the customizations to Microsoft Dynamics CRM 4.0 Server is not recommended if the CRM version is different.

Updated component:
  1. Email router
  2. Server
  3. Client

    Download here

09 October 2008

Useful shortcut that you may have forgotten!

Type this in Start> Run.

Calc - Calculator 
Cfgwiz32 - ISDN Configuration Wizard 
Charmap - Character Map 
Chkdisk - Repair damaged files 
Cleanmgr - Cleans up hard drives 
Clipbrd - Windows Clipboard viewer 
Cmd - Opens a new Command Window (cmd.exe) 
Control - Displays Control Panel 
Dcomcnfg - DCOM user security 
Debug - Assembly language programming tool 
Defrag - Defragmentation tool 
Drwatson - Records programs crash & snapshots 
Dxdiag - DirectX Diagnostic Utility 
Explorer - Windows Explorer 
Fontview - Graphical font viewer 
Ftp - ftp.exe program 
Hostname - Returns Computer’s name 
Ipconfig - Displays IP configuration for all network adapters 
Jview - Microsoft Command-line Loader for Java classes 
MMC - Microsoft Management Console 
Msconfig - Configuration to edit startup files 
Msinfo32 - Microsoft System Information Utility 
Nbtstat - Displays stats and current connections using NetBios over TCP/IP 
Netstat - Displays all active network connections 
Nslookup- Returns your local DNS server 
Ping - Sends data to a specified host/IP 
Regedit - egistry Editor 
Regsvr32 - egister/de-register DLL/OCX/ActiveX 
Regwiz - Reistration wizard 
Sfc /scannow - Sytem File Checker 
Sndrec32 - Sound Recorder
Sndvol32 - Volume control for soundcard 
Sysedit - Edit system startup files (config.sys, autoexec.bat, win.ini, etc.) 
Taskmgr - Task manager 
Telnet - Telnet program 
Tracert - Traces and displays all paths required to reach an internet host 
Winipcfg - Displays IP configuration

certmgr.msc - Certificate Manager 
ciadv.msc - Indexing Service 
compmgmt.msc - Computer management 
devmgmt.msc - Device Manager 
dfrg.msc - Defragment 
diskmgmt.msc - Disk Management 
fsmgmt.msc - Folder Sharing Management 
eventvwr.msc - Event Viewer 
gpedit.msc - Group Policy -XP Pro only 
iis.msc - Internet Information Services 
lusrmgr.msc - Local Users and Groups 
mscorcfg.msc - Net configurations 
ntmsmgr.msc - Removable Storage 
perfmon.msc - Performance Manager 
secpol.msc - Local Security Policy 
services.msc - System Services 
wmimgmt.msc - Windows Management

29 September 2008

CRM Titan for vision impaired users

CRM Titan provided special feature that support High Contrast Mode in Windows.
We use Left Alt + Left Shift + Print Screen to enable the High Contrast in Windows.
If we didnt turn on the High Contrst mode in CRM, we cant experience the optimized output view.

Under personalize workplace>General Tab> there is a checkbox to enable the CRM running on High Contrast mode. Check it to optimized the support for vision impaired users.

26 September 2008

Maximum Upload File Size in CRM Titan

Previously in CRM 3, the maximum file size for attachment can be configure/found in the registry. In CRM Titan, Microsoft decided to store in Database because of Multitenancy Installation.

For some reason, I need to build a custom template page which can allow user to upload attachment, for the ease of configuration, i decided to share the attribute use by CRM to handle Max file size upload.


After some research, finally found that it is store under organizationbase table. It store as bytes data type. Remmember to multiply 1024 for actual bytes value.

select MaxUploadFileSize from organizationbase

23 September 2008

Money Data Type Attribute Issue

If you faced [Object reference not set to an instance of an object.] error on creating new record; and you confirm is not javascript problem...
then it might be the CRM4 Money Data Type issue.

Scenario: Let say you created a money data type field in custom entity, then you realise you select the wrong data type and remove it. (should be number instead of money).


If you add a Money data type and then delete, you probably will hit this error unless you still have others money attribute in that Entity.

Create at least one attribute with Money data type to solve the problem.
Just don't display the field if you don't wan it, but it must exist in entity.

21 September 2008

URL Encode/Decode

Found this usefull encode/decode reference table from google.
This table help me a lots when working with encode/decode query string.

18 September 2008

How to enable more than 8 Tabs in CRM form?

CRM default limit the tabs in form to 8 tabs only. We can easily [unlock]
 it by changing the CRM default ASPX page.

*Bear in mind that this is an unsupported customization, it might be replace by any Patch/RoleUp

browse to CRM installation directory, then go

Tools\FormEditor\formeditor.aspx  
and change the variable to the numbers of tabs you wish.
var _iMaxTabs = 8;

Here is the result I changed the limit to 10 tabs


13 September 2008

Using intellisense in ISV & sitemap XML

In order to reduce typing mistake in customizing CRM Titan's ISV and sitemap XML, we can configure it to use with intellisense in Visual Studio.

Download the latest CRM4 SDk, extract out. we need to make use of sdk\server\schemas
ISV:
Open ISV.xml with VS2008, click browse under schema in properties window goto importexport. Add the file "isv.config.xsd" (for ISV) "customizations.xsd" (for Sitemap)
Use comment function in VS to comment out the tag highlighted (Remember uncomment it before import to CRM)














Now, intellisense is ready to use...












Sitemap:
Configure for sitemap is more easy compare to ISV. (You don't need to comment the default tags)
After open the sitemap.xml in VS, make sure the 2 xsd is added as mentioned above.
Is ready to use now...

12 September 2008

Latest CRM4 SDK 4.0.6

Microsoft Dynamic CRM has released the latest SDK v 4.0.6. Some of the changes:
Get it from HERE

1) The Plug-in walk through in the SDK has been updated to match the readme that is included in the SDK\Walkthroughs folder.

2) The Readme file in the SDK\tools\deployworkflowtool folder has been corrected.

3) Additional sample code has been added in the Scripting Sample Code topic.

4) New content has been added to the URL Addressable Forms topic.

* Credit goes to Amy Langlois

09 September 2008

Extend HyperLink Control Usage in ASP.Net

Code implementation like below [wrapping controls within control] enabled user to control the image size because it is an individual tag. If we need to hide the link base on certain condition,simply set the visibility of "linkNewEmail" to false. Whole hyperlink+image+label will be invisible because it treat as one component.

  <br /><asp:HyperLink ID="linkNewEmail" runat="server" NavigateUrl="Default.aspx"><br /><asp:Image ID="Image2" runat="server" ImageUrl="icoNewTemplate.gif"/> <br /><asp:Label ID="Label3" runat="server" Text="New Email Template"></asp:Label><br /></asp:HyperLink><br />

03 September 2008

Visual Studio 2008 SP1 issue (Terminate Unexpected)

Recently I installed the VS2008 SP1 on my development machine, after that I face a strange issue; where I can't add custom web control (right click>choose items), after a while, VS2008 terminate directly.

Problem is cause by the conflict between SP1 and the "Power Commands" tools.
Thanks for the MSDN forum.

Solution: Uninstall the Power Commands tools.

30 August 2008

MSCRM4: SoapHeaderAuthenticationProvider showing in custom page

Recently i try to deploy my custom page into a fresh new installed CRM Titan server.
I hit the SoapHeaderAuthenticationProvider error,message:-

'Microsoft.Crm.WebServices.Crm2007.MultipleOrganizationSoapHeaderAuthenticationProvider,
Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' doesn't exist.
Parameter name:
Microsoft.Crm.WebServices.Crm2007.MultipleOrganizationSoapHeaderAuthenticationProvider,
Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35


Solution:
Error is cause by one of the MSCRM DLL "Microsoft.Crm.WebServices.dll" does not register under GAC.
Just Drag the DLL to GAC folder solved the problem.

24 August 2008

Show Scrollbar on MSCRM Titan for custom page

Fo those who wish to load custom page clicking the navigation panel. You will found that the custom page loaded in content panel wont show the scrollbar if you make explorer window smaller/page information overload.

Solution :
Use IFRAME to load your custom page. That means your navigation link is link to your IFRAME html page.

    <br />
<html style="height: 100%;"> <br />
<head> <br />
<title>Untitled Page</title> <br />
</head> <br />
<body style="width:100%; height:100%;" > <br />
<iframe id="frm" src="Search.aspx" frameborder="0" height="100%" width="100%"> <br />
</iframe> <br />
</body> <br />
</html> <br />
<br />

Create a html page using the code above. Then change the “src” to your custom page url.

Reload/Refresh parent window from pop up window (dialog window)

Let say you have a parent window with some information loaded from database, and then you have a link that will prompt a new dialog window base on the selection item on parent window. After you finished editing the data in dialog window, you click save then close. BUT… at the same time you also want parent window to auto refresh in order to show the realtime information/changes you have made. You can achieve this by many methods; AJAX..javascript..codebehind.. In my opinion, I think javascript is the easiest way to achive this. Just fire this javascript function on your dialog window’s close button. Thats all you need to do Just give me a thumb if really help you.
function ReloadParentWindow()
{
if (window.opener && !window.opener.closed)
{
window.opener.location.reload();
self.close();
}
}