just execute the below query
DECLARE @DB_Name varchar(100)
DECLARE @Command nvarchar(200)
DECLARE database_cursor CURSOR FOR
SELECT name
FROM master.sys.sysdatabases
OPEN database_cursor
FETCH NEXT FROM database_cursor INTO @DB_Name
WHILE @@FETCH_STATUS = 0
BEGIN
SELECT @Command = 'SELECT SF.fullname, SF.internalemailaddress FROM '+@DB_NAME+'.dbo.systemuserbase SF'
IF @DB_NAME like '%_MSCRM'
EXEC sp_executesql @Command
FETCH NEXT FROM database_cursor INTO @DB_Name
END
CLOSE database_cursor
DEALLOCATE database_cursor
Sudhanshu
Thursday, October 14, 2010
Wednesday, October 13, 2010
only showing one typename for lookup
if the lookup is matching to more than one entities and if you want to match to only one entity from a particular lookup just use the following code on onload of the form.
crmForm.all..setAttribute(”lookuptypes”, “2″);
Sudhanshu
crmForm.all.
Sudhanshu
Tuesday, October 12, 2010
Change typename in lookup ms crm
i have one challenge as follows, if you can....
on look up, onclick of it a popup window will come, there you can select a record.
there also a picklist will be there(sometimes) where you can also change. the best example is the regarding attribute on letter.
suppose on that picklist i have 3 options as a,b,c.
bydefault a is selected and on basis of some condition i want b to be selected.
its doable and as follows.
just put the following code on load of the form.
crmForm.all..defaulttype = "2"; //the number of the picklist value, starts from 1
Sudhanshu
on look up, onclick of it a popup window will come, there you can select a record.
there also a picklist will be there(sometimes) where you can also change. the best example is the regarding attribute on letter.
suppose on that picklist i have 3 options as a,b,c.
bydefault a is selected and on basis of some condition i want b to be selected.
its doable and as follows.
just put the following code on load of the form.
crmForm.all.
Sudhanshu
Sunday, October 10, 2010
Friday, October 8, 2010
Check which Update Rollup version is installed on your CRM environments
Browse to the CRM website.
Click on the “Help” button on the top right side of the window.
Click on “About Microsoft Dynamics CRM”
Get the build number displayed as follows else the image in side.
Version Build Number Released on
RTM 4.0.7333.3 12/19/2007
Update Rollup 1 4.0.7333.1113 11/24/2008
Update Rollup 2 4.0.7333.1312, 4.0.7333.1316 1/15/2009, 2/8/2009
Update Rollup 3 4.0.7333.1408 3/12/2009
Update Rollup 4 4.0.7333.1551 5/7/2009
Update Rollup 5 4.0.7333.1644, 4.0.7333.1645 7/2/2009
Update Rollup 6 4.0.7333.1750 9/27/2009
Update Rollup 7 4.0.7333.2138 10/22/2009
Update Rollup 8 4.0.7333.2542 12/17/2009
Update Rollup 9 4.0.7333.2644 2/11/2010
Update Rollup 10 4.0.7333.2741 4/8/2010
Update Rollup 11 4.0.7333.2861 6/25/2010
Update Rollup 12 4.0.7333.2935 8/2/2010
Roll up 13 also has been come, will udate that latter.
Sudhanshu
Labels:
Check,
environments,
is installed,
on your CRM,
Rollup,
version,
which Update
Remotely enable the RDP(mstsc) and restart the system(computer)
Some times while installing CRM or rollups the RDP suddenly stops working.
so enable the rdp and retstart the system remotely follow following steps.
Enable the RDP(mstsc)
From you own system or any other system(it should in the same network)
#1. run and type "regedit"
#2. Click on File, then choose "Connect Network Registry".
#3. In the Select Computer search box either browse Active Directory to locate the remote server, or type its name in the dialog box.
#4. In the remote machine's registry browse to the following key:
HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server
#5. Under the Terminal Server key find the value named fDenyTSConnections (REG_DWORD). Change the value data from 1 (Remote Desktop disabled) to 0 (Remote Desktop enabled). Even if its 0 just change it to 1 and make again to 0.
#6. Reboot the remote machine for the change to take effect. You can easily do so by opening a command prompt and typing the following command:
Restart the system remotely
#1. Start -> Run and type shutdown -i

This window will show up. Press Add and type either IP or DNS of remote server.
Select shutdown or restart and press OK. That 's it. For your convenience you may run from command line constanct ping (ping servername -t) when the server actually stopped to respond to pings and when it started again.
#2. Alternatively you can go to command prompt (start -> run -> cmd) on your workstation and Type
shutdown -r -m \\x.x.x.x
Replace x.x.x.x with the IP address or computer name of the remote machine. -r option is for restart, don't use -r if want to just shut down the system
so be carefull about the input parameter -r
Have fun
Sudhanshu
Labels:
(computer),
and restart,
Enable,
Remotely,
the RDP(mstsc),
the system
Thursday, October 7, 2010
Disable the Links in a Lookup Field MS CRM 4.0
Sometimes simply making a Lookup field “read only” isn’t enough. Sometimes, you may want to restrict the ability to even follow the links held inside the field. so this is here how to handel that from the user.
//this a general function which takes the name of the lookup
function DisableLookupLinks(lookupFieldName) {
var lookupParentNode = document.getElementById(lookupFieldName + "_d");
var lookupSpanNodes = lookupParentNode.getElementsByTagName("SPAN");
for (var spanIndex = 0; spanIndex < lookupSpanNodes.length; spanIndex ++) {
var currentSpan = lookupSpanNodes[spanIndex];
currentSpan.onclick = function() {};
}
}
now To disable a field's Lookup links, pass the field's schema name into the function.
DisableLookupLinks("<lookupfield_name>");
Sudhanshu
//this a general function which takes the name of the lookup
function DisableLookupLinks(lookupFieldName) {
var lookupParentNode = document.getElementById(lookupFieldName + "_d");
var lookupSpanNodes = lookupParentNode.getElementsByTagName("SPAN");
for (var spanIndex = 0; spanIndex < lookupSpanNodes.length; spanIndex ++) {
var currentSpan = lookupSpanNodes[spanIndex];
currentSpan.onclick = function() {};
}
}
now To disable a field's Lookup links, pass the field's schema name into the function.
DisableLookupLinks("<lookupfield_name>");
Sudhanshu
Labels:
Disable,
Field,
in a Lookup,
MS CRM 4.0,
the Links
Extreme Fast AsyncOperations MS CRM 4.0
This white paper from MS might be more applicable to you.
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=e76d8916-81a6-4330-90ae-b24f8263fff8&DisplayLang=en
CRM Configuration Changes
These configurations were done so that the workflow service would pick up the workflows as fast as it can and would not create a backlog of workflows and overload the workflows stack. Changes were made in the MSCRM_CONFIG database, on the dbo.DeploymentProperties table.
Parameters that were changed:
•AsyncSelectInterval
•Default value: 5
•New value: 1
•AsyncStateStatusUpdateInterval
•Default value: 5
•New value: 1
•AsyncItemsInMemoryLow
•Default value: 1000
•New value: 10
•AsyncItemsInMemoryHigh
•Default value: 2000
•New value: 20
Sudhanshu
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=e76d8916-81a6-4330-90ae-b24f8263fff8&DisplayLang=en
CRM Configuration Changes
These configurations were done so that the workflow service would pick up the workflows as fast as it can and would not create a backlog of workflows and overload the workflows stack. Changes were made in the MSCRM_CONFIG database, on the dbo.DeploymentProperties table.
Parameters that were changed:
•AsyncSelectInterval
•Default value: 5
•New value: 1
•AsyncStateStatusUpdateInterval
•Default value: 5
•New value: 1
•AsyncItemsInMemoryLow
•Default value: 1000
•New value: 10
•AsyncItemsInMemoryHigh
•Default value: 2000
•New value: 20
Sudhanshu
Labels:
Async,
Extreme,
Fast,
MS CRM 4.0,
Operations
Wednesday, October 6, 2010
set the time in the time picker in MS CRM Date time field
Hi all,
some times we need the exact time , while some body is picking the date from the date picker. and the attribute is of date and time and showing full date and time also.
So once the user selects the date the time goes to 12:00 AM.
if (s)he wats to get the current time then just follow the followings
#1 get the selected date values by user
var selectedDate = crmForm.all.<datefieldname>.DataValue;
var date = selectedDate.getDate();
var month = selectedDate.getMonth();
var year = selectedDate.getYear();
#2 create the client date and fetch the time values
var clientDate = new Date();
var hr = clientDate .getHours();
var mnt = clientDate .getMinutes();
var sec = clientDate .getSeconds();
//change the value to hr and min
if(mnt >= 0 && mnt <=30){
hr = hr; // no change
mnt = 30; //make the mnt to 30
}
if(mnt > 30 && mnt <=59){
hr = hr+1; // add 1 to hr to round up
mnt = 0; // reset the mnt
}
#3 now create a new date with the year,month,date from the selected date and the hour,minutes,seconds from the client time
var finalDate = new Date(year,month,date,hr,mnt,sec);
//alert(finalDate);
#4 finally assing the time to the destination
crmForm.all.<datefieldname>.DataValue = finalDate;
Sudhanshu
some times we need the exact time , while some body is picking the date from the date picker. and the attribute is of date and time and showing full date and time also.
So once the user selects the date the time goes to 12:00 AM.
if (s)he wats to get the current time then just follow the followings
#1 get the selected date values by user
var selectedDate = crmForm.all.<datefieldname>.DataValue;
var date = selectedDate.getDate();
var month = selectedDate.getMonth();
var year = selectedDate.getYear();
#2 create the client date and fetch the time values
var clientDate = new Date();
var hr = clientDate .getHours();
var mnt = clientDate .getMinutes();
var sec = clientDate .getSeconds();
//change the value to hr and min
if(mnt >= 0 && mnt <=30){
hr = hr; // no change
mnt = 30; //make the mnt to 30
}
if(mnt > 30 && mnt <=59){
hr = hr+1; // add 1 to hr to round up
mnt = 0; // reset the mnt
}
#3 now create a new date with the year,month,date from the selected date and the hour,minutes,seconds from the client time
var finalDate = new Date(year,month,date,hr,mnt,sec);
//alert(finalDate);
#4 finally assing the time to the destination
crmForm.all.<datefieldname>.DataValue = finalDate;
Sudhanshu
Labels:
Date time field,
in MS CRM,
set the,
the time picker,
time in
Tuesday, October 5, 2010
Enable CRM 4.0 URL QueryString Parameter Passing…
Sometimes we need to pass some parameters and values the URL as querystring.
and it will not work due to some reason.
to make it happen follow the following steps.
open the regedit
Create a DWORD registry key named [DisableParameterFilter] under [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM], set the value to 1 , and the do a iisreset, this enable the url querystring parameter passing under CRM 4.
Sudhanshu
and it will not work due to some reason.
to make it happen follow the following steps.
open the regedit
Create a DWORD registry key named [DisableParameterFilter] under [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM], set the value to 1 , and the do a iisreset, this enable the url querystring parameter passing under CRM 4.
Sudhanshu
Subscribe to:
Posts (Atom)