I have recently started moving our existing IP into using subscriber events, but I have come across a number of challenges which I was hoping to get some advice on:
Exit Clauses with Functions on a Table:
Example: In certain circumstances I would like to stop the "UpdateDirectUnitCost" being triggered (Exited) when I have a parameter set on the Purchase & Payables Setup.
1) I cannot add the code to the subscriber event for the field as this would involve adding conditional code before function call within the field validation
2) I can utilise the OnBeforeModify, using Rec & XRec, but it seems massively clumsy/error-prone
3) I could add an Exit directly into the UpdateDirectUnitCost Function, but does this contravene best practice
Style Expressions On Page:
Example: In certain circumstance I would like to use the style expression to alert users to specific conditions
1) As far as I can see there is no way to work with Events to set the StyleExpression, as with the above I could leave the existing code but does this contravene best practice?
Thanks for the help in Advance
Tim
-1