Показаны сообщения с ярлыком customization. Показать все сообщения
Показаны сообщения с ярлыком customization. Показать все сообщения

2009-07-20

Get selected item in CRM grid

The following snippet will allow you to retrieve an array containing the Id values of the selected records in the grid:

// get array of selected records
var a = document.all['crmGrid'].InnerGrid.SelectedRecords;
var selectedItems = new Array(a.length);
for (var i=0; i < a.length; i++)
{
selectedItems[i] = a[i][0];
}
alert(selectedItems);

To get all of the records in the grid (ie. “All Records on Current Page”):

// array of all records on current page
var iTotal = document.all['crmGrid'].InnerGrid.NumberOfRecords;
var o = document.all['crmGrid'].InnerGrid;
var allItems = new Array;
var ii = 0;
for (var i=0; i < iTotal; i++)
{
allItems[ii] = o.rows[i].oid;
ii++;
}
alert(allItems);

The source: http://blog.customereffective.com/blog/2009/02/javascript-snippets-for-working-with-grids-in-crm.html

2009-06-04

CrmDateTime conversion to DateTime


Convert.ToDateTime(crmdatetime.Value)
DateTime.Parse(crmdatetime.Value)


For more information on the CrmDateTime, look in the SDK:
http://msdn2.microsoft.com/en-us/library/aa613542.aspx

2008-07-14

ISV.config.xml и русские символы

Если при импорте ISV.config.xml у вас не отображаются русские символы, то посмотрите, есть ли у вас в начале файла строка

<?xml version="1.0" encoding="utf-8"?>;

ISV.config.xml

В MS CMR 4.0 поменялся формат ISV.config.xml
Все Title и ToolTips теперь должны быть вынесены в отдельные тэги.
Например, вместо

<button
title="Dial..."
tooltip="Dials one of the phone numbers on this record"
icon="/_imgs/ico_16_137.gif" url="/C4Web/C4Dial.aspx" passparams="1"
winparams="directories=0,height=150,width=300,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no" winmode="0" client="Web, Outlook" availableoffline="false">


следует писать


<Button Icon="/_imgs/ico_16_137.gif" Url="/C4Web/C4Dial.aspx" PassParams="1" WinParams="directories=0,height=150,width=300,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no" WinMode="0" Client="Web, Outlook" AvailableOffline="false">
<Titles>
<Title LCID="1001" Text="Dial..." />
</Titles>
<ToolTips>
<ToolTip LCID="1001" Text="Dials one of the phone numbers on this record" />
</ToolTips>
</Button›