2

Is there a way to implement field only updates for Salesforce? Even if fields could be updated concurrently through JavaScript/JavaScript remoting calls, would Salesforce still save the record using optimistic record locking or is that inherent in classic salesforce ui save button code only? I understand the old functionality in terms of Salesforce Optimistic Record Locking, but could new JavaScript functionality cancel or override Salesforce Optimistic Record Locking. If yes, what is the best way to accomplish it/ Should it be done?

Use case is this (there isn't really a use case present, I am just wondering about this question for my own personal edification, but here is my best shot): implement a system that updates a record via JavaScript such as Lightning with something other than aura/lightning JS such as Angular or any other JavaScript library. You can implement field level updates where it looks as if Salesforce Optimistic Record Locking is not being utilized because the fields will save independently. In fact the code is only saving one field at a time and perhaps not locking the record specifically.

Does the Salesforce Platform automatically implement Salesforce Optimistic Record Locking in this case?

Concern is that Salesforce Optimistic Record Locking is not working in this use case or record locking should work in this use case. Looking for a best practice/what is implemented and unable to be changed on the Salesforce platform.

  • 1
    Can you give some detail on your use case, and what your concerns are about record locking? – Jeremy Nottingham May 16 '16 at 17:14
  • 1
    Optimistic locking is "feature" of Salesforce database record handling, not one of how our code passes the request to the database to perform the record update. – crmprogdev May 16 '16 at 17:47
  • I was thinking that it was, but can't find the documentation that says such. – amanda fouts May 16 '16 at 18:13
  • Would it be the same platform/info as database.com? – amanda fouts May 16 '16 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.