You need to sign in to do that
Don't have an account?
Ikram Momin 16
Hi All,
We are writing client application. We need all the information of DelegateGroups present on the salesforce. We are using DelegateGroup API of metadata (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_delegategroup.htm) . When we query listMetadata for DelegateGroup it returns the result but it doesn't return all field information such as "customObjects", "groups", "loginAccess", "permissionSets", "profiles", "roles" etc
here is our request
Here is response
Can you help us here to get other attributes of mentioned above for DelegateGroup?
Also we want to whether is it possible to add DelgateGroup to User using any API? If yes, can you please share the details ?
DelegateGroup API not returning all field (Attributes)
Hi All,
We are writing client application. We need all the information of DelegateGroups present on the salesforce. We are using DelegateGroup API of metadata (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_delegategroup.htm) . When we query listMetadata for DelegateGroup it returns the result but it doesn't return all field information such as "customObjects", "groups", "loginAccess", "permissionSets", "profiles", "roles" etc
here is our request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:met="http://soap.sforce.com/2006/04/metadata"> <soapenv:Header> <met:CallOptions> <met:client>54.0</met:client> </met:CallOptions> <met:SessionHeader> <met:sessionId>abcd</met:sessionId> </met:SessionHeader> </soapenv:Header> <soapenv:Body> <met:listMetadata> <!--Zero or more repetitions:--> <met:queries> <!--Optional:--> <met:type>DelegateGroup</met:type> </met:queries> <met:asOfVersion>54.0</met:asOfVersion> </met:listMetadata> </soapenv:Body> </soapenv:Envelope>
Here is response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://soap.sforce.com/2006/04/metadata"> <soapenv:Body> <listMetadataResponse> <result> <createdById>xyz</createdById> <createdByName>XYZ</createdByName> <createdDate>2022-09-19T12:18:15.000Z</createdDate> <fileName>delegateGroups/Test_Delegate_Admin_Group.delegateGroup</fileName> <fullName>Test_Delegate_Admin_Group</fullName> <id>02f3k000000TNdWAAW</id> <lastModifiedById>xyz</lastModifiedById> <lastModifiedByName>XYZ</lastModifiedByName> <lastModifiedDate>2022-09-19T12:33:46.000Z</lastModifiedDate> <type>DelegateGroup</type> </result> <result> <createdById>xyz</createdById> <createdByName>XYZ/createdByName> <createdDate>2022-07-20T12:02:19.000Z</createdDate> <fileName>delegateGroups/D1.delegateGroup</fileName> <fullName>D1</fullName> <id>02f3k000000GnQUAA0</id> <lastModifiedById>xyz</lastModifiedById> <lastModifiedByName>XYZ</lastModifiedByName> <lastModifiedDate>2022-09-19T12:12:27.000Z</lastModifiedDate> <type>DelegateGroup</type> </result> </listMetadataResponse> </soapenv:Body> </soapenv:Envelope>
Can you help us here to get other attributes of mentioned above for DelegateGroup?
Also we want to whether is it possible to add DelgateGroup to User using any API? If yes, can you please share the details ?
As per the below SSE question unfortunately there is no way we can do this using API. We have to do it manually only I guess.
https://salesforce.stackexchange.com/questions/248421/how-do-i-assign-delegated-administration-via-dml-or-query-it-via-soql#:~:text=you%20cannot%20add%2Fdelete%20delegated%20admin%20programmatically.&text=it%20mean%20delegated%20admin%20is,not%20support%20it%20(yet). (https://salesforce.stackexchange.com/questions/248421/how-do-i-assign-delegated-administration-via-dml-or-query-it-via-soql#:~:text=you%20cannot%20add%2Fdelete%20delegated%20admin%20programmatically.&text=it%20mean%20delegated%20admin%20is,not%20support%20it%20(yet).)
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,