Create Custom Auto Number Field With Your Criteria Using Flows - Flow Example

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ต.ค. 2020
  • Have you ever want to have an auto number field but it only populates when certain criteria were met on a record? Now you can by using the power of Salesforce flows and custom setting. In this tutorial, I go over how to create an auto number field that is based on the lead source field. Only leads with specific lead source values will get an auto number generated. This is extremely useful if your company has multiple round robins process or want to have auto numbers generated like invoice numbers for additional fields.
    Subscribe for more videos like this: bit.ly/2ZjoZ8h
    Want to take your #Salesforce Knowledge to the next level? Go to salesforcementor.teachable.com/ new course content every week to keep you fresh.
    If this video was helpful consider supporting me.
    / salesforcementor
    Patrons get access to all my source code, an exclusive discord, and Daily Force Primer for exam questions.
    Thanks for watching.
    Follow me on twitter / thewalters954
    Connect with me on LinkedIn / walters954
    Join the Salesforce Exchange Discord join.sfxd.org
    ---------------------------------------------------------------------------------
    Recommended Books
    Advanced Apex Programming amzn.to/2X8hZb4
    Clean Code amzn.to/2X8iaTM
    Salesforce Platform App Builder Certification amzn.to/3eZOGPj
    Practical Salesforce Development Without Code amzn.to/30tDXsD

ความคิดเห็น • 26

  • @Walters954
    @Walters954  ปีที่แล้ว

    👩🏿‍💻 Want to become a dev but don't know where to get started?
    👉🏿 Check out my course on Apex Fundamentals tinyurl.com/LEARNSFDEV

  • @SalesforceForEveryone
    @SalesforceForEveryone 3 ปีที่แล้ว +3

    Great use case. Thanks for putting out videos on Flows, definitely a topic many Salesforce pros are struggling with.

  • @klexplorers7888
    @klexplorers7888 8 หลายเดือนก่อน

    I know this is an older video and a few things have changed in flows BUT this was the best video I found to help me successfully build a flow that increments the record version. Wish I had found it hours ago LOL Thank you!!!

  • @justineepistola1044
    @justineepistola1044 4 หลายเดือนก่อน

    I just want to say Thank you!

    • @Walters954
      @Walters954  4 หลายเดือนก่อน

      Music to my ears. I'm glad this helped.

  • @pedroprada1
    @pedroprada1 3 ปีที่แล้ว

    Great stuff as always... I love to see these edge cases with new functionality

    • @Walters954
      @Walters954  3 ปีที่แล้ว

      Glad you like them!

  • @TheAnishbab
    @TheAnishbab 2 ปีที่แล้ว +1

    Good video ..One thing I noticed ,I tried this but when I do a mass insert it giving same number to a set of records(batch).

  • @faras0123
    @faras0123 3 ปีที่แล้ว

    This was extremely helpful, thank you! What if I needed to reset the number based on a date? For example, reset back to zero at the start of a new quarter.

    • @Walters954
      @Walters954  3 ปีที่แล้ว +1

      Great question. You can set up another scheduled flow to reset the field.

  • @nmartin959
    @nmartin959 2 ปีที่แล้ว

    This is great, however, attempted to do this using scheduled batch flow and it does not work. It updates all of the records at the same time with same number. Any thoughts on how this can be accomplished using a scheduled flow?

  • @imani3198
    @imani3198 2 ปีที่แล้ว +1

    This video was very helpful! How would you bulkify this to enable the flow to keep triggering even during imports with dataloader?

    • @cacahuate2012
      @cacahuate2012 2 ปีที่แล้ว +1

      I couldn't get it to work on bulk import so I created a scheduled flow with a loop which allowed me to increase the interval for each record in the loop, and then update the custom setting's number at the end. Works great! Really wish there was better bulk handling in flows though.

    • @TheAnishbab
      @TheAnishbab 2 ปีที่แล้ว

      @@cacahuate2012 can you please help me with..I did add loop but still update not working as expected on bulk load

    • @cacahuate2012
      @cacahuate2012 2 ปีที่แล้ว

      @@TheAnishbab shoot me your email and I’ll send you some screenshots of the flow

  • @pedroprada1
    @pedroprada1 3 ปีที่แล้ว +2

    can you use a prefix on the custom settings auto-number... i would think you do this on the flow

    • @Walters954
      @Walters954  3 ปีที่แล้ว

      Great question. Yes in the flow you can add a prefix. You may need to use a formula text because of the number field formatting.

  • @whozveer
    @whozveer 3 หลายเดือนก่อน

    Hi Walter, I saw this video and my concern is related with the a record type .
    Its the same thing however i need to do the increment based on the record type.
    For example -- Record type- NDA and Record Type - MSA
    if a new record is created with NDA the name should show me in the record as NDA _1
    and if a new record is created with MSA then the name should show me in the record as MSA_1
    if I create another NDA it should be NDA_2 and NDA _3 and so on. also same for the MSA_1, MSA_2, MSA_3.
    I am not able to implement this thing using a flow. can you please help here.

  • @sunnyja0071
    @sunnyja0071 2 ปีที่แล้ว

    What about race conditions, when two records are trying to update the custom settings.

  • @jamiearmstrong9334
    @jamiearmstrong9334 2 ปีที่แล้ว

    Can you please help me. I am trying to create autonumbering on certain record type. the numbers start as 22001MS and move up when we get more leads. How do I make a certain record type autonumber and not effect my other record types?

  • @artsyart1793
    @artsyart1793 2 ปีที่แล้ว

    Can I limit the Custom Setting to numbers from 1-10 then it would start over

  • @frasesdeldia2681
    @frasesdeldia2681 2 ปีที่แล้ว

    i think it does not work, because de lead assignment rule runs before the flow, and the logic here is that the flows run before the assigment tule.
    Now is: Assign first, then run flow
    Could be: Run flow, fill autonumber, assign lead
    You create 2 leads, and both had the same owner

  • @kalyanp7857
    @kalyanp7857 3 ปีที่แล้ว

    I think It can't handle multiple records. Good stuff though!

    • @user-dk9bp3vv2d
      @user-dk9bp3vv2d 3 ปีที่แล้ว

      He use custom setting to keep latest number.

    • @HungryHiro
      @HungryHiro 2 ปีที่แล้ว +1

      Seems like you would need to add a loop and store in record collection variable before making the update