• Rajneesh Sehgal
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
I have created user using rest api, by making a POST call to the below Url.
https://na24.salesforce.com/services/data/v20.0/sobjects/user

For the newly created users through Api, Welcome email (password confirmation) is not getting triggered.
In SF ui there is an option called "Generate new password and notify user immediately", to notify about the new account has created.
How to achieve the same through Rest Api ?

If i create any user through Salesforce UI, a mail will be sent to the new users mail id, but the same is not working when i create the user through rest Api.

below is the Json parameters passing to create a user.

{"Username": "testemailname1@gmail.com","LastName": "Anand","FirstName": "Preetham","Email": "testemailname1@gmail.com","Alias": "Preetham","CommunityNickname": "testcommnme","IsActive": "true","TimeZoneSidKey": "America/Los_Angeles","LocaleSidKey": "en_US","EmailEncodingKey": "ISO-8859-1","ProfileId": "00a1e000000********S","LanguageLocaleKey": "en_US","UserPermissionsMobileUser": "false","UserPreferencesDisableAutoSubForFeeds": "false","CompanyName": "","Division": "","Department": "TR-App","Title": "SSE","Street": "","City": "","State": "","PostalCode": "","Country": "","Phone": "","Fax": "","MobilePhone": "","UserRoleId": "","ReceivesInfoEmails": "","ReceivesAdminInfoEmails": "","EmployeeNumber": "","DelegatedApproverId": "","ManagerId": "","UserPermissionsMarketingUser": "false","UserPermissionsOfflineUser": "false","UserPermissionsCallCenterAutoLogin": "false","UserPermissionsSFContentUser": "","UserPermissionsKnowledgeUser": "","UserPermissionsInteractionUser": "","UserPermissionsSupportUser": "","ForecastEnabled": "","UserPreferencesActivityRemindersPopup": "","UserPreferencesEventRemindersCheckboxDefault": "","UserPreferencesTaskRemindersCheckboxDefault": "","UserPreferencesReminderSoundOff": "","UserPreferencesApexPagesDeveloperMode": "","UserPreferencesHideCSNGetChatterMobileTask": "","UserPreferencesHideCSNDesktopTask": "","UserPreferencesOptOutOfTouch": "","ContactId": "","CallCenterId": "","Extension": "","FederationIdentifier": "","AboutMe": "","CurrentStatus": ""} 

Please suggest me how to send the email once the user is created through Rest Api.

Note :  i have tried the "Email Administration > Deliverability > Access level" is set to "All Emails".

Thanks in advance,
Preetham
 
Hi All,
I want to get the Authorization code through programming.
I am able to get the Authorization code by invoking the below URL manually,
https://login.salesforce.com/services/oauth2/authorize?response_type=code&client_id={My Client ID}&redirect_uri=http://localhost

By  invoking the URL, it will get redirected to the login page. 
and user has to provide the credentials then it is redirecting to Redirect_Uri and providing the CODE as part of the final redirected URL.

To achieve the same through grammatically, we need to automate the above steps,

Could you please let us know is there any other Api which gives us the Authorization code, 
without involving the user action to provide the user name and password 

As we have Admin credentials, we would like to use the same credentials all the time to generate Access Token behind the screen. 
No Login screen should be expected in between the process.
I have created user using rest api, by making a POST call to the below Url.
https://na24.salesforce.com/services/data/v20.0/sobjects/user

For the newly created users through Api, Welcome email (password confirmation) is not getting triggered.
In SF ui there is an option called "Generate new password and notify user immediately", to notify about the new account has created.
How to achieve the same through Rest Api ?

If i create any user through Salesforce UI, a mail will be sent to the new users mail id, but the same is not working when i create the user through rest Api.

below is the Json parameters passing to create a user.

{"Username": "testemailname1@gmail.com","LastName": "Anand","FirstName": "Preetham","Email": "testemailname1@gmail.com","Alias": "Preetham","CommunityNickname": "testcommnme","IsActive": "true","TimeZoneSidKey": "America/Los_Angeles","LocaleSidKey": "en_US","EmailEncodingKey": "ISO-8859-1","ProfileId": "00a1e000000********S","LanguageLocaleKey": "en_US","UserPermissionsMobileUser": "false","UserPreferencesDisableAutoSubForFeeds": "false","CompanyName": "","Division": "","Department": "TR-App","Title": "SSE","Street": "","City": "","State": "","PostalCode": "","Country": "","Phone": "","Fax": "","MobilePhone": "","UserRoleId": "","ReceivesInfoEmails": "","ReceivesAdminInfoEmails": "","EmployeeNumber": "","DelegatedApproverId": "","ManagerId": "","UserPermissionsMarketingUser": "false","UserPermissionsOfflineUser": "false","UserPermissionsCallCenterAutoLogin": "false","UserPermissionsSFContentUser": "","UserPermissionsKnowledgeUser": "","UserPermissionsInteractionUser": "","UserPermissionsSupportUser": "","ForecastEnabled": "","UserPreferencesActivityRemindersPopup": "","UserPreferencesEventRemindersCheckboxDefault": "","UserPreferencesTaskRemindersCheckboxDefault": "","UserPreferencesReminderSoundOff": "","UserPreferencesApexPagesDeveloperMode": "","UserPreferencesHideCSNGetChatterMobileTask": "","UserPreferencesHideCSNDesktopTask": "","UserPreferencesOptOutOfTouch": "","ContactId": "","CallCenterId": "","Extension": "","FederationIdentifier": "","AboutMe": "","CurrentStatus": ""} 

Please suggest me how to send the email once the user is created through Rest Api.

Note :  i have tried the "Email Administration > Deliverability > Access level" is set to "All Emails".

Thanks in advance,
Preetham