Block deletion of records that have been created other than the current user

Hi,
We might come across a requirement, where multiple users use a form and when an user deletes all the records from the form, the records corresponding to the current user should get deleted.
since the other user might in the middle of something, so that he doesn’t have any conflict with the data.
In this scenario, just create a new field of GUID datatype. in the table.
declare a variable for GUID.. IN THE CLASS Declaration.
Guid transId;
and write the code in init() method as,
transid = newguid();
the transid generated will be different for differnet users.
so if the current user inserts the records into the table along with the transid field.
when user tries to delete all the records we might keep a restriction to delete the records that are created by him based on the transid.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s