• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Should I pass the record No. to GUI client?

 
long lingyu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my project, when user book a contractor, should I find the record according to all the fields or the recNo in database for updating ?
I can use the findByCriteria function.
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Long,
Originally posted by long lingyu:
In my project, when user book a contractor, should I find the record according to all the fields or the recNo in database for updating ?
I can use the findByCriteria function.

It depends on other design factors. For example if you are using locking from client side, there is no need to find the record with all the fields. You can just send the record number and book the record. On the other hand, if you are not using client side locking, then it is better to send the record along with the record number, find the record, see if the record has'nt modified meanwhile and if not book it. If modified, you can throw an exception if you want...again it depends on your design.
Hope it helps.
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Satish.
I used server side locking and passed my whole record, including record number, to client side. I then also passed record back to server when booking so that a check could be made whether it has been modified by somebody else.
J
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic