web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patching Records to Sa...
Power Apps
Unanswered

Patching Records to Salesforce

(0) ShareShare
ReportReport
Posted on by

Hi All!

I've had a lot of luck with patching records to SharePoint lists in Power Apps to update and store data, but I'm working with a Salesforce data set for the first time, and would love to know how to perform a similar Patch operation to a given Salesforce table.

SharePoint version:
NEW:           Patch(DataSource, Defaults(DataSource), {'Field Name': NewData});
UPDATE:      Patch(DataSource, First(Filter(DataSource,ID = Items.ID)),{'Field Name': NewData});

 

How can I do the same things for Salesforce tables? Thanks!
--Jon

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @jPruett ,

    Do you want to patch records back to your Salesforce Table using Patch function?

     

    Regarding the needs that you mentioned, I think the Patch function could achieve your needs. The Patch formula is similar to the formula that you mentioned.

     

    # Add new entry into your Salesforce table

    Patch(
     'Salesforce Table',
     Defaults('Salesforce Table'),
     {
     Column1: "xxxx",
     Column2: "xxxxx",
     ...
     }
    )

     

    # Update an existing record

    Patch(
     'Salesforce Table',
     LookUp('Salesforce Table', 'Primary Column' = "xxxxxx"), // find the record you want to update through Primary Key Column in your table
     {
     Column1: "xxxx",
     Column2: "xxxxx",
     ...
     }
    )

     

    Please try above solution, then check if the issue is solved.

     

    Regards,

  • Alia99 Profile Picture
    6 on at

    Hi @v-xida-msft  i tried the above solution but it gives an error "update source is either read only or has no primary key so patch function can't work". do you have any solutions for this scenario? 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard