function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vaishali sharmavaishali sharma 

Map unrealted fields in salesforce.

Hi ,
 i am working on a trigger . where i need to map lead object with another objct field condition is they both dont have any kind of relation with each oher. please tell me the way to come out of this problem. my code is:
.......................................................code........................................................................................................................
for(Lead ld : trigger.new)
     {
    /* leadcriteria is the list which holds all the fetched record from CriteriaFields__r .
        for(Teams__c  teamtest : leadcriteria){
            integer i=0;
            for(CriteriaField__c criteria :teamtest.CriteriaFields__r ){
                i = i + 1 ;
               
 /*************** if(ld.criteria.Field_Api_Name__c == criteria.Field_Value__c){ ********************************/
                      if(i == teamtest.CriteriaFields__r.size())
                     {
                                
                     
                     }
                   }
                   else
                   {
                   
                      break;
                   }
              
            }
The line of code that i have commented i want to achieve something like this (ld.criteria.Field_Api_Name__c where ld is lead object. but both of these field dont have any relationship with each other.
Naval Sharma4Naval Sharma4
Hi Vaishali,

I am still confused about your use case. Can you elaborate in details so we can help you.

Regards,
Naval