Advanced Topics

Show/Hide Download PDF Button

3min

The "Download Invoice PDF" button on the Invoice record info page can be hidden or shown according to the user's preference. The button's visibility can be controlled at the record or user level, and needs can follow any approach based on their needs.

Show/Hide Download PDF Button at the record level.

Create a custom field on the Invoice object in the NetSuite org with the name "custbody_bw_disable_download_pdf", and this field values will be automatically synced into their field "Hide Download PDF", which is present on the NetSuite Invoice object in the Salesforce. The "Download PDF" button is shown/hidden based on the value in the "Hide Download PDF" field. If the field "Hide Download PDF" is checked, the "Download PDF" button is hidden, or else the button is shown.

NOTE: To show/hide the "Download PDF" button, the user must change the value of the field "custbody_bw_disable_download_pdf" in the NetSuite Org accordingly. These values will be synced back to Salesforce into the "Hide Download PDF" field on the Invoice object using the Breadwinner Syncs and will show/hide the "Download PDF" button.

Hide the Download PDF Button at the user level.

To hide the "Download PDF" button for a particular user, follow the below steps.

  • Create a new custom permission set or use the existing one if there is one already.
  • Give Read access to the "Hide Download PDF" field on the "NetSuite Object" object.
  • Assign this permission set to the user who wants user-level access to the "Download PDF" button.
  • Make the value of the field "Hide Download PDF" on the "NetSuite Object" object checked for the Org-level Subsidiary record of Invoice, and then the button "Download PDF" is hidden for all the users who have this permission set assigned.

NOTE: Make sure that the permissions on the field are assigned to the user by the permission set only and not via the profile level

Resolving Permission Conflicts

Consider two users, A and B, with the System Admin/Standard User profile. Let's say that user A wants to hide the "Download PDF" button for user B so, as explained above, user A will create a custom permission set and give read access on the field "Hide Download PDF" on the "NetSuite Object" object and assigns this permission set to the user B and makes the value of the field "Hide Download PDF" as checked for the org-level subsidiary record of invoice to hide the "Download PDF" for the user B but the button "Download PDF" is hidden for both the users A and B. The reason is straightforward: by default, user A also has access to the field "Hide Download PDF" at the profile level, and hence, the button is hidden for user A since the field "Hide Download PDF" is checked. To resolve this issue, remove profile-level access to the field "Hide Download PDF" on the "NetSuite Object" for user A.