• Scott Kimminau
  • 0 Points
  • Member since 2016

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 1
We have a visualforce page that has an action that basically makes a callout (after the constructor gets the contact record) and updates the contact with an attachment that is an image of the contacts drivers license. The problem is, now that we are moving to lightning, when we try to do an inline edit on the record it causes a collision detection. In console and classic we don't get the issue because lightning first does a page refresh when an inline edit is invoked (triggering the action) while classic does not. Anyone know of a possible alternative to doing to visualforce action or some way to not get the collision detection error? 

<apex:page standardController="Contact" extensions="IdentificationImageController" action="{!loadrecord}" >    
      <apex:form >
           <apex:inputHidden value="{!c.External_ID__c}" id="theHiddenInput"/>

public without sharing class IdentificationImageController {
    public Contact c { get; private set; }

    public IdentificationImageController(ApexPages.StandardController controller) {

        if (!test.isRunningTest()) {
            controller.addFields(new String[]{
        this.c = (Contact) controller.getRecord();

    public void loadRecord() {

    public void loadDriverIdentity() {
        try {
            String dlName = c.External_ID__c + 'DL';
            String sigName = c.External_ID__c + 'SIG';

            .....make api callout and then update Contact info. 


We have a visualforce page in our salesforce org whose contoller class makes an API call and then display the result back on the page. This was placed on a record Detail page section in classic experince. It was working as expected. And we recently switched on Lightning Experience. The problem now is the visualforce page is working fine when the user clicks on command button in the page. It is getting the expected results. But it is gving an error when the user tries to update fields on the other sections after doing the API call(clicking the command button in the visualforce page).
This is the error:

This record was modified by USER during your edit session. Make a note of the data you entered, then reload the record and enter your updates again.

I am not sure what is causing this error.

Has anyone faced this issue?
It would be great if anyone can help.