Sub topic 10
Deployment Status and Making the Type Available
This chapter assumes you can build a simple report in the Lightning report builder. It also assumes you have read the chapters on creating a custom report type and designing its field layout. Here you will learn what the Deployment Status setting does, how it differs from access control, and what goes wrong when a type is available but nobody can see it.
What deployment status controls
Every custom report type has a Deployment Status with two values:
- In Development: The type is a draft. Only users with the Manage Custom Report Types permission can pick it when they create a report.
- Deployed: The type shows up in the report type picker for every user who is allowed to create reports.
The status is a visibility switch for the type itself. It does not grant access to data. A user who can see a deployed type still sees only the records and fields their own permissions allow.
In the Metadata API this setting is the deployed element. The example from the previous chapter has <deployed>true</deployed>. Setting it to false is the same as In Development.
Using In Development as a test stage
Treat In Development as a safe place to check your work. The usual sequence looks like this.
- Create the type with the status In Development.
- Create a test report from the type. Pick the primary object, check that the related objects appear, and check that the field list matches your layout.
- Run the report against a few records you know. Confirm that "A with B" and "A with or without B" behave the way you intended.
- Fix the layout or the relationships, then repeat.
- Set the status to Deployed when the type is ready.
A custom report type is usually created with In Development as the default. You can choose Deployed on the first save, but doing so exposes an untested type to every report creator right away.
Deployed does not mean everyone can use it
Deployment status is only one of several gates between a user and a report. A user needs all of the following.
| Requirement | What it does | Where it is set |
|---|---|---|
| Create and Customize Reports permission (or Report Builder access) | Lets the user build reports at all | Profile or permission set |
| Deployed status | Lists the type in the report type picker | The report type definition |
| Read access to the primary object | Needed to see the type | Object permissions |
| Read access to related objects | Needed to see those objects' fields and rows | Object permissions |
| Field-level security | Hides individual fields from the layout | Field settings |
If the user lacks read access to the primary object, the type does not appear in the picker. If the user lacks read access to a related object, the type appears but the related fields and rows are missing. This is a common source of "the report is empty" complaints, covered in the troubleshooting chapter.
Where the status is changed
You change the status when you edit the type.
- In Setup, enter Report Types in Quick Find and open Report Types.
- Click the name of the type, then click Edit.
- Under Deployment Status, select In Development or Deployed.
- Click Save.
The change takes effect for new report creation right after you save. You do not need to wait for a refresh or log users out.
What happens to existing reports
Moving a type back to In Development has a limit that is easy to miss. Reports that were already built on the type keep working for the users who can run them. Salesforce does not delete or break them. What changes is who can start a new report from the type.
The reverse risk matters more. If you remove a type that has reports built on it, those reports are affected. Salesforce warns you when a report type is in use, and you should read that warning before you go further. The chapter on changing and retiring report types covers this in detail.
A few practical points follow from this.
- Switching to In Development is a reasonable way to stop new reports while you plan a change. It does not disrupt reports that people rely on.
- A report folder's sharing is separate. Users still need access to the folder that holds an existing report.
- Dashboards that use a report built on the type continue to refresh as long as the report runs.
Checking availability from the user side
To confirm a type is available, test as the kind of user who will use it. Administrators often test only as themselves and miss gaps, because an administrator can see the type regardless of status and can read all data.
- Open the user record and use Log in (if your org allows it), or use a test user with the same profile and permission sets.
- Go to Reports, click New Report, and search for the type name.
- Choose the type and check the list of fields in the report builder.
- Run a report and compare the row count to what the user expects.
If the type is missing, work through the causes in order: the status, the primary object permission, and the Create and Customize Reports permission. If it appears but is incomplete, check related object permissions and field-level security.
Deployment status and the Metadata API
When you move a type between orgs, the deployed element travels with the definition. This has two effects.
- A type deployed from a sandbox as
deployedis visible to all report creators in production the moment the deployment finishes. - A type deployed as
falsearrives as In Development and stays hidden until an administrator changes it.
A safe release pattern is to deploy the type with <deployed>false</deployed>, test it in production with an administrator account, and then switch the status in Setup. This keeps the release and the launch as separate steps.
The following definition is the same type as before, set up for that pattern. The only change is the deployed value.
<?xml version="1.0" encoding="UTF-8"?>
<ReportType xmlns="http://soap.sforce.com/2006/04/metadata">
<baseObject>Account</baseObject>
<category>accounts</category>
<deployed>false</deployed>
<description>Accounts with or without contacts</description>
<join>
<outerJoin>true</outerJoin>
<relationship>Contacts</relationship>
</join>
<label>Accounts with or without Contacts</label>
<sections>
<columns>
<checkedByDefault>true</checkedByDefault>
<field>Name</field>
<table>Account</table>
</columns>
<masterLabel>Accounts</masterLabel>
</sections>
<sections>
<columns>
<checkedByDefault>true</checkedByDefault>
<field>LastName</field>
<table>Account.Contacts</table>
</columns>
<masterLabel>Contacts</masterLabel>
</sections>
</ReportType>Common mistakes
- Deploying too early. Users build reports on a layout that you then change. Reports they have already saved keep the old field choices, which leads to confusion.
- Leaving types In Development by accident. The type works for you and fails for everyone else. Add a status check to your release checklist.
- Assuming status controls data. A deployed type shows only what a user may read, and an In Development type does not protect anything.
- Testing only as an administrator. Administrators bypass the gaps that ordinary users hit.
- Forgetting the category. A deployed type appears under the category you chose, such as Accounts & Contacts. If users search the wrong category, they think the type is missing. Searching by name avoids this.
Exercise
You deployed a custom report type, Accounts with or without Contacts, from a sandbox. A sales user says she cannot find it when she clicks New Report, but you can. Give three checks, in order, and explain what each one tells you.
Show answer
First, check the Deployment Status. If it is In Development, only users with Manage Custom Report Types can see it, so set it to Deployed. Second, check that her profile or permission sets give Read access to the primary object, Account. Without it the type is not listed. Third, check that she has the Create and Customize Reports permission (or the equivalent report builder access), since without it she cannot build reports at all. Test as her, or as a user with her profile, because your administrator access hides these gaps. If the type shows up but contacts are missing, check Read access to Contact and field-level security on the Contact fields.
Exercise
A team wants to hide a type that exposes salary fields by leaving it In Development permanently. Why is this a poor control, and what should they do instead?
Show answer
In Development only limits who can start a new report from the type, and users with Manage Custom Report Types can still use it. It does not protect the underlying data, which other report types may expose too. They should restrict the salary fields with field-level security, limit object access with permissions, and use sharing for records. Then the type can be deployed safely, because users who lack access see no salary data.