Generate Criteria based Autonumber in Salesforce

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ต.ค. 2024

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

  • @soumyaranjanmohanty9750
    @soumyaranjanmohanty9750 14 วันที่ผ่านมา +1

    Hi Kapil,
    Is there any way to do this in flow, as we can't iterate over new records in flow. I am unable to give them the next count.
    It doesn't work when we create multiple records.

    • @SalesforceBolt
      @SalesforceBolt  12 วันที่ผ่านมา +1

      Would be difficult in flow because iteration won’t be happening. I will try to find a workaround.

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

    Each video is worth watching and informative... Keep it on Kapil 👍

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

    It's working As expected, But when two users create the record simultaneously, it creates a duplicate number. I am facing this issue now.

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

      Hey that can only happen if you are using async process. Keep in sync instead.

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

    Hi, If we have autonumber id as 'Abc-0001', then how should we do it?

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

      Just add the prefix in the number before saving it to the object. And trim it while getting the data.

  • @RAHULKUMAR-mv5mb
    @RAHULKUMAR-mv5mb 3 ปีที่แล้ว +1

    This code will fail when conList exceeds 200000 records. I am facing the same issue. Any other solution found ?

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

      Apologies, I have never tried it with this much of records. Maybe a batch will do the job.

    • @RAHULKUMAR-mv5mb
      @RAHULKUMAR-mv5mb 3 ปีที่แล้ว +1

      Batch seems not to be the solution here. Still figuring out. Parallelism issue also adds up here. Good stuff.

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

      @@RAHULKUMAR-mv5mb glad to hear that ! If you find the solution do share it here as well so it could help other !

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

    This code is not working sir... I don't knw why its giving error 'system. nullpointerexception' Attempt to de-reference

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

      Hello Harish, try to print values in console.log before assigning it to a variable. If a value is coming null then you must add a check before assigning it like : if(value != null){Your Code here}