Salesforce Certified Slack Developer free question 3 / 10 · Domain 2: Designing the Interactive Flow of Apps
A developer wants to carry a record identifier through a view so that it comes back in view_submission and block_actions events. Where should the value be placed?
- In the title of the view, which has a maximum length of 3000 characters
- In external_id of the view, which has a maximum length of 255 characters
- In callback_id of the view, which has a maximum length of 3000 characters
- In private_metadata of the view, which has a maximum length of 3000 characters
Show the answer and explanation
Answer: D
Why this is correct
The view object has several identifier fields. private_metadata is an optional string sent to the app in view_submission and block_actions events, with a maximum length of 3000 characters. callback_id recognizes interactions and submissions of a particular view, has a maximum length of 255 characters, and should not hold sensitive information. external_id is a custom identifier that must be unique for all views per team. Passing a record identifier through the view belongs in private_metadata.
Why the other options are wrong
"In callback_id of the view, which has a maximum length of 3000 characters" … callback_id identifies the view and has a maximum length of 255 characters. The documentation says not to use it for sensitive information.
"In external_id of the view, which has a maximum length of 255 characters" … external_id is a custom identifier that must be unique for all views on a per-team basis. It is not the field sent back as private metadata.
"In the title of the view, which has a maximum length of 3000 characters" … The title is visible text for users. It is not a place to hide data.
Key points
private_metadata (3000 chars) carries data. callback_id (255 chars) names the view. external_id is unique per team.