function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kunal Purohit 4Kunal Purohit 4 

How to perform record updation in salesforce?

Hello Team,
My requirement is that whenever record is created/edited in external application,it should get displayed in salesforce...How to perform this task? Please suggest..
AnudeepAnudeep (Salesforce Developers) 
You can do this with Streaming API 

When external database changes, you want the same data to be synced in Salesforce. So it should be the external system which should update salesforce about it/notify about it.

You cant use streaming API, because streaming API is for broadcasting changes of SF data change to external system and not vice versa.

You have 2 Options:

1. Poll external system periodically to get changed data

2. Or create a Listener in external system to send SF a platform event or call any salesforce rest endpoint about the changed data.
You can read more about the integration patterns here
SwethaSwetha (Salesforce Developers) 
HI Kunal,
External object should help in this case. 
See https://trailhead.salesforce.com/content/learn/projects/quickstart-lightning-connect/quickstart-lightning-connect2

External objects are similar to custom objects, but external object record data is stored outside your Salesforce organization. Instead of copying the data into your org, you can use external objects to access the data in real time via web service callouts.

Related:https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_external_objects.htm

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
RituSharmaRituSharma
I would suggest following options:
Option 1 -> Middleware as it will handle errors, logging and retry mechanism.
Option 2 -> External System can consume SF standard rest API to push the data. But in this case, external system will need to handle errors, logging and retry mechanism. 
Option 3 -> External System can consume custom SF rest/SOAP API to push the data. You will need to work with external system team to decide upon error handling, logging and retry mechanism. 
Option 4 -> Pool external system and create record in SF. You will need to handle errors, logging and retry mechanism.

Approach will depened upon availability of middleware, organization strategy and various other factorys. Option 1 is the best option.