Locking SDF Custom Objects in the SuiteApp Type of SuiteCloud Project

In a SuiteCloud Development Framework (SDF), you can consider an installation preference to lock supported SDF custom object types in your SuiteCloud project when the project is of type SuiteApp. Locking SDF custom objects helps protect an object’s fields from being edited by your SuiteApp users.

Consider the following information when locking SDF custom objects:

Note:

Even when using only locking preferences without hiding preferences, your SuiteCloud project must include both the locking.xml and hiding.xml files for the project to successfully deploy to a target account.

To lock SDF custom objects in a SuiteCloud project of SuiteApp type

  1. Create a locking.xml file in the InstallationPreferences folder of your SuiteCloud project of SuiteApp type. To create the file using a SuiteCloud IDE, see Creating an Installation Preference File with SuiteCloud IDE Plug-in for WebStorm. If you already have a locking.xml file in your SuiteCloud project, proceed directly to the next step.

  2. In the locking.xml file in your SuiteCloud project, enter values for the following attributes and fields:

    • For the type attribute of the <preference> element, specify the installation preference type to be Locking. For more information about installation preferences, see Installation Preferences in the SuiteApp of SuiteCloud Project.

    • For the defaultAction attribute of the <preference> element, specify a default locking action for all SDF custom objects in your SuiteCloud project. Supported values for an action are LOCK and UNLOCK.

      Setting a value for the default action can reduce the steps when applying a preference to many objects at a time. The default action applies to SDF custom objects in your project that are not in the apply action list of your locking.xml file. In the included example, the installation locking preference for lockable SDF custom objects in the SuiteApp project is UNLOCK, so all SDF custom objects in the SuiteApp other than customlist_example1 are unlocked.

    • For the action attribute of the <apply> element, specify a value that will apply to the SDF custom objects. Valid values are LOCK and UNLOCK. For example, <apply action="LOCK"> locks the specified SDF custom object types.

    • For the <object> element, specify the script ID of the SDF custom object that is being locked. For example, <object>customlist_example1</object>. For additional SDF custom objects, you can add <object></object> elements as needed. For the list of lockable SDF custom object types, see Lockable SDF Custom Objects.

  3. Save your changes in the locking.xml file.

    When you later deploy the SuiteCloud project, to enable the values specified in the locking.xml file, you must select the Apply Installation Preferences box. For more information about selecting that preference during deployment, see Applying Installation Preferences During SuiteCloud Project Validation and Deployment.

Locking a Custom Object using SDF Example

The following XML sample is an example of locking preference in a locking.xml file in a SuiteCloud project of SuiteApp type. The example locks the customlist_example1 SDF custom object, sets the preference type to LOCKING, sets the default action to UNLOCK, sets the apply action to LOCK, and adds the object:

            <preference type="LOCKING" defaultAction="UNLOCK">

    <apply action="LOCK">

        <object>customlist_example1</object>

</apply></preference> 

          

Lockable SDF Custom Objects

The following table lists the SDF custom object types that you can lock in the SuiteApp type of SuiteCloud project. The effects of locking vary according to object type.

Object Type

Notes

customlist

  • Values cannot be added, edited, or deleted in locked custom lists in target accounts.

customrecordtype

  • ID of a locked custom record cannot be changed or deleted.

  • Original custom field IDs cannot be changed or deleted.

  • Custom fields cannot be added.

  • Custom record instances can be added and the ID can be changed or deleted.

  • ID of custom record instances that came with the SuiteApp cannot be changed or deleted.

  • Changing the ID of any custom record Instance is not allowed.

customsegment

  • To lock a custom segment object, you must apply the lock to the custom segment object along with its associated custom record type object.

Fields:

  • crmcustomfield

  • entitycustomfield

  • itemcustomfield

  • itemoptioncustomfield

  • itemnumbercustomfield

  • transactionbodycustomfield

  • transactioncolumncustomfield

  • workflow_othercustomfield

  • Target account administrators can control access to locked custom fields through form customization as before.

Forms:

  • addressform

  • entryform

  • transactionform

  • New instances can be created and customized

Plug-ins:

  • advancedrevrecplugin

  • advancedrevrecplugin

  • bankstatementparserplugin

  • consolidatedrateadjustorplugin

  • customglplugin

  • datasetbuilderplugin

  • emailcaptureplugin

  • ficonnectivityplugin

  • fiparserplugin

  • paymentgatewayplugin

  • shippingpartnersplugin

  • taxcalculationplugin

  • workbookbuilderplugin

  • Locked plug-ins can be configured

plugintype

plugintypeimpl

role

  • New instances can be created and customized

savedsearch

  • Users who have access to the saved search can create a new copy of the saved search and add or remove filters and results columns.

scripts:

  • bundleinstallationscript

  • clientscript

  • mapreducescript

  • massupdatescript

  • restlet

  • scheduledscript

  • suitelet

  • usereventscript

  • workflowactionscript

  • singlepageapp

  • IDs for original custom fields on the script cannot be deleted or changed.

  • New custom fields can be added and then changed or deleted.

  • Script deployments are not lockable and you can create new deployments or edit existing ones

  • For single page applications (SPAs):

    • You can apply installation preferences to SPAs.

    • SPAs support object locking, hiding, and locking of files.

SSP applications

  • The SSP application record is lockable.

Workflows

Workflow objects are partially editable.

  • The following basic Information fields from a locked workflow can be edited: Release Status, Keep Instance and History, Enable Logging, Inactive.

  • You may not edit the definition, instance fields, states, transitions, or actions of a locked workflow. Also, you may not add transitions or states.

translationcollection

When an SDF SuiteApp deployment locks a Translation Collection in the target account, subsequent deployments can still update that Translation Collection including its strings.

Related Topics

General Notices