how to create a option for renew option in library management system?

0
how to create a option for renew option in library management system. suppose in library management system a member of the library wants to renew the book from library how to show that option in pages whether with the help of button or microflow...please help me in detail as i am a beginner in mendix
asked
1 answers
1

It fully depends on what you want your renew option to do exactly. Are there limits to how often someone can renew? How long can they renew? Should anything else happen when they renew?

 

For instance, a microflow could look something like this:

 

  • Retrieve the booking
  • See how many times it has already been renewed. If it is < 2, the user is allowed to renew again. If not, show a message to the user explaining why they can't renew again.
  • If renewing is allowed, change the "DueDate" to "addDays(DueDate, RenewalDuration)"
  • Commit the booking object
  • Show a message to the user indicating that their renewal was succesful
answered