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
Vladimir BessonovVladimir Bessonov 

how to structure data for booking object

Hello.
can somebody advise how to structure data for booking?

For example, I want to use salesforce as a backend for storing data about the object - we have an office with tables and office space is limited, so all employees when they want to come to the office, first have to reserve a table ( select the date and time they want to reserve a particular table for themselves or others)

how to do it in salesforce? 

I will use iOS SDK as the client, maybe later I will add visualforce component for web-version.

Please advise. 
 
ANUTEJANUTEJ (Salesforce Developers) 
Hi Valdimir,

You can have a lightning component that can have two lookup fields one for the office and one for the tables along with them you can have two date-time fields that can have a start and end value before saving the record to the booking object assuming this custom lightning component is creating a record for the booking object you can have validations on the controller so that you check before creating a record.

In case if this comes in handy please choose this as the best answer so that it can be used by others in the future.

Please do keep in mind of the governer limits while implementing the use case.

Regards,
Anutej
Vladimir BessonovVladimir Bessonov
Do you have link to example project? It would be helpfull. I would rather copy paste than invening the wheel. 
ANUTEJANUTEJ (Salesforce Developers) 
Sorry, Valdimir I was not able to find any such implementation I think you will have to create one as per your requirement.