Showing posts with label PowerShell. Show all posts
Showing posts with label PowerShell. Show all posts

Monday, January 29, 2024

How to use Retrieve and Retrieve Multiple using PowerShell

Introduction:


In this Blog we will see how to use Retrieve and Retrieve Multiple using Power Shell with Dataverse or MSCRM


1. Retrieve:

 

Retrieve Used to Retrieve Single Record at a Time

 

CMDLETS:

 

Get-CrmRecord

 

Sample :

 

Get-CrmRecord -conn $conn -EntityLogicalName account -Id be02caab-6c16-e511-80d6-c4346bc43dc0 -Fields name,accountnumber

 

 

account - Entity Logical Name

be02caab-6c16-e511-80d6-c4346bc43dc0 - GUID of record to Retrieve

name,accountnumber - Field from Account Table

 

 

2. Retrieve Multiple :

 

Retrieve Multiple Used to Retrieve Multiple Records at a Time

 

CMDLETS:

 

Get-CrmRecordsByFetch

 

Sample :

 

$accountFetch = @"
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"> 
<entity name="account">
<attribute name="name" /> 
</entity>
</fetch>
"@

$multipleRecord = (Get-CrmRecordsByFetch -conn $conn -Fetch $accountFetch).CrmRecords

 

 

That's it :)

How to Import Data from Excel to Multiple tables in PowerApps

Introduction:   I have created a view on how to import data from excel to multiple tables in Canvas PowerApps   Implemented Steps: ...