How to create a Salesforce record from AppSheet

Hi everyone,

I’m looking into integrating with Salseforce.

What I want to do is to create a Salesforce record from AppSheet. I haven’t found a way to achieve this so far, but if anyone knows how to handle this, please let me know.

Here’s what I’ve tested
When Salesforce is specified as the data source, the Row ID is specified as the key item.
When I specify Salesforce as the data source, the Row ID is specified as the key item. This indicates the SalesforceID, and I understand it so far.

However, my understanding is that the SalesforceID is issued when a record is saved on Salesforce.
However, since it is a key and required field in AppSheet, the SalesforceID is required when creating a new record.

So I’m wondering if it’s possible to create a record manually from the AppSheet.

I hope someone knows how to create a Salesforce record and can help me out.

Solved Solved
2 8 808
1 ACCEPTED SOLUTION

Why not just populate the Row ID with UNQIUEID()? This way there’s a value - does salesforce throw an error?

FYI: you might get somewhere faster by reaching out to support@appsheet.com - since no one else seems to be chiming in here with any experience using a Salesforce data source. (Which I have none of)

View solution in original post

8 REPLIES 8

You’ve checked this documentation out right?

Hi @MultiTech_Visions

Thanks for the reference link.
Yes, I have checked that document.

I’m afraid I provided too little information.
The current status is as follows

Possible operations
Updating a record
Delete a record

Impossible operations
Creating a record

Since what I want to achieve is a very basic operation of creating a record, it is possible that I am missing some setting.
In that case, I apologize.

From my Salesforce development experience, I believe that Row ID is not necessary when creating a Salesforce record.

However, since Row ID is required in AppSheet, I’m not able to send POST request from standard screen.

Again, this is a very basic operation, so I’m wondering if there is a better solution…

Why not just populate the Row ID with UNQIUEID()? This way there’s a value - does salesforce throw an error?

FYI: you might get somewhere faster by reaching out to support@appsheet.com - since no one else seems to be chiming in here with any experience using a Salesforce data source. (Which I have none of)

@MultiTech_Visions

Using UNQIUEID(), I was able to create the record!
It was my failure to do some basic validation.‍♂

I hope this will be a knowledge to the community, so I’ll excuse myself a bit, but I’ll share the background that led to this post

Salesforce gives an 18 digit SalesforceID for every record.

https://help.salesforce.com/articleView?id=000324087&type=1&mode=1

This SalesforceID format is different from AppSheet’s UNIQUEID format, so in my mind, UNIQUEID is meaningless.

This time, I was able to confirm that I could get the 18-digit SalesforceID in the end even with AppSheet UNIQUEID.
It was a good experience for me to know that the behavior of Expression changes depending on the data source.

Thanks

Hello! I realize this was posted over a year ago...but if you can recall, could you please clarify what you did to solve this problem? Were you able to just use the UNIQUEID() function to create the ROW ID and it didn't give you any issues syncing back into Salesforce? If UNIQUEID() doesn't create the ROW ID with the same 18 charaters, is that not an issue?

 

Thank you!

Hi Takuya,

Thanks for sharing all of your tests here! I am similarly trying to create records from appsheet. I’m not the most technically literate - so records like yours are very useful. I would greatly appreciate your insight on our specific use case.

Our team works in humanitarian zones. When offline, they log data into APPSHEET. This data is then uploaded to Salesforce for nonprofits once they reach an internet connection. We regularly see user profiles duplicated. We would like to prevent duplicates. However, rather than merging two user profiles into one (potentially erasing unique data created at an earlier date), we would like all user data to be included in a ‘log’.

To further explain this, please use this example of ideal usage:
Humanitarian Workers are in Haiti. They meet with a user, Jane. They log Jane’s name, height and weight into appsheet. Once the humanitarian worker reaches an internet connection, this data is manually pulled through a .csv into salesforce.

The next month, the humanitarian workers return to Haiti. They log Jane’s name, height, and weight into appsheet. Jane has gained significant weight. Once the humanitarian worker reaches an internet connection, this data is manually pulled through a new .csv into salesforce. The salesforce database recognises that the new update on Jane should be connected to the previous upload on Jane. It shows the two logs together, noting the weight change.

Do you know how to handle multiple uploads from appsheet like this?

Hi @JoCahill

Thank you for your discussion.

Since this is a very useful use case, could you please create a separate topic and notify us with a Mention?
There is no need to modify the text, just create a new Topic.
Please write @Takuya_Miyai anywhere in the body of the message.

I’d be happy to answer your questions there.

Hi Takuya, thanks for saying this! I have posted this as a new topic and tagged you. You can find that here: Salesforce x Appsheet duplications

Thanks,
Josephine

Top Labels in this Space