cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Patching Records to Salesforce

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Patching Records to Salesforce

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Patching Records to Salesforce

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,837)