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.

2 Likes

You’ve checked this documentation out right?

2 Likes

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…:thinking:

2 Likes

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)

2 Likes

@MultiTech_Visions

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

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

2 Likes

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?

1 Like

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