BusinessRules or Trigger ?


Author
Message
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Other than the base methods for querying the database, SF does not provide any methods specific to RI support.  If you want to add a "Trigger" to a business object, you will be able to do that through the "Changed" events on the business object.  To add changed events to a business object, go to the BOMapper and configure the properties on a business object.  Make sure you can see the "Advanced Options" and select either single event for all properties or unique event for each property within the combo box for Changed Events.  Then, rebuild the partial class and you will be able to add triggers to the changed events of fields.
fookyean
fookyean
StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)
Group: Forum Members
Posts: 12, Visits: 49
As the triggers can manage the RI automatically but business rules is not, is the RI has to manage by code manually ? And check for the Candidate Key has to code manaully as well ? Is SF provide any support functions for this ?
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
You will want to use the events on the business object.  There are several events to look at: AfterAddnew, BeforeSave, BeforeDelete, and BeforeUndo.  There are more events than these can can help you accomplish the "trigger" type of behavior, but these will get you started.  You can capture these on the BO itself so you only have to code it once, or if you only want to do this on a single form, you can capture it there also.

Hope this helps. Smile

fookyean
fookyean
StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)
Group: Forum Members
Posts: 12, Visits: 49
I am pretty new in .Net and has a question about the update the field of parent table like when an invoice is issued, the onhand quantity of the product is updated. In VFP, the trigger (create, update, delete) is used to handling this. Since the BO is used in SF, where should I put the update procedure like this ? The trigger or BO ? The BO is better than trigger in providing the more informatic error message.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search