• Maximiliano Valin
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

Hi, we are creating a little app that app is connected using a an app user, but now we need to create a case comment but on behalf of another user, a real user not the user that the app is connected, we are using python simple_salesforce api.

Our code to create a case comment is, ParentId is the Case Id:

sf = simple_salesforce.Salesforce(
     username='userapp@domain.com',
     password='SecretPassword',
     security_token='SecretToken')
case_comment = {'ParentId': 'xxxxxx', 'IsPublished': False, 'CommentBody': 'Comment to delete'}
sf.CaseComment.create(case_comment)

But this code set the case comment CreatedBy field as the userapp, we need to set that field as another user, a Team Lead User, is there any way to modify that or use another function to set this field as a different user.

Regards
Maximiliano

Hello, I'm using the python module simple_salesforce to do some queries against Salesforce. Now I want to move forward doing some updates.

I'd like to do an automation process for taking ownership of a case, I tried to take ownership of a case, but when I did by using this piece of code:
sf = simple_salesforce.Salesforce(
    username='username',
    password='password',
    security_token='token',
    domain='test')
sf.Case.update('CASE_ID', {'OwnerId': 'USER_ID'})

In some way, it worked because the information in the case for Case Team, Department, Manager, Team Lead were changed to the ones belonging to the user, but the field for Case Owner was set for a different information, but not the user that I have set, the only that I figure out, is that the case was previously assigned to a queue not a user, and maybe I have to set another field also, because the Case Onwer changed to another queue, not the user that I want.

Please if anyone has some information that could help me please let me know.

Regards
Maximiliano
Hello, I'm using the python module simple_salesforce to do some queries against Salesforce. Now I want to move forward doing some updates.

I'd like to do an automation process for taking ownership of a case, I tried to take ownership of a case, but when I did by using this piece of code:
sf = simple_salesforce.Salesforce(
    username='username',
    password='password',
    security_token='token',
    domain='test')
sf.Case.update('CASE_ID', {'OwnerId': 'USER_ID'})

In some way, it worked because the information in the case for Case Team, Department, Manager, Team Lead were changed to the ones belonging to the user, but the field for Case Owner was set for a different information, but not the user that I have set, the only that I figure out, is that the case was previously assigned to a queue not a user, and maybe I have to set another field also, because the Case Onwer changed to another queue, not the user that I want.

Please if anyone has some information that could help me please let me know.

Regards
Maximiliano