Skip to content

Commit ff28d9c

Browse files
committed
2 parents 6cecef8 + afa2b39 commit ff28d9c

File tree

7 files changed

+126
-1
lines changed

7 files changed

+126
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
$assemblyPath = "c:\trunk\x64\Debug\TRIM.SDK.dll"
2+
3+
Add-Type -Path $assemblyPath
4+
5+
$database = New-Object TRIM.SDK.Database
6+
$database.TrustedUser = "corpdom\churchla"
7+
$database.Id = "N1"
8+
$database.WorkgroupServerName = "local"
9+
$database.Connect()
10+
11+
$searchSearch = New-Object TRIM.SDK.SavedSearch($database, "ACL Test")
12+
13+
14+
foreach ($record in $searchSearch.GetSearch()) {
15+
$acl = $record.AccessControlList
16+
17+
if ($acl.GetAccessLocations([TRIM.SDK.RecordAccess]::UpdateMetadata).Count -gt 0)
18+
{
19+
20+
$acl.SetCurrentAccessControlSettings([TRIM.SDK.RecordAccess]::AddContents, $acl.GetCurrentAccessControlSettings([TRIM.SDK.RecordAccess]::UpdateMetadata))
21+
$acl.SetAccessLocations([TRIM.SDK.RecordAccess]::AddContents, $acl.GetAccessLocations([TRIM.SDK.RecordAccess]::UpdateMetadata));
22+
23+
$record.AccessControlList = $acl
24+
$record.Save()
25+
}
26+
27+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copy ACL
2+
This script copies the ACL settings from 'Update Metadata' to 'Contribute Contents' for each Record in the saved search 'ACL Test'.
3+
4+
## Where to look
5+
Points of interest:
6+
* We do not modify the ACL as a property (e.g. record.AccessControlList.SetAccessLocations()) as the SDK does not handle modifying complex objects, instead we set the ACL in the variable 'acl' and then set 'record.AccessControlList = acl' when we are finished.
7+
* This script is written against the CM 10 SDK, change TRIM.SDK to HP.HPTRIM.SDK for earler CM versions.

Samples/ServiceAPI/Power Query/Saved Search Query/Query - CMSavedSearch.odc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ xmlns="http://www.w3.org/TR/REC-html40">
2020
<odc:CommandType>SQL</odc:CommandType>
2121
<odc:CommandText>SELECT * FROM [CMSavedSearch]</odc:CommandText>
2222
</odc:PowerQueryConnection>
23-
<odc:PowerQueryMashupData>&lt;Mashup xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns=&quot;http://schemas.microsoft.com/DataMashup&quot;&gt;&lt;Client&gt;EXCEL&lt;/Client&gt;&lt;Version&gt;2.69.5467.451&lt;/Version&gt;&lt;MinVersion&gt;2.21.0.0&lt;/MinVersion&gt;&lt;Culture&gt;en-AU&lt;/Culture&gt;&lt;SafeCombine&gt;true&lt;/SafeCombine&gt;&lt;Items&gt;&lt;Query Name=&quot;ServiceURL&quot;&gt;&lt;Description&gt;The ServiceAPI URL&lt;/Description&gt;&lt;Formula&gt;&lt;![CDATA[let&#13;&#10; Source = &quot;http://localhost/ServiceAPI/&quot; meta [IsParameterQuery=true, Type=&quot;Text&quot;, IsParameterQueryRequired=true]&#13;&#10;in&#13;&#10; Source]]&gt;&lt;/Formula&gt;&lt;IsParameterQuery xsi:nil=&quot;true&quot; /&gt;&lt;IsDirectQuery xsi:nil=&quot;true&quot; /&gt;&lt;/Query&gt;&lt;Query Name=&quot;PageSize&quot;&gt;&lt;Description&gt;Number of objects (e.g. Records) to return in each page request.&lt;/Description&gt;&lt;Formula&gt;&lt;![CDATA[let&#13;&#10; Source = 397 meta [IsParameterQuery=true, Type=&quot;Number&quot;, IsParameterQueryRequired=true]&#13;&#10;in&#13;&#10; Source]]&gt;&lt;/Formula&gt;&lt;IsParameterQuery xsi:nil=&quot;true&quot; /&gt;&lt;IsDirectQuery xsi:nil=&quot;true&quot; /&gt;&lt;/Query&gt;&lt;Query Name=&quot;CMSavedSearch&quot;&gt;&lt;Formula&gt;&lt;![CDATA[let&#13;&#10; Source = (savedSearchId as text) as table =&gt;&#13;&#10;let&#13;&#10; friendlyRowValues = (row) =&gt;&#13;&#10; let&#13;&#10; tmoColumns = {&quot;Uri&quot;}, &#13;&#10; locationColumns = {&quot;Uri&quot;}, &#13;&#10;&#13;&#10; &#9; refMainObjectFieldTransformations = List.Transform(tmoColumns, each {_, @friendlyRowValues}),&#13;&#10; refLocationFieldTransformations = List.Transform(locationColumns, each {_, @friendlyRowValues}),&#13;&#10;&#9; v = &#13;&#10; if Value.Type(row) = type text then row else&#13;&#10; if Value.Type(row) = type number then row else&#13;&#10; if row is null then&#13;&#10; null&#13;&#10; else if Record.HasFields(row, &quot;TrimType&quot;) and row[TrimType] = &quot;Location&quot; then&#13;&#10; Record.TransformFields(row, refLocationFieldTransformations)&#13;&#10; else if Record.HasFields(row, &quot;TrimType&quot;) then&#13;&#10; Record.TransformFields(row, refMainObjectFieldTransformations)&#13;&#10; &#9; else if Record.HasFields(row, &quot;Value&quot;) then&#13;&#10;&#9; &#9;row[Value]?&#13;&#10; &#9; else if Record.HasFields(row, &quot;IsTimeClear&quot;) then&#13;&#10;&#9; &#9;row[DateTime]?&#13;&#10; &#9; else&#13;&#10;&#9; &#9;row&#13;&#10; &#9;in&#13;&#10;&#9; v,&#13;&#10;&#13;&#10; getPropertyList = (savedSearchDetails as record, savedSearchId as text) as record =&gt;&#13;&#10; let&#13;&#10;&#9;&#9;&#9;searchQuery = [q=&quot;unkSaved:&quot; &amp; savedSearchId, pageSize=&quot;1&quot;, excludeCount=&quot;true&quot;,propertySets=&quot;FromSearch&quot;, IncludePropertyDefs=&quot;true&quot;],&#13;&#10;&#9;&#9;&#9;options = [&#13;&#10;&#9;&#9;&#9;&#9;Headers=[#&quot;Accept&quot;=&quot;application/json&quot;, #&quot;Cache-Control&quot;=&quot;no-cache, no-store, must-revalidate&quot;],&#13;&#10;&#9;&#9;&#9;&#9;Query=searchQuery],&#13;&#10;&#13;&#10;&#9;&#9;&#9;Source = Json.Document(Web.Contents(ServiceURL &amp; savedSearchDetails[trimType] , options))&#13;&#10; in&#13;&#10; Source[PropertiesAndFields], &#13;&#10;&#13;&#10; getSavedSearchDetails = ( savedSearchId as text) as record =&gt;&#13;&#10; let&#13;&#10;&#9;&#9;&#9;searchQuery = [properties=&quot;SavedSearchQueryString,SavedSearchObjectType&quot;],&#13;&#10;&#9;&#9;&#9;options = [&#13;&#10;&#9;&#9;&#9;&#9;Headers=[#&quot;Accept&quot;=&quot;application/json&quot;],&#13;&#10;&#9;&#9;&#9;&#9;Query=searchQuery],&#13;&#10;&#13;&#10;&#9;&#9;&#9;Source = Json.Document(Web.Contents(ServiceURL &amp; &quot;savedsearch/&quot; &amp; savedSearchId , options))&#13;&#10; in&#13;&#10; [trimType=Source[Results]{0}[SavedSearchObjectType][Value], query= Source[Results]{0}[SavedSearchQueryString][Value]], &#13;&#10;&#13;&#10;&#9;runSearch = (startAt as number, savedSearchDetails as record, properties as text) as record =&gt;&#13;&#10;&#9;&#9;let&#13;&#10;&#13;&#10;&#13;&#10;&#9;&#9;&#9;searchQuery = [rnd=Number.ToText(Number.Random()), q=savedSearchDetails[query], descendantProperties=&quot;NameString,ToolTip&quot;, pageSize=Number.ToText(PageSize), excludeCount=&quot;true&quot;,properties=properties, start=Number.ToText(startAt)],&#13;&#10;&#9;&#9;&#9;options = [&#13;&#10;&#9;&#9;&#9;&#9;Headers=[#&quot;Accept&quot;=&quot;application/json&quot;, #&quot;Content-Type&quot;=&quot;application/json&quot;, #&quot;Cache-Control&quot;=&quot;no-cache, no-store, must-revalidate&quot;],&#13;&#10;&#9;&#9;&#9;&#9;Query=searchQuery, RelativePath = savedSearchDetails[trimType]],&#13;&#10;&#13;&#10;&#9;&#9;&#9;Source = Json.Document(Web.Contents(ServiceURL, options))&#13;&#10;&#9;&#9;&#9;&#9;&#9;in&#13;&#10;&#9;&#9;&#9; Source , &#13;&#10;&#13;&#10;&#13;&#10; savedSearchDetails = getSavedSearchDetails(savedSearchId),&#13;&#10; searchResults = List.Skip(List.Generate(() =&gt; [IsMore = null, Start = 1, WebCall = {}, Results = null],&#13;&#10; each [Results] = null or List.Count([Results]) &gt; 0,&#13;&#10; each [WebCall = runSearch(_[Start], savedSearchDetails, Text.Combine(propertyList, &quot;,&quot;)), IsMore = WebCall[HasMoreItems], Start=_[Start]+PageSize, Results = WebCall[Results]],&#13;&#10; each [Results]),1), &#13;&#10; &#13;&#10; PropertiesAndFields = getPropertyList(savedSearchDetails, savedSearchId ),&#13;&#10;&#9;&#9;&#9;recordPropertyTable = Record.ToTable(PropertiesAndFields),&#13;&#10;&#9;&#9;&#9;Value = recordPropertyTable {0}[Value],&#13;&#10;&#9;&#9;&#9;propertyTable = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),&#13;&#10;&#13;&#10;&#9;&#9;&#9;propertyColumn = if Table.HasColumns(propertyTable,&quot;Column1&quot;) then Table.ExpandRecordColumn(propertyTable , &quot;Column1&quot;, {&quot;Id&quot;}, {&quot;Column1.Id&quot;}) else error Error.Record(&quot;error reason&quot;, &quot;error message&quot;, &quot;error detail&quot;),&#13;&#10;&#9;&#9;&#9;propertyList = propertyColumn[Column1.Id],&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;&#9;&#9;&#9;#&quot;Converted to Table&quot; = Table.FromList(List.Combine(searchResults), Splitter.SplitByNothing(), null, null, ExtraValues.Error), &#13;&#10;&#9;&#9;&#9;#&quot;Expanded Column1&quot; = if Table.HasColumns(#&quot;Converted to Table&quot;,&quot;Column1&quot;) then Table.ExpandRecordColumn(#&quot;Converted to Table&quot;, &quot;Column1&quot;, propertyList) else error Error.Record(&quot;EmptyList&quot;, &quot;No results returned by search.&quot;, null),&#13;&#10;&#9;&#9;&#9;#&quot;Column Transformations&quot; = List.Transform(propertyList, each {_, friendlyRowValues}),&#13;&#10;&#9;&#9;&#9;pageAsTable = Table.FromRecords(Table.TransformRows(#&quot;Expanded Column1&quot;, (row) =&gt; Record.TransformFields(row, #&quot;Column Transformations&quot;)))&#13;&#10;&#13;&#10;&#13;&#10; in&#13;&#10; pageAsTable&#13;&#10;in&#13;&#10; Source]]&gt;&lt;/Formula&gt;&lt;IsParameterQuery xsi:nil=&quot;true&quot; /&gt;&lt;IsDirectQuery xsi:nil=&quot;true&quot; /&gt;&lt;/Query&gt;&lt;/Items&gt;&lt;/Mashup&gt;</odc:PowerQueryMashupData>
23+
<odc:PowerQueryMashupData>&lt;Mashup xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns=&quot;http://schemas.microsoft.com/DataMashup&quot;&gt;&lt;Client&gt;EXCEL&lt;/Client&gt;&lt;Version&gt;2.85.741.0&lt;/Version&gt;&lt;MinVersion&gt;2.21.0.0&lt;/MinVersion&gt;&lt;Culture&gt;en-AU&lt;/Culture&gt;&lt;SafeCombine&gt;false&lt;/SafeCombine&gt;&lt;Items&gt;&lt;Query Name=&quot;ServiceURL&quot;&gt;&lt;Description&gt;The ServiceAPI URL&lt;/Description&gt;&lt;Formula&gt;&lt;![CDATA[let&#13;&#10; Source = &quot;http://localhost/ServiceAPI/&quot; meta [IsParameterQuery=true, Type=&quot;Text&quot;, IsParameterQueryRequired=true]&#13;&#10;in&#13;&#10; Source]]&gt;&lt;/Formula&gt;&lt;IsParameterQuery xsi:nil=&quot;true&quot; /&gt;&lt;IsDirectQuery xsi:nil=&quot;true&quot; /&gt;&lt;/Query&gt;&lt;Query Name=&quot;PageSize&quot;&gt;&lt;Description&gt;Number of objects (e.g. Records) to return in each page request.&lt;/Description&gt;&lt;Formula&gt;&lt;![CDATA[let&#13;&#10; Source = 397 meta [IsParameterQuery=true, Type=&quot;Number&quot;, IsParameterQueryRequired=true]&#13;&#10;in&#13;&#10; Source]]&gt;&lt;/Formula&gt;&lt;IsParameterQuery xsi:nil=&quot;true&quot; /&gt;&lt;IsDirectQuery xsi:nil=&quot;true&quot; /&gt;&lt;/Query&gt;&lt;Query Name=&quot;CMSavedSearch&quot;&gt;&lt;Description /&gt;&lt;Formula&gt;&lt;![CDATA[let&#13;&#10; Source = (savedSearchId as text) as table =&gt;&#13;&#10;let&#13;&#10; friendlyRowValues = (row) =&gt;&#13;&#10; let&#13;&#10; tmoColumns = {&quot;Uri&quot;}, &#13;&#10; locationColumns = {&quot;Uri&quot;}, &#13;&#10;&#13;&#10; &#9; refMainObjectFieldTransformations = List.Transform(tmoColumns, each {_, @friendlyRowValues}),&#13;&#10; refLocationFieldTransformations = List.Transform(locationColumns, each {_, @friendlyRowValues}),&#13;&#10;&#9; v = &#13;&#10; if Value.Type(row) = type text then row else&#13;&#10; if Value.Type(row) = type number then row else&#13;&#10; if row is null then&#13;&#10; null&#13;&#10; else if Record.HasFields(row, &quot;TrimType&quot;) and row[TrimType] = &quot;Location&quot; then&#13;&#10; Record.TransformFields(row, refLocationFieldTransformations)&#13;&#10; else if Record.HasFields(row, &quot;TrimType&quot;) then&#13;&#10; Record.TransformFields(row, refMainObjectFieldTransformations)&#13;&#10; &#9; else if Record.HasFields(row, &quot;Value&quot;) then&#13;&#10;&#9; &#9;row[Value]?&#13;&#10; &#9; else if Record.HasFields(row, &quot;IsTimeClear&quot;) then&#13;&#10;&#9; &#9;row[DateTime]?&#13;&#10; &#9; else&#13;&#10;&#9; &#9;row&#13;&#10; &#9;in&#13;&#10;&#9; v,&#13;&#10;&#13;&#10; getPropertyList = (savedSearchDetails as record, savedSearchId as text) as record =&gt;&#13;&#10; let&#13;&#10;&#9;&#9;&#9;searchQuery = [q=&quot;unkSaved:&quot; &amp; savedSearchId, pageSize=&quot;1&quot;, excludeCount=&quot;true&quot;,propertySets=&quot;FromSearch&quot;, IncludePropertyDefs=&quot;true&quot;],&#13;&#10;&#9;&#9;&#9;options = [&#13;&#10;&#9;&#9;&#9;&#9;Headers=[#&quot;Accept&quot;=&quot;application/json&quot;, #&quot;Cache-Control&quot;=&quot;no-cache, no-store, must-revalidate&quot;],&#13;&#10;&#9;&#9;&#9;&#9;Query=searchQuery],&#13;&#10;&#13;&#10;&#9;&#9;&#9;Source = Json.Document(Web.Contents(ServiceURL &amp; savedSearchDetails[trimType] , options))&#13;&#10; in&#13;&#10; Source[PropertiesAndFields], &#13;&#10;&#13;&#10; getSavedSearchDetails = ( savedSearchId as text) as record =&gt;&#13;&#10; let&#13;&#10;&#9;&#9;&#9;searchQuery = [properties=&quot;SavedSearchQueryString,SavedSearchObjectType&quot;],&#13;&#10;&#9;&#9;&#9;options = [&#13;&#10;&#9;&#9;&#9;&#9;Headers=[#&quot;Accept&quot;=&quot;application/json&quot;],&#13;&#10;&#9;&#9;&#9;&#9;Query=searchQuery],&#13;&#10;&#13;&#10;&#9;&#9;&#9;Source = Json.Document(Web.Contents(ServiceURL &amp; &quot;savedsearch/&quot; &amp; savedSearchId , options))&#13;&#10; in&#13;&#10; [trimType=Source[Results]{0}[SavedSearchObjectType][Value], query= Source[Results]{0}[SavedSearchQueryString][Value]], &#13;&#10;&#13;&#10;&#9;runSearch = (startAt as number, savedSearchDetails as record, properties as text) as record =&gt;&#13;&#10;&#9;&#9;let&#13;&#10;&#13;&#10;&#13;&#10;&#9;&#9;&#9;searchQuery = [rnd=Number.ToText(Number.Random()), q=savedSearchDetails[query], descendantProperties=&quot;NameString,ToolTip&quot;, pageSize=Number.ToText(PageSize), excludeCount=&quot;true&quot;,properties=properties, start=Number.ToText(startAt)],&#13;&#10;&#9;&#9;&#9;options = [&#13;&#10;&#9;&#9;&#9;&#9;Headers=[#&quot;Accept&quot;=&quot;application/json&quot;, #&quot;Content-Type&quot;=&quot;application/json&quot;, #&quot;Cache-Control&quot;=&quot;no-cache, no-store, must-revalidate&quot;],&#13;&#10;&#9;&#9;&#9;&#9;Query=searchQuery, RelativePath = savedSearchDetails[trimType]],&#13;&#10;&#13;&#10;&#9;&#9;&#9;Source = Json.Document(Web.Contents(ServiceURL, options))&#13;&#10;&#9;&#9;&#9;&#9;&#9;in&#13;&#10;&#9;&#9;&#9; Source , &#13;&#10;&#13;&#10;&#13;&#10; savedSearchDetails = getSavedSearchDetails(savedSearchId),&#13;&#10; searchResults = List.Skip(List.Generate(() =&gt; [IsMore = null, Start = 1, WebCall = {}, Results = null],&#13;&#10; each [Results] = null or List.Count([Results]) &gt; 0,&#13;&#10; each [WebCall = runSearch(_[Start], savedSearchDetails, Text.Combine(propertyList, &quot;,&quot;)), IsMore = WebCall[HasMoreItems], Start=_[Start]+PageSize, Results = WebCall[Results]],&#13;&#10; each [Results]),1), &#13;&#10; &#13;&#10; PropertiesAndFields = getPropertyList(savedSearchDetails, savedSearchId ),&#13;&#10;&#9;&#9;&#9;recordPropertyTable = Record.ToTable(PropertiesAndFields),&#13;&#10;&#9;&#9;&#9;Value = recordPropertyTable {0}[Value],&#13;&#10;&#9;&#9;&#9;propertyTable = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),&#13;&#10;&#13;&#10;&#9;&#9;&#9;propertyColumn = if Table.HasColumns(propertyTable,&quot;Column1&quot;) then Table.ExpandRecordColumn(propertyTable , &quot;Column1&quot;, {&quot;Id&quot;}, {&quot;Column1.Id&quot;}) else error Error.Record(&quot;error reason&quot;, &quot;error message&quot;, &quot;error detail&quot;),&#9;&#9;&#9;&#13;&#10;&#9;&#9;&#9;propertyList = propertyColumn[Column1.Id],&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;&#9;&#9;&#9;#&quot;Converted to Table&quot; = Table.FromList(List.Combine(searchResults), Splitter.SplitByNothing(), null, null, ExtraValues.Error), &#13;&#10;&#9;&#9;&#9; #&quot;Expanded Column1&quot; = Table.ExpandRecordColumn(#&quot;Converted to Table&quot;, &quot;Column1&quot;, {&quot;RecordDateCreated&quot;, &quot;RecordNumber&quot;, &quot;RecordRecordType&quot;, &quot;RecordTitle&quot;, &quot;IsEnableTrasaction&quot;, &quot;TrimType&quot;, &quot;Uri&quot;, &quot;Fields&quot;}),&#13;&#10;&#9;&#9;&#9;&#13;&#10;&#9;&#9;&#9;fieldNames = List.Select(propertyList, each not (Text.StartsWith(_, savedSearchDetails[trimType]) or _ = &quot;Uri&quot;)),&#13;&#10;&#9;&#9;&#9;#&quot;Expanded Column1.Fields&quot; = Table.ExpandRecordColumn(#&quot;Expanded Column1&quot;, &quot;Fields&quot;, fieldNames, fieldNames),&#13;&#10;&#13;&#10;&#9;&#9;&#9;#&quot;Column Transformations&quot; = List.Transform(propertyList, each {_, friendlyRowValues}),&#13;&#10;&#9;&#9;&#9;pageAsTable = Table.FromRecords(Table.TransformRows(#&quot;Expanded Column1.Fields&quot;, (row) =&gt; Record.TransformFields(row, #&quot;Column Transformations&quot;)))&#13;&#10;&#13;&#10;&#13;&#10; in&#13;&#10; pageAsTable&#13;&#10;in&#13;&#10; Source]]&gt;&lt;/Formula&gt;&lt;IsParameterQuery xsi:nil=&quot;true&quot; /&gt;&lt;IsDirectQuery xsi:nil=&quot;true&quot; /&gt;&lt;/Query&gt;&lt;/Items&gt;&lt;/Mashup&gt;</odc:PowerQueryMashupData>
2424
</odc:OfficeDataConnection>
2525
</xml>
2626
<style>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Infinite scroll for WebDrawer
2+
3+
## Overview
4+
WebDrawer uses a simple pagination model to retrieve subsequent pages from a search response. This sample adds an infinite scroll for the Record search.
5+
6+
7+
## Installing the sample
8+
Copy the file Views\Shared\custom_scripts.cshtml to the Views\Shared folder in your WebDrawer installation.
9+
10+
## Optimising performance
11+
Since the page numbering is no longer required you may choose to optimise the searching, this can be done by setting resultsOnly to true in the Records route.
12+
13+
```
14+
<add
15+
name="Record"
16+
model="Records"
17+
resultsOnly="true"
18+
template="WDRecordList"
19+
stringDisplayType="TreeColumn"
20+
properties="RecordRecordType,RecordExtension,RecordTitle,RecordNumber,RecordIsElectronic"
21+
/>
22+
```
23+
24+
## Hiding the page number
25+
If you have optimised the search the page number and 'Get Count' button will still be displayed at the bottom of the page, you may choose to hide these, to do this:
26+
1) edit the file Views\Shared\searchResults.cshtml, and
27+
2) add the code 'if (!(this.Request.Dto is HP.HPTRIM.ServiceModel.Records))' after the else statement that surrounds the page number code.
28+
29+
### Before
30+
![code before](code_before.png)
31+
32+
### Before
33+
![code after](code_after.png)
34+
35+
## A modification for 94 and before
36+
This sample was built in CM 10, which has changed the way icons are handled. If you look in custom_scripts.cshtml you will see the icon IMG HTML like this:
37+
38+
```
39+
<img src="/WebDrawer/TrimIcon/w48h48/' + row.RecordRecordType.Icon.Id + '.png">
40+
```
41+
42+
In 94 and earlier versions it should look like this:
43+
44+
```
45+
<img src="images/record_types/' + row.RecordRecordType.Icon.Id + '_x48.png">
46+
```

0 commit comments

Comments
 (0)