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
anurajanuraj 

Lookup

Hi

I have created a look up from case object to a custom object. The field name is statusupdate__c i am getting the value of the statusupdate__c field but I what the id of the field to compare whether it is present in the case object. What should I do. pls help me it is urgent. pls

 

my code 

 list<string> status1 = new list<string>(); 
    list<string> id = new list<string>();
    list<string> name1 = new list<string>();
    
    for(Case caseobj:Trigger.new)
    {
        status1.add(caseobj.statusupdate__c);
        id.add(caseobj.recordtypeid);
        //id.add(caseobj.recordtypename);
        //status1 = [select status from case  where id=:recordtypeid]; 
        //id  = [SELECT id, selectstatus__c from statusupdate__c WHERE id =:status.id];
    }
    
    list<statusupdate__c > newstatus = new  list<statusupdate__c >();
    newstatus = [select Name,selectstatus__c,id from statusupdate__c where id =:status1]; 
    RecordType contactRecType = [select name from RecordType where id=:id ];
    
   // list<statusupdate__c > statusid = new  list<statusupdate__c >();
   // statusid = [select id from statusupdate__c  where selectstatus__c = :status1];
   
    list<case> newcase = new list<case>();
    newcase = [select Status,id,statusupdate__c from case];
    
    system.debug('+++++++++++++++++++++++++++++++'+newcase[0].statusupdate__c) ;

 pls help me i am new to salsforce. 

anurajanuraj

Hi

 

Can anybody help me to solve this problem.

 

Thanks 

anu

stunaitestunaite

What is exactly your problem?

ShuchiMShuchiM

I am facing the same issue. I want the id in a jquery but all i get is the value of the field "Test account", for e.g. Did you resolve this issue?