• PandaX
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies

Hi awesome developers!

I need to "classify" an incoming Record A based on several related fields on records B,C,D,.. etc. Therefore I need a trigger that is triggering (:D) on this new record and check more then 5 lookup relationships for the content of specific fields in the related records B,C,D ...
Following https://developer.salesforce.com/page/Apex_Code_Best_Practices #2 I should not put the query for the related records in the foreach loop on record "A" Also I need to bulkify this, so it could handle the max load of 200 records entering the trigger at once.
What would be the most efficient way to query those related records for each incoming record and classify "A" according to the values in the related records?

 

If you could help me out here or point me in the right direction that would be really great!

Thanks,

Markus

  • February 24, 2019
  • Like
  • 0

I want to create a Field with the following output format:

X-TTTT-NNNN

X will be just the X character.

TTTT should be the value I take from another Field of the same object (until now thats super easy)
NNNN should be a number that is unique for the TTTT value (for example this TTTT could be a Store or Location)
The number as awhole schould be unique in the entire system, without any reppetitions.

How would I implement the NNNN part?

  • August 11, 2017
  • Like
  • 0

Hi awesome developers!

I need to "classify" an incoming Record A based on several related fields on records B,C,D,.. etc. Therefore I need a trigger that is triggering (:D) on this new record and check more then 5 lookup relationships for the content of specific fields in the related records B,C,D ...
Following https://developer.salesforce.com/page/Apex_Code_Best_Practices #2 I should not put the query for the related records in the foreach loop on record "A" Also I need to bulkify this, so it could handle the max load of 200 records entering the trigger at once.
What would be the most efficient way to query those related records for each incoming record and classify "A" according to the values in the related records?

 

If you could help me out here or point me in the right direction that would be really great!

Thanks,

Markus

  • February 24, 2019
  • Like
  • 0

I want to create a Field with the following output format:

X-TTTT-NNNN

X will be just the X character.

TTTT should be the value I take from another Field of the same object (until now thats super easy)
NNNN should be a number that is unique for the TTTT value (for example this TTTT could be a Store or Location)
The number as awhole schould be unique in the entire system, without any reppetitions.

How would I implement the NNNN part?

  • August 11, 2017
  • Like
  • 0
How can I delete the community? Also, How can I create the community without keep bumping into lightening bolt?