SHARING-AND-VISIBILITY-ARCHITECT practice question 7 of 15
A consulting company uses the Salesforce mobile app for its field consultants and uses Case object to track customer specific consulting done by…
Full set: 78 questionsDomain Special Use Cases
The most effective and scalable solution is to override the standard "Edit" action with a single Lightning component. Within this component, the @salesforce/client/formFactor scoped module can be used to determine the user's device type. If the form factor is 'Large' (desktop), the component can use the lightning/navigation service to redirect the user to the standard edit page, ensuring their experience remains unchanged. If the form factor is 'Small' (mobile), the component will render the custom UI with the image capture functionality. This approach minimizes customization to a single component, promotes code reuse, and seamlessly handles the different user experiences without introducing new UI elements.
A. Use Lightning Component as an override for “Edit” action on mobile view allowing image capture feature. No Change required for desktop users. This is incorrect because a standard action override in Lightning Experience applies to all form factors (desktop and mobile). It is not possible to create an override for only the mobile view.
C. Create a separate button “Edit in Mobile”, which opens a custom lightning component that will allow field consultants to add an image. No change required for desktop users. This is a less optimal solution. It adds a new UI element, which can be confusing for users, and requires separate page layout configurations, increasing administrative overhead and not fully leveraging standard actions.
1. Lightning Web Components Developer Guide - formFactor: The @salesforce/client/formFactor module provides information about the form factor of the hardware running the browser. This allows a component to adapt its rendering based on whether it's running on a desktop (Large), tablet (Medium), or phone (Small). This is the core mechanism for the solution in option B.
Source: Salesforce Lightning Web Components Developer Guide, Reference, Modules, @salesforce/client/formFactor.
2. Lightning Web Components Developer Guide - lightning/navigation: The lightning/navigation service is used to navigate to different pages, including standard record pages in edit mode. This is how the component in option B would redirect desktop users to the standard experience.
Source: Salesforce Lightning Web Components Developer Guide, Reference, lightning/navigation, "Navigate to a Record's Edit Page".
3. Salesforce Help - Override Standard Actions with a Lightning Component: Official documentation states that when you override a standard action, the override applies across both Lightning Experience on the desktop and the Salesforce mobile app. This directly invalidates the premise of option A.
Source: Salesforce Help, Salesforce Mobile App Developer Guide, "Override Standard Actions". The documentation notes, "When you override a standard action on an object, that override applies to both Lightning Experience and the Salesforce mobile app."
Keep practicing
Take the free SHARING-AND-VISIBILITY-ARCHITECT practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other SHARING-AND-VISIBILITY-ARCHITECT practice questions
- Question 1Universal Containers (UC) would like to store an encryption key within Salesforce for use…
- Question 2Users at Universal Containers are complaining that a field has disappeared from the Accou…
- Question 3Universal Containers (UC) operates worldwide, with offices in more than 100 regions in 10…
- Question 4Universal Containers has expanded to sell virtual containers for data storage. Virtual co…
- Question 5The sales managers at Universal Containers requested their teams to define each user's ro…
- Question 6A user posts a file to the Chatter feed for a record of an object that has a Private orga…
