Is there a way to conditionally add a permission t...
# sdf
b
Is there a way to conditionally add a permission to a role via SDF? I'm developing a SDF project that may target OneWorld and Non-OneWorld accounts. So how do I (conditionally) add a permission to list subsidiaries to the role in the SDF project? If I just try and add the permission, it fails with
Copy code
To install this SuiteCloud project, the SUBSIDIARIES feature must be enabled in the account.
Role xml:
Copy code
<role scriptid="customrole_example">
    <name>Example Role</name>
    <permissions>
        <permission>
            <permkey>LIST_SUBSIDIARY</permkey>
            <permlevel>VIEW</permlevel>
        </permission>
    </permissions>
</role>
Ideally, can make the permission optional