Override Security Business Object Primary Key Values


Author
Message
Aaron Young
Aaron Young
StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Hi,

I have hit a problem with SQL replication and the Identity primary keys on the security BOs. Is there a way of trapping when a new security record is added and replacing the primary key value in program code. Ideally, I would like to avoid doing this through a SQL default column value and handle it entirely within the application.

Thanks in advance.

Aaron
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yes.  You can set the BO properties as such:

PrimaryKeyIsAutoIncremented = False
PrimaryKeyIsUpdatable = True

If you are using the DDT, you will need to check "Primary Key Is Updatable" flag for that field so that the stored sprocs for the CRUD are created correctly.
Aaron Young
Aaron Young
StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Thanks Trent.

If I use the built-in StrataFrame.Security.SecurityDialog, is there a way of intercepting new records (i.e. a permission is assigned to a role) so that I can replace the primary key?


Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well....not really on the client side.  You could add a trigger on the SQL table to stuff the new PK into a temp table that you then turn around and query to pull from....but that may be more energy than you are wanting to get into.
Isabella Miller
Isabella Miller
StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)
Group: Forum Members
Posts: 1, Visits: 2

How can we adda trigger on the SQL table?



att coupon code
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