gunnertech / jire2

John's Island Real Estate app, version 2
1 stars 0 forks source link

PB synching - multiple users in same record #266

Open johnsisland opened 7 years ago

johnsisland commented 7 years ago

Maybe you can help us understand if there is an issue here?

Alice was in PB on the 80 Tortoise Way listing record making updates (I didn't know): https://na16.salesforce.com/a09j00000098BeS?srPos=0&srKp=a09

Apparently, when I was updating the Refinery/Website record (price, description field and added a floor plan), and Alice was trying to save the changes she made to the PB record, PB generated an error message saying I was in the record and it suddenly erased all of her changes. She had spent 10 minutes entering all this info into the record and tried to save, but I think the website was synching my changes and it kicked her out.
http://www.johnsislandrealestate.com/refinery/listings/80-tortoise-way

Alice confirmed that in the past, that when another PB user is in the same record and you try to save it, it will notify you that there is another person on the record. You can usually wait a bit and then try saving again and it works. It won't lose all of your entered data. Unfortunately, the website synching made her lose all of her data entry.

How will I know in the future if I'm updating our website that I'm not blocking/knocking someone else that's in that PB record off-line and they lose their work? Can anything be done?

CodySwannGT commented 7 years ago

@johnsisland

So, I'm going to conclude that there is no way for the API to know if a record is currently being edited.

This is based on several hours of research into the API - I was hoping, I could query a record and see if the status was set to "checkouted" or "editing" or whatever, but there is no status for records.

I think looked into whether I could get a User object and see what documents that user was editing, but that also is not possible.

I can see when the last time a user logged in was, but that's about it.

Based on that, I would recommend that, when Refinery saves a record, we don't sync it immediately.

Instead, we sync until midnight when we're sure no one else will be editing the object in PB.

That's obviously nowhere near ideal, but I can't think of another solution that will prevent that from happening.

johnsisland commented 7 years ago

After our phone call, we have come the conclusion that I need to press Salesforce and see if there is an option to have them help develop something for us based on the following:

We need a property on the PROPERTY & LISTING objects automatically set to = TRUE when someone opens the record to edit it. (It won’t do anything other than give Cody something to look/check for so he can create an action for Refinery). Then when someone hits save, it automatically sets to = FALSE

CodySwannGT commented 7 years ago

Exactly

On Fri, Jan 6, 2017 at 3:47 PM, johnsisland notifications@github.com wrote:

After our phone call, we have come the conclusion that I need to press Salesforce and see if there is an option to have them help develop something for us based on the following:

We need a property on the PROPERTY & LISTING objects automatically set to = TRUE when someone opens the record to edit it. (It won’t do anything other than give Cody something to look/check for so he can create an action for Refinery). Then when someone hits save, it automatically sets to = FALSE

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/gunnertech/jire2/issues/266#issuecomment-271001921, or mute the thread https://github.com/notifications/unsubscribe-auth/AAR4O2wdvy3aoZTnOiO1qogso8sKcSc4ks5rPqhjgaJpZM4LMG12 .

-- Cody Swann - CEO, Gunner Technology T: 213.915.4083 | cody@gunnertech.com | www.gunnertech.com http://www.gunnertech.com/Skype: cody.swann

CONFIDENTIALITY NOTICE: This email message, together with any documents, files and/or email messages attached to it, is intended for the sole use of the individual or entity to whom it is addressed, and may contain information that is legally privileged, confidential and restricted from disclosure. If you are not the intended recipient, or responsible for delivery to that person, you are hereby notified that any dissemination or copying of this communication is STRICTLY PROHIBITED. In such case please notify the sender by reply email and delete this message without reading, printing or saving.

johnsisland commented 7 years ago

Will you help on my behalf take on this request to PB/PB team to help us resolve this important issue? We are committed to this database (for now) and if the only solution is a PB developer helping us, at what cost and time?

CodySwannGT commented 7 years ago

Per support response, waiting for next steps.

johnsisland commented 7 years ago

Per our call, I'll ask the team if they can live with the only viable solution thus far, which is to click a checkbox that locks the record from Refinery synching it, until they uncheck it.

The issue I see is that they will forget to uncheck the box when done, as we get interrupted repeatedly. Maybe you could automatically set it to release the record at the end of the day if it was left checked? Does any of this solution create a possible issue with how PB manages the record when another PB user is working in it?

CodySwannGT commented 7 years ago

I'm certain we've talked about this, but to answer your questions:

1) There is no automated trigger I can implement if the user forgets to uncheck it. 2) I don't believe so, no

johnsisland commented 7 years ago

Do you think the option you had mentioned above about asking PB to create a TRUE/FALSE scenario so you can identify a trigger in Refinery at night to make updates, is still viable?

CodySwannGT commented 7 years ago

@johnsisland So here's what we can do:

  1. Agent opens a Property or Listings in Property Base
  2. They have to remember to click a button that says something like "Lock Record"
  3. Make their updates
  4. They have to remember to click a button that says something like "Unlock Record"

Locking the Record won't really lock the record. It will only set a flag that tells the Refinery app not to sync data to PB.

If Refinery tries to sync to a PB object and sees that it is "locked", refinery will check again in an hour to make the changes.

Refinery has no idea HOW LONG a record will be locked, so I can't programmatically unlock something based on how long it has been locked.

What I CAN do is unlock all records at say 2 am each night.

johnsisland commented 7 years ago

They are in that program all day long, whereas I'm updating the website sporadically. This is a solution, but not the best workflow for them. I'll have to keep thinking of how to prevent this from happening as the months go along. It could become a bigger problem as we grow and more people use the database. I can't have every user lock it, unless we think of it as "if I have a lot of work to do on a PB record, I lock it". Let's keep thinking...