Greetings! I'm new to OutSystems, and I've learned that site properties cannot be accessed across different modules. I'm curious to know if, without relying on the Service Center, it's possible to programmatically change or access the value of a site property in a different module.
Hi Fahad,
Welcome to the OutSystems community.Yes, It is possible to access and change site property programmatically. Here is the steps:1) Create an server action in the module where site property exist and set the public property to yes.2) Consume that server action where you want.3) Pass the value as input parameter and assign that value to site property inside the server action.
I tried this one and work's fine.
Thank's for the help.
A word of caution
hi,
Please check below link for similar query and solution:
https://www.outsystems.com/forums/discussion/35415/can-i-access-one-module-site-property-from-another-module/
Hi @Muhammad Fahad,
You can create a wrapper server action to set Site properties and make the action public to be used it in another modules.
If we can do this in such a way, so what's the difference between session and site.
So, I believe that there is no need of either session variable or site property.
By creating a server function we can get the site property values. And can take the dependencies into the different modules. We can change the site properties but it's not recommended.
Thanks
Prince
If it's not recommended so why does the out-system provide this.
It never comes under the best practices. Suppose if someone got to know about the action and use it into the different module and change it. And whole system can be break.
I got the point. Thanks' for clearing my concepts.