Hi all,
I am trying to understand the difference between :
- Applying a security Policy using RoleProperty as contexttype then entering a contextstring in the roles to apply the Policy on the desired roles
- Applying a security Policy using Contexstring as contexttype then entering a contextstring in the roles to apply the Policy on the desired roles
I've read the doc and here's the description of both functionalities, that still does'nt help me to understand the difference, if someone can explain it with an example it would be great.
ContextString – Set the property to this value if a global context is to be used to determine whether the policy should be applied. When required, this context string needs to be set by the application using the XDS::SetContext API.
RoleProperty – Set the property to this value if the policy is to be applied only if the user is a member of any one of a set of roles that have the ContextString property set to the same value (see Setting the policy context later in this article for details for more details).
Thanks to the answerer.
*This post is locked for comments
Hi smallrider,
Can you repeat your requirement in more functional words? I have done some XDS related to InventDim before, but indeed it is challenging. Not everything is possible. If you add the details, I will think about it.
Hi André,
thank you for your answer,
I had another contextstring applied with Roleproperty that made my testings all wrong !
I did not enabled contextstring option using X++ and furthermore it was not filtering anything.
That made me think the contextstring option could allow me to filter tables such as purchreqline and purchtable on fields they do not include using table relations WITHOUT filtering InventDim and InventSite ...
Which seems impossible ...
If you ever had this case I am really interested in having the solution btw.
Thank you being patient and answering me many times ...
Apologies,
Best regards,
As mentioned before, the contextstring option needs to be enabled/disabled using x++ logic. Where in the system did you implement this?
Hi André,
Thank you for answering,
I've tested carefully and to making it simple :
- with contexttype RoleProperty it filters much more data than wanted (it filters the relation table I use to filters the table wanted)
- with contexttype contextstring it DOES NOT filter the tables I wish (however I don't understand the difference between these two functionalities)
BR
Hi,
I cannot understand clearly what you have done and where you have applied what context strings, what role or roles are involved or not. Maybe you need to elaborate.
The only risk, consequence would be that there is too less or too much data filtered. You should test carefully like any other customization before applying changes to your production environment.
In the past years I have not found a good document related to the property contexttype.
HELP Please
Anyone ?
Hi,
Thank you very much for answering,
I am going to try to give more details about what I am trying to do, the testing I've performed and my interrogations.
- The goal is to filter 2 tables (PurchTable, PurchReqLine) on fields that they don't have (Site) using policies via table relations (with InventDim and InventSite) and constrained tables WITHOUT FILTERING InventDim and InventSite.
- The set up is done as described below :
- Query on InventDimSiteID_Site1 (then Site2 and so on)
- Primary Table = InventDim
- Policy InventDimSiteID_Site1
ConstrainedTable = Yes
Table = PurchReqLine
Table Relation = InventDim
- Query on InventSiteSiteID_Site1 (then Site2 and so on)
- Primary Table = InventSite
- Policy InventDimSiteID_Site1
ConstrainedTable = Yes
Table = PurchTable
Table Relation = InventSite
- To apply these 2 Policies on the Role I created the contextstring :
- PurchReqLineAndPurchTableFilter
Now when I apply these Policies using :
- ContextType = RoleProperty then the contextstring above
-> THE FILTER APPLY ALSO TO PRIMARY TABLES
- ContextType = Contextstring then the contextstring above
-> THE FILTER DOES NOT WORK
Thank you for reading and for your answer (I am also interested in any document that provides information about ContextType = ContextString
Best Regards,
Hi,
The ContextString is intended to be used in x++ code to enable/disable policies.
The RoleProperty is defined as context string on the roles. You can then link multiple roles to one or more policies with a certain context string.
The RoleName is used to have a policy enabled for just one particular form.
Nobody can help ?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156