• Aleksandra Czepierga
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 0
    Replies
Hi! I'm working with python Simple Salesforce on tasks creation. Can sb tell me what is the real difference between task and activity?
My goal is to create a TASK object but when I am using code below, I am getting new activities, not tasks... I have no idea why...

sf.Task.create({'WhatId':id,'Subject': subject , 'OwnerId': owner, 'Type': type, 'Description':description})

 
Hi! Is is possible to get account owner with simple salesforce?

What I am trying:
def get_owner(par):
    data = sf.query(format_soql("SELECT AccountId FROM Contact WHERE AccountId = {}", par))
    print(data)

But result of get_owner('0013c00001pb0BAAAY')  is

OrderedDict([('totalSize', 2), ('done', True), ('records', [OrderedDict([('attributes', OrderedDict([('type', 'Contact'), ('url', '/services/data/v42.0/sobjects/Contact/0033c00002UZTOWAA5')])), ('AccountId', '0013c00001pb0BAAAY')]), OrderedDict([('attributes', OrderedDict([('type', 'Contact'), ('url', '/services/data/v42.0/sobjects/Contact/0033c00002Uatx1AAB')])), ('AccountId', '0013c00001pb0BAAAY')])])])

How to get only id or name?!
Hi!
I wanted to use python imple salesforce to get data from google sheet and import it into salesforce. In more details, I want to create tasks with information included in this excel.
Simplifying sth like this:
#sf.Task.create({'WhatId': columnD, 'Subject': columnE })

I don't think i can bulk insert it so I'm thinking how to iterate it but I have issues with iterating through cells.  Have you ever tried to insert sth from gsheet, how?


I have connected to gsheet and pulled data to dataframe.
But what then?