Table of Contents

Search

  1. Preface
  2. Introduction to Informatica Customer 360 for Salesforce
  3. Configuring the Data Cleansing Settings
  4. Managing Batch Jobs
  5. Verifying Addresses, Email Addresses, and Phone Numbers
  6. Synchronizing Salesforce Records with Customer 360 for Salesforce
  7. Managing Duplicate Records
  8. Consolidating Records
  9. Converting External Records to Salesforce Records
  10. Managing Hierarchies
  11. Integrating Customer 360 for Salesforce with Multidomain MDM
  12. Managing Multi-Org
  13. Troubleshooting
  14. Appendix A: Custom Settings
  15. Appendix B: Glossary

Allowing Guest Users to Create Accounts

Allowing Guest Users to Create Accounts

Based on the security setting of Salesforce, CC360 does not support guest users to create records when you configure synchronization settings for the Account object. For guest users to create records, deactivate the current trigger of the Account object and create a custom trigger.
Use the Salesforce Accounts page for guest users to create accounts, contacts, or lead records. Ensure that you don't use the
New
button on the Accounts home page that overrides the Salesforce Accounts page.
  1. Based on the Salesforce environment that you use, perform one of the following tasks:
    • In Salesforce Classic, in the upper-right corner of the page, select your name, and click
      Developer Console
      .
    • In Lightning Experience, click the quick access menu ( The image shows the quick access menu. 
				  ), and then click
      Developer Console
      .
  2. To deactivate the CC360 trigger of the Account object, perform the following tasks:
    1. Click
      Debug
      Open Execute Anonymous Window
      .
      The
      Enter Apex Code
      dialog box appears.
    2. Enter the following code:
      DSE.API_SettingsManager.updateInternalSetting('DisableAccountTrigger',1);
    3. To disable DaaS triggers, enter the code in the following format:
      DSE.API_SettingsManager.updateInternalSetting('DisableDaasTrigger_001',1);
    4. Click
      Execute
      .
  3. To create a custom trigger for the Account object, perform the following task:
    1. Click
      File
      New
      Apex Trigger
      .
      The
      New Apex Trigger
      dialog box appears.
    2. Enter a name for the trigger.
    3. Select
      Account
      .
    4. Click
      Submit
      .
    5. In the trigger editor, enter the Apex code in the following format:
      trigger Custom_Account_Trigger on Account (after delete, after insert, after update, before delete, before insert, before update) { DSE.API_AccountTriggerHandler apiHandler = new DSE.API_AccountTriggerHandler (); DSE.API_DataQualityTriggerHandler daasAccountHandler = new DSE.API_DataQualityTriggerHandler('Account'); private Boolean enableAccountTrigger = true; private Boolean enableDAASTrigger = true; if(System.UserInfo.getUserType() == 'Guest') return; try { apiHandler.initTrigger(); } catch (Exception e){ enableAccountTrigger = false; } try { daasAccountHandler.initTrigger(); } catch (Exception e){ enableDAASTrigger = false; } try { if (Trigger.isInsert ) { if (Trigger.isBefore) { if(enableAccountTrigger) apiHandler.Trigger_InsertBefore_Handler(); if(enableDAASTrigger) daasAccountHandler.Trigger_InsertBefore_Handler(); } else { if(enableAccountTrigger) apiHandler.Trigger_InsertAfter_Handler(); if(enableDAASTrigger) daasAccountHandler.Trigger_InsertAfter_Handler(); } return; } if (Trigger.isUpdate) { if (Trigger.isBefore) { if(enableAccountTrigger) apiHandler.Trigger_UpdateBefore_Handler(); if(enableDAASTrigger) daasAccountHandler.Trigger_UpdateBefore_Handler(); } else { if(enableAccountTrigger) apiHandler.Trigger_UpdateAfter_Handler(); if(enableDAASTrigger) daasAccountHandler.Trigger_UpdateAfter_Handler(); } return; } if (Trigger.isDelete) { if (Trigger.isBefore) { if(enableAccountTrigger) apiHandler.Trigger_DeleteBefore_Handler(); if(enableDAASTrigger) daasAccountHandler.Trigger_DeleteBefore_Handler(); } else { if(enableAccountTrigger) apiHandler.Trigger_DeleteAfter_Handler(); if(enableDAASTrigger) daasAccountHandler.Trigger_DeleteAfter_Handler(); } return; } } catch (DSE.API_AccountTriggerHandler.DS_CloudMDMPartialTriggerFailureException e) { if (Trigger.isAfter) DSE.API_AccountTriggerHandler.AccountTriggerState = DSE.API_AccountTriggerHandler.TRIGGER_FAILURE_STATUS.TRIGGER_ROLLBACK_INPROGRESS; else DSE.API_AccountTriggerHandler.AccountTriggerState = DSE.API_AccountTriggerHandler.TRIGGER_FAILURE_STATUS.TRIGGER_FAILED; return; } }
      This Apex code creates a trigger named
      Custom_Account_Trigger
      for the Account object.
    6. Click
      File
      Save
      .
  4. Run the Migrate Accounts job periodically to synchronize the accounts created by guest users.
  5. Run the DaaS batch job to verify the Account contact details for the accounts created by guest users.

0 COMMENTS

We’d like to hear from you!