web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Get value of Microsoft...
Power Apps
Unanswered

Get value of Microsoft.Xrm.Sdk.OptionSetValue

(0) ShareShare
ReportReport
Posted on by 7

I have the following powershell and XML file, but when running them I get the output 

tenant : Microsoft.Xrm.Sdk.OptionSetValue
exception_type : Microsoft.Xrm.Sdk.OptionSetValue
exception : 0.0.0.0

How do I get the value of the Microsoft.Xrm.Sdk.OptionSetValue?

 

$fetchXmlFile = "C:\temp\FetchExceptions.xml"
Connect-CrmOnlineDiscovery -InteractiveMode
$fetchXml = [xml](Get-Content $fetchXmlFile)
$result = Get-CrmRecordsByFetch -Fetch $fetchXml.OuterXml
$result.CrmRecords | Select-Object -Property tenant, exception_type, exception

<fetch mapping="logical" version="1.0">
 <entity name="crec2_spoofexceptions" alias="spoof_exception">
 <attribute name="crec2_tenant" alias="tenant"/>
 <attribute name="crec2_exceptiontype" alias="exception_type"/>
 <attribute name="crec2_exception" alias="exception"/>
 </entity>
</fetch>

 

I have the same question (0)
  • Verified answer
    EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Hi @dtietze,

    Your FetchXml looks correct, and the Get-CrmRecordsByFetch with the way you loop through the results looks good as well. I think your issue is with the way your read the FetchXml from the file. Try to simply declare the FetchXml in a PowerShell variable and re-run? Ex:

    $fetch = "
    <fetch mapping='logical' version='1.0'>
     <entity name='cre7b_car' alias='car'>
     <attribute name='cre7b_name' alias='name'/>
     <attribute name='cre7b_optionset' alias='opstionset' />
     </entity>
    </fetch>
    "

    Hope this helps!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard