Business Rules question...


Author
Message
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
When creating business rules is there a way to specify that certain rules will only be enforced if the record in question is a new one and not just editing an existing one?



For example I want to do a check to make sure that the PO number isnt already in the system.. but that would only apply to adding new purchase orders and not editing existing ones.
Replies
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944

Where do I do that at? In the BO or in the form?

I tried to add that code to CheckRulesOnCurrentRow in the BO and it didnt work.


Steve L. Taylor
Steve L. Taylor
StrataFrame Developer (102 reputation)
Group: StrataFrame Developers
Posts: 40, Visits: 91
Mike,

Yes place the following code in the BO and it should work.

 If Me.CurrentRow.RowState = DataRowState.Added Then
     '-- do your thing 
 End If  

Steve

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