Database Trigger message to WPDA
-
Hi Peter,
for my TEEST business case, I’m still “fighting” with the issue I mentioned in a previous topic of mine (sorry, but it’s crucial to the adoption of WPDA in my project).
— BUSINESS REQ. RECAP:
assume (sort of SMS demo) that you engage free-lance Teachers (Contract: 100$/h, 30h, 2yrs duration) multiple times via Agreements.
As an accountant, each time you create a new Agreement, you need to check that your contractA is valid (from/to dates) and residual capacity is greater than the new agreement requirement.
— MY TECH SOLUTION:
I can create a DB trigger to reduce capacity after_insert of a new Agreement and to check dates, but:
what if my last Agreement requirement is bigger than the residual Contract?
I should prevent to save the new Agreement and to notify the User, but – due to my short knowledge of WP/Php/JScripting… – I don’t know how to notify the WPDA User (Back End Agreements project page) of the “ERROR: unable to save due to Contract…”.
In other words, how to implement the same/similar way WPDA notify the users with “Data successfully saved…” or “Nothing to save”.Thanks in advance.
Marco
- The topic ‘Database Trigger message to WPDA’ is closed to new replies.