Managing Custom Salesforce Objects
When you use custom objects with protected fields in Salesforce you need to register them within the InCountry Data Residency for Salesforce package, so that the regulated data will be correctly processed and written to the InCountry platform.
Management of custom objects is required for operation of the restriction, redaction, and UI-based replication models from the three-model package.
Creating the custom object Lightning page
-
From Setup, click User Interface, then select Lightning App Builder.
-
On the Lightning App Builder page, click New.
-
In the Create a new Lightning page form, select App Page.
-
Click Next.
-
Enter the label for the page and click Next.
-
Select the One Region as page layout and click Finish.
-
On the opened page with Layout Builder, on the sidebar, locate the
InCountry List View
component (within custom components). -
Drag this component to the layout.
-
For the added component, fill out the following information:
-
Object Api Name - enter the API name of a custom object that you have created.
-
Country Field Name - enter the field which contains information about the country which a custom object attributes to. The InCountry Data Residency for Salesforce package will use this field to redact data in regulated fields according to the configuration.
-
-
When complete, click Save.
-
Then you will be prompted to activate the layout, click Activate.
-
In the Activation: {OBJECT} form, click Save. Additionally, you can choose another icon.
-
Click Save.
-
Click Finish.
Creating a tab for a custom object
To show a custom object within an application in Salesforce, you need to create a tab for it.
-
From Setup, click User interface and then select Tabs.
-
On the Tabs page, click New.
-
Fill out the following information for a new tab:
1.Lightning Page - select the page which attributes to the custom object you want to add.
2.Tab Label - enter the label of the tab which will show records pertaining to the custom object.
3.Tab Name - update the tab name or leave as is.
4.Tab Style - select the appropriate tab style.
-
When complete, click Next.
-
Regulate the visibility to the available user profiles.
-
Click Save.
Adding the created tab to the InCountry Data Residency for Salesforce package
-
From Setup, click User Interface, then select App Manager.
-
On the list with registered apps, locate the app containing '
InCountry
' in its name. -
For this app, click the down arrow icon and select Edit.
-
Within the app details, switch to the Navigation Items tab.
-
Locate the tab which attributes to your custom object and click Add,
-
When complete, click Save.
Creating custom global actions
Please consider that custom objects from other installed packages may not be fully supported. Such objects have names according to the following pattern [namespece_prefix]__Custom_Object_Name__c
. Global actions do not tolerate two consecutive underscores in their names. The List View and Record Detail components are supported, the standard actions (like New) are not supported yet.
-
From Setup, click User Interface and then select Global actions.
-
On the Global Actions page, click New Action.
-
On the New Action page, fill out the following information:
-
Action Type - select 'Create a Record'.
-
Target Object - select your custom object.
-
Standard Label Type - select ‘New [Record]'.
-
Name - enter the name of the action according to the pattern
NewCustom_Object
. You need to replace spaces between parts of the custom object API name with underscore and remove the prefix (__c) if it is present in the object API name. For example, if your custom object has the API name asCustom_Object__c
, so the name of the global action should beNewCustom_Object
.
-
-
Click Save.
-
Drag the fields to the layout of the form for creating new records of your custom object.
-
When complete, click Save.