How do I determine the SF security project ID via code?


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I need to load the an instance of the SFSRolesBO with all the roles from the security project used by the application. While I can look at the table and figure out what the ID it, it would be much better to just reference the ID used by the security system. How do I do that?

StrataFrame Team
S
StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You can call the FillAll() method on the SFSRolesBO object and pass it a project pk of 0.  At runtime, there are no project pks... the SFSProjects table does not exist in the runtime database, and the tables are assumed to have records from only one project.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Ah. That's important to note. I took a look at the script that can be used to create the security tables (download link from security help file) to try to wrap my head around this a bit better and I noticed that some tables that have the sproj_pk column (prefixed of course) have a default of 0 and some don't (SFSRoles, SFSPermissions and SFSRestrictions). Is the script wrong or are these columns updated otherwise?



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