Is there any way to fetch fullnames for ProfilePasswordPolicy records using API?

221 Views Asked by At

Is there any way to fetch 'fullname' for ProfilePasswordPolicy records? I am trying to update and read records of ProfilePasswordPolicy but getting the error shown in the screenshot.

SOAP API error

I can get fullnames using workbench but want to get it using programmatically (API). Workbench

1

There are 1 best solutions below

0
On BEST ANSWER

You can retrieve fullNames with listMetadata action:

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <env:Header>
        <CallOptions xmlns="http://soap.sforce.com/2006/04/metadata">
            <client />
        </CallOptions>
        <SessionHeader xmlns="http://soap.sforce.com/2006/04/metadata">
            <sessionId>SESSION_ID_REMOVED</sessionId>
        </SessionHeader>
    </env:Header>
    <env:Body>
        <listMetadata xmlns="http://soap.sforce.com/2006/04/metadata">
            <queries>
                <type>ProfilePasswordPolicy</type>
            </queries>
            <asOfVersion>53.0</asOfVersion>
        </listMetadata>
    </env:Body>
</env:Envelope>