Tuesday, 31 March 2009
Saturday, 21 March 2009
Modifying the color of disabled form fields
From stunnware:
Modifying the color of disabled form fields
Disabled form fields are sometimes hard to read. Making the color a little bit darker greatly helps to read all of the content without loosing the information that a field is read-only.
Open the following file in your CRM web: /_forms/controls/controls.css. Then find the following style:
INPUT.ro,TEXTAREA.ro,DIV.ro,SPAN.ro
{
background-color: #ffffff;
color: #808080;
border-color: #808080;
}
The color attribute is the light gray you're seeing by default. You may change it to #404040 to get a slightly darker gray. If you don't see the new colors in IE, hit CTRL-F5 to reload the source files, including the updated css file.
Friday, 20 March 2009
Read-only URL Addressable Form
http://ronaldlemmen.blogspot.com/2009/03/read-only-url-addressable-form.html
The SDK does describe URL Addressable Forms, but one thing which I do miss on this page, is details around how to link to a form in readonly format. This is done by using the following URL:
http://server/orgname/_forms/readonly/readonly.aspx?objTypeCode=objectTypeCode.
Of course you need to change the server to servername, orgname to organization name and the objectTypeCode to the entity object type code. For instance 1 for account or 1024 for product.
Appointment scheduling problems
[username] is being scheduled outside their work hours.
Solution: Default appointment end times to start time plus 1 hour.
Problem #2: When saving an appointment which conflicts with another appointment is users' calendar - I get:
[username] is unavailable at this time.
Solution: Default status reason (Show Time As) to Free.
if (crmForm.all.statuscode.DataValue == 5)
{
crmForm.all.statuscode.DataValue = 1;
}
Wednesday, 18 March 2009
Set a datetime field value to 9am today
vMyDate.setHours(9);
vMyDate.setMinutes(0);
crmForm.all.exe_appointmentdate.DataValue = vMyDate;
Monday, 16 March 2009
Friday, 13 March 2009
SQL Reporting Services Reports: Jump to URL
(Within a table)
Cell, Properties, Navigation, Jump to URL:
="http://crm/CRMReports/viewer/drillopen.aspx?ID=" &
Fields!accountid.value.ToString() & "&OTC=1"
note: OTC must equal objectTypeCode (i.e. 1 for account)
Tuesday, 10 March 2009
Show a Modal Dialog and return a lookup
The following code snippet shows you how to return a lookup from a modal dialog.
I used this code to replace a standard CRM 4 Lookup and display my own custom made lookup screen. When clicking OK in this custom screen a lookup should be returned with the Entity the user has selected in the Custom Lookup.
Place this function in the CRM Form.
document.CustomLookup = function ()
{
var url = “/ISV//CustomLookup.aspx?orgname=” + ORG_UNIQUE_NAME;
var selectedItems = window.showModalDialog(url, null, ‘dialogWidth:600px;dialogHeight:400px;resizable:yes’);
if (selectedItems != null){
crmForm.all.myField.DataValue = selectedItems ;
crmForm.all. myField.FireOnChange(); // If you also need to fire the onchange event
}
}
Then use this function as the onclick event of the Lookup.
try
{
var BlueprintLookup = crmForm.all.metris_blueprintid;
BlueprintLookup.onclick = document.LookupBlueprint;
} catch (e) {}
In the CustomLookup.aspx page add a Gridview that is populated with the entities you need. And add a JavaScript function that will retrieve the selected item in the grid. (I usually work with a SelectedRow style)
http://kennyvaes.wordpress.com/2009/03/10/show-a-modal-dialog-and-return-a-lookup/
Failure When Upgrading to The CRM 4.0 Outlook Client
If you’ve upgraded to Microsoft CRM 4.0 and your users lose their Microsoft CRM functionality in the Outlook client, try these steps to correct the problem:
- In Outlook, go to Tools -> Customize.
- Click the Toolbars tab.
- Remove the CRM tool bar listing.
- Click on each other toolbar listing and click Reset on each one.
- Click the Options tab and click the “Reset menu and toolbar usage data”.
- Close this box.
- Click Tools->Trust Center.
- Click Add-Ins in the left navigation bar.
- At the bottom of this screen, choose “COM Add-ins” then the “Go” button.
- Click on the CRM Dynamics item then click the “Remove”.
- Close Outlook.
- Open Outlook and verify that the CRM menu bar and task bar items are removed.
- Go to Tools->Trust Center.
- Click Add-Ins in the left navigation bar.
- At the bottom of this screen, choose “COM Add-ins” then the “Go” button.
- Click Add and add the CRM add-in back by navigating to the install location (by default this is C:\Program Files\Microsoft Dynamics CRM\client\bin\crm) and choose the file “crmaddin.dll”.
This has been the fix for all of our Microsoft CRM 3.0 clients that upgraded to Microsoft CRM 4.0!
DGMicrosoft CRM Consultant
http://www.unitek.com/training/microsoft/crm/blog/2009/03/09/failure-when-upgrading-to-the-crm-40-outlook-client/
Monday, 9 March 2009
Hiding Buttons in MSCRM 4.0
//Get all of the List Elements
var lis = document.getElementsByTagName('LI');
var i = 0;
//Loop through the list items
while (i < lis.length) {
//Don't worry about any list item that doesn't have the title you are looking for.
if (lis[i].getAttribute('title') == 'INSERT ELEMENT TITLE HERE')
{
//Replace the DHTML with blank tags to hide the button
lis[i].outerHTML=''
}
i = i + 1;
}
