Skip to main content

Im not sure if this is the group to ask this question in but is there any way to create records and update fields if a new record type is created on an object? 

 

For example. The trigger would be: When a new record type (not a record) is created for the Account object, do the following:

  • Update a picklist field on the User object
  • Create a bell of toast notification on the Account
  • Create a new account record with the record type that was created 
  • Associate that account record with a contact and a customer user

Unfortulatey flow triggers are record-specific. Is there a way to accomplish this without the use of apex?

 

Thanks!

-Nadira

 

#Trigger Per Object #Triggers #Record-Triggered

2 respuestas
  1. Michael Brown (Salesforce) Forum Ambassador
    6 nov 2023, 20:47

    Hi Nadira, 

     

    There's actually a RecordType object a record is created against every time a record type is created. Unfortunately, this object is not available through record triggered flows. The only way I can think of doing this without custom code is to potentially use a Scheduled Flow. You can run a scheduled flow on the Record Type object, and potentially look for new record types that were created, but unfortunately this wouldn't perform actions in real time. 

     

    That said, can you elaborate on your use case as this scenario sounds very unique. Specifically, this part gives me some concern: 

    • Create a new account record with the record type that was created

    It's recommended to have very few, or ideally no record types as much as possible, and creating an Account record each time a record type is added could really cause things to add up. Also, what is the intent for creating a record for each record type? 

     

    Thanks,

    Mikey

0/9000