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
Always ThinkinAlways Thinkin 

Is record locked while on Edit page?

Does a record get locked when you are in the edit page thus allowing your edits to be saved even if another user (including API user) edits and saves the record at the same time? And does inline editing also grant that or not?

 

Marketo Suppport is claiming that if we only use the inline edit, we will not receive the error "The record you were editing was modified by Marketo during your edit session" but I'm very skeptical of that claim. 

jhurstjhurst

Luke,

 

The record is not locked while you are on the edit page.  The record becomes locked when you submit the save.  The error you indicate below will only happen if multiple users edit the same record in the UI.  The error you are describing is due to a security feature called "Collision Detection". This feature is designed to prevent the overwriting of data unintentionally through the UI. For example: 

1. User A edits Lead record Y 
2. While User A is editing the record, User B edits the record also 
3. User B saves the changes to Lead record Y 
4. User A saves changes to Lead Record Y 

When step 4 happens, all the changes that were made in step 3 would be over-written. User A would have no idea that they had over-written the changes made by User B. 

Collision Detection, though, will throw the error belowon step 4, so that the edits made by user B are not silently overwritten

 

 

 

If the Marketo user only uses the API, then you should not see the error.

 

Hope this helps.

Jay

TrimbleAgTrimbleAg

Hmmm... I was merging contacts today and I received the same error that my Marketo User modified the record. The user is only used for that API. As we know the merge just takes a split second to do this.

 

So are you saying that should not have happened?

 

PB

jhurstjhurst

I did a little more digging, and it looks like I was incorrect about the collision detection only being with the UI.  The error will only be dispalyed in the UI (you will not see that error on an API call), but it can be enacted by an API edit to the record you are trying to save.

 

Essentially, the Marketo application edited one of the records that you were merging while you were performing the merge.  You get the error so that you do not unknowingly overwrite the changes made by the marketo user.

 

Hope tghis helps

Jay

Always ThinkinAlways Thinkin

Hi Jay,

Thanks for putting thought into this. Why do you think that Marketo would advocate using one method of editing over the other? It seems to me that either method of editing (inline or edit page) would lock the record for similiar durations since you can change as many fields by either method before executing the save. And, by the same token, either method of editing is as likely to overlap with a conflicting edit from either the API or another user. I suppose if you inline-edit one field at a time and save, you'll be less likely to conflict with other changes.

jhurstjhurst

So I believe the code tags the time for when you start the edit process.  So if I click on the edit button on an individual record at 12:00pm, I get all of the field values for the record at that time.  The record itself is not locked (others can make edits if they wish) but the system knows that I am looking at a 12:00pm version of the record.  If any changes are committed to the record before I click save, the DB has a timestamp of when the record was changed.  When I then try and click save, the system check my timestamp(12:00pm) with the most recent save timestamp.  If my time is later, the save goes through (ie - no-one saved while I was editing).  If the last modified is later, I will get teh error.

 

My guess is that if you are dong an inline edit on a single record, there is no difference (when you double click a field it sets the edit timestamp).  However, if you were to do an edit froma list view, it would likely have to set the timestamp on any of teh records you edit (essentially making the edit session last longer and teh liklihood of a collision greater).


So I would think that inline edits from lists views would be what marketo would discourage, and single record inline or full edits should be roughly the same.