Loading
Set Up and Maintain Retail Execution
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Create Custom System Settings for the Deletion of Retail Visit

          Create Custom System Settings for the Deletion of Retail Visit

          Use custom system settings to enable the deletion of completed visits on the Consumer Goods Cloud desktop app. The app restricts the deletion of completed visits, but with these settings in place, you can delete a completed visit by using the Delete option for a visit on the desktop app or through the API.

          Required Editions

          To delete visits, you must have the Industries Visit permission set license.

          Available in: Lightning Experience
          Available in: Enterprise and Unlimited Editions that have Consumer Goods Cloud enabled
          User Permissions Needed
          To delete visits:

          CGCloud Business Admin

          OR

          CGCloud Retail Business Admin

          You can delete a completed visit only if these conditions are met:

          • The value in the Age_of_Visit setting is less than the difference between the visit completion date and the current date.
          • The value in the Delete_Completed_Visit setting is True.
          • You have access to the visit.
          1. In Setup, find and select Custom Settings.
          2. Find System Setting, and then click the Manage link next to it.
          3. To add a setting, click New.
          4. Enter Delete_Completed_Visit as the name of the new setting.
            The Delete_Completed_Visit custom setting doesn’t consider the Delete Allowed flag on the visit template and deletes a completed visit regardless of the flag status.
          5. Enter True as the value for the setting.
          6. Save your changes.
          7. On System Setting, click New.
          8. Enter Age_of_Visit as the name of the new setting.
          9. In Value, enter the number of days after which a completed visit can be deleted.
          10. Save your changes.
          Example
          Example To delete completed visits that were in the app for over a year, update the value in the Age_of_Visit setting to 365 days and set the Delete_Completed_Visit value to True to make sure that only the visits completed more than a year ago are considered for deletion. This configuration enables the deletion of visits that meet the age criteria.
           
          Loading
          Salesforce Help | Article