< Back

Get-CrmRecordsByViewName

Sat Jan 18, 2020 4:01 pm

NAME Get-CrmRecordsByViewName



SYNOPSIS

Retrieves CRM records by using View Name.





SYNTAX

Get-CrmRecordsByViewName [-conn <CrmServiceClient>] [-ViewName] <String> [[-IsUserView] <Boolean>] [[-AllRows]

<SwitchParameter>] [[-TopCount] <Int32>] [<CommonParameters>]





DESCRIPTION

The Get-CrmRecordsByViewName cmdlet lets you retrieve CRM records by using View Name. You can use IsUserView

parameter to select SystemView or UserView.





PARAMETERS

-conn <CrmServiceClient>

A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ViewName <String>

A name of a view, which contains desired FetchXML.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-IsUserView [<Boolean>]

Speficy $True if the view is User View.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AllRows [<SwitchParameter>]

Indicates you would like to bring back data from all pages (all available rows in CRM, this function will take

longer to execute, but will include all the data rather than the first 5000 rows)



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-TopCount <Int32>

Maximum number of records to retrieve



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS









OUTPUTS









NOTES









-------------------------- Example 1 --------------------------



Get-CrmRecordsByViewName -conn $conn -ViewName "Active Accounts"



This example retrieves account records by using "Active Accounts" system view.







Key Value

--- -----

CrmRecords {@{accountid_Property=[accountid, 2bf8d93d-1f18-e511-80da-c4346bc43d94]; accountid=2...

Count 5

PagingCookie <cookie page="1"><name last="account907" first="A. Datum Corporation (sample)" /><ac...

NextPage True



-------------------------- Example 2 --------------------------



Get-CrmRecordsByViewName "My Custom Account View" $True



This example retrieves account records by using "My Custom Account View" user view by omitting parameter names.

When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.







Key Value

--- -----

CrmRecords {@{accountid_Property=[accountid, 2bf8d93d-1f18-e511-80da-c4346bc43d94]; accountid=2...

Count 5

PagingCookie <cookie page="1"><name last="account907" first="A. Datum Corporation (sample)" /><ac...

NextPage True





RELATED LINKS