• Ikram Momin 16
  • NEWBIE
  • 40 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 24
    Questions
  • 13
    Replies
Is there alternative in REST API for "triggerUserEmail" header which gets used in SOAP APIs ?
Using the Salesforce REST API, is there a way to create a user and also send out the activation email?

We are working on solution where we want to manage User, Groups(Public Groups, Roles etc), Query these Salesforce objects data.

Also we want to provision Users.
There are Entrprise SOAP APIs available in salesforce to manage User and Group objects.
We want to know are there similar REST APIs available? If yes, please share the documents.

Also which APIs are preffered to use REST or SOAP?

One of my customer is getting below error message while fetching accounts from the salesforce managed system. we prepare query from the java code and get Users from salesforce. url and serverl is passed from the configuration file.

value for the url and serverurl looks fine : 

url : https://test.salesforce.com/services/Soap/u/56.0

serverurl : 
https://test.testsforce.com/services/Soap/u/56.0/00D530000004f1r

UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>UNKNOWN_EXCEPTION</faultcode><faultstring>UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService</faultstring><detail><sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>UNKNOWN_EXCEPTION</sf:exceptionCode><sf:exceptionMessage>Destination URL not reset. The URL returned from login must be set in the SforceService</sf:exceptionMessage></sf:UnexpectedErrorFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

We can have Marketing as connected app while we have marketing cloud as seperate product.

What is difference between them

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 ?

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 ?
Are Name in PublicGroups Unique ? Any supporting link for this ?
Hi,
 
I am getting a Error 'sObject type Organization is not supported'. Is there any permistions needed to access this object. if yes, how to set those roles/permissions.
 
Thanks in Advance.
Hi,
I have a question regarding OAuth Scopes APIs associated with Connected Applications. I am unable to get URL for OAuth Scopes APIs anywhere on your website. Can you please help me with this.

Thanks
Hi 
I am using rest api for salesforce. Please help me find out REST API to fetch all connected apps in single REST call.
Thanks in advance

Hi

While firing query : 

SELECT Id, PackageLicenseId, UserId FROM UserPackageLicense

Getting exception : INVALID_TYPE : sObject type UserPackageLicense is not supported

any help would be appreciated

Hi ,
I am using below query to fetch managed packaged id assigned to user :

SELECT Id, PackageLicenseId, UserId FROM UserPackageLicense

Is there any query or sObject that will give me information related to cost(price in $) of mange package?

Any help will be appreciated..!

Hi

Can I add/remove multiple(two or more) managed packages in single soap UI request ?
current body of my add manage package soap ui request is :
<soapenv:Body>
  <urn:create>
    <urn:sObjects>
      <urn1:type>UserPackageLicense</urn1:type>               

        <urn1:PackageLicenseId xmlns="">My    PackageLicenseId</urn1:PackageLicenseId>     

    <urn1:UserId xmlns="">My UserId</urn1:UserId>   </urn:sObjects>
</urn:create>
</soapenv:Body>

does there is any way where this soap request can add multiple manages packages to single user?
i tried with adding two or more "<urn1:PackageLicenseId xmlns="">My PackageLicenseId</urn1:PackageLicenseId>"
with different PackageLicenseId but not able to add.
Basically I want to add multiple manage packages in single soap request

Hiii

I am using below query to fetch ManagedPackages assigned to users in org :
SELECT PackageLicenseId, UserId FROM UserPackageLicense

My users query is : 
SELECT Id, Username, LastName, FirstName FROM User

Is there any query to fetch ManagedPackages assigned to users in users query  ?

Hi

Is there a way to retrieve the Package name of the installed packages in an org ?

We are using below to retrieve the Package name of the installed packages in an org :
SELECT Id, NamespacePrefix FROM PackageLicense

'Package name' field is not there in PackageLicense sobject
However If checked on Salesforce.com >> Build >>Lighening Bolt >>Installed Packages >>Package Name
Here We see Package Name and want to get this Package name via soql

Is there any soql which will give us 'Package Name' ? 
When will i get below error response from salesfoce :
Changing User Type from High Volume Portal to New ICS Support Agents is not allowed. Select a different profile.

which update operation could give above error?
We are searching for usecase where salesforce returns multiple error object in result response.
below is ideal response we are searching for :
<updateResponse>
         <result>
            <errors>
               <fields>ProfileId</fields>
               <message>You can only assign profiles that are compatible with the user's license. For a list of compatible licenses and profiles, see the Salesforce Help.: Profile ID</message>
               <statusCode>FIELD_INTEGRITY_EXCEPTION</statusCode>
            </errors>
            <errors>
               <message>Changing User Type from High Volume Portal to New ICS Support Agents is not allowed. Select a different profile.</message>
               <statusCode>FIELD_INTEGRITY_EXCEPTION</statusCode>
            </errors>
            <id xsi:nil="true" />
            <success>false</success>
         </result>
      </updateResponse> 

can any one help us which provisioning will provide above single response ?      
I am trying to fetch PublicGroups having '(single quote) in its name using query : select Id from Group where (Name = 'AMER SDR's Group') AND Group.Type='Regular'
but query gets failed on soap ui as well as developer console with error :
from Group where (Name = 'AMER SDR's Group') AND Group.Type='Regular'
^ERROR at Row:1:Column:45
expecting a right parentheses, found 's'

Escaping ' with &apos; not worked 
Is there alternative in REST API for "triggerUserEmail" header which gets used in SOAP APIs ?

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 ?
Are Name in PublicGroups Unique ? Any supporting link for this ?
Hi,
I have a question regarding OAuth Scopes APIs associated with Connected Applications. I am unable to get URL for OAuth Scopes APIs anywhere on your website. Can you please help me with this.

Thanks

Hi

While firing query : 

SELECT Id, PackageLicenseId, UserId FROM UserPackageLicense

Getting exception : INVALID_TYPE : sObject type UserPackageLicense is not supported

any help would be appreciated

Hiii

I am using below query to fetch ManagedPackages assigned to users in org :
SELECT PackageLicenseId, UserId FROM UserPackageLicense

My users query is : 
SELECT Id, Username, LastName, FirstName FROM User

Is there any query to fetch ManagedPackages assigned to users in users query  ?

We are searching for usecase where salesforce returns multiple error object in result response.
below is ideal response we are searching for :
<updateResponse>
         <result>
            <errors>
               <fields>ProfileId</fields>
               <message>You can only assign profiles that are compatible with the user's license. For a list of compatible licenses and profiles, see the Salesforce Help.: Profile ID</message>
               <statusCode>FIELD_INTEGRITY_EXCEPTION</statusCode>
            </errors>
            <errors>
               <message>Changing User Type from High Volume Portal to New ICS Support Agents is not allowed. Select a different profile.</message>
               <statusCode>FIELD_INTEGRITY_EXCEPTION</statusCode>
            </errors>
            <id xsi:nil="true" />
            <success>false</success>
         </result>
      </updateResponse> 

can any one help us which provisioning will provide above single response ?      

I am using below query to fetch PermissionSet assigned to users in org :
SELECT Id, PermissionSetId, AssigneeId FROM PermissionSetAssignment

And to fetch PermissionSetLicense assigned to users in org :
SELECT Id, AssigneeId, PermissionSetLicenseId FROM PermissionSetLicenseAssign

Is there any query / innerjoin or other way to fetch both((PermissionSet & PermissionSetLicense)) in single query?

OR Can I fetch both(PermissionSet & PermissionSetLicense) while fetching users ?
my users query is : 
SELECT Id, Username, LastName, FirstName FROM User

I have two Salesforce tenant, one has thousands of recodrs and other one is having few users. I wants to migration users from tenant1 to tenant 2 (All users active and inactive as well). I have exported users from tenant1 in csv file when trying to import this CSV it is asking to do mapping for accounts and contacts, what is the relation of users, accounts and contacts as I can see different CSV files in exported data? How to import user.csv directly using import wizard?

Following ellaboration might help:
  1. I have exported users from org1 (user.csv) which contains thousands of records.
  2. Now I am trying to import these users in Org2. 
  3. On Org2, in Data Import wizard when I am trying to import this user.csv. I am geeting option to import accounts and contacts by default. Please refer attached image.Default view for Import wizard
  4. I tried with this default option available and imported user.csv. But I see see accounts getting created in org2 but not users. 
  5. Where can I get option to import user insated of accounts and contacts? Importing users should dsiplay all imported users under manage Users page.

I have two Salesforce tenant, one has thousands of recodrs and other one is having few users. I wants to migration users from tenant1 to tenant 2 (All users active and inactive as well). I have exported users from tenant1 in csv file when trying to import this CSV it is asking to do mapping for accounts and contacts, what is the relation of users, accounts and contacts as I can see different CSV files in exported data? How to import user.csv directly using import wizard?

Thanks in advance!!!