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
ch ranjeethch ranjeeth 

I have a Text (Encrypted) field in manage__c object...If user enters same name, Phone value then it need to save the record id in Duplicate__c object with this record ID.

SonamSonam (Salesforce Developers) 
Below is a  sample code.

I've assumed the field names on the Manage_c and Duplicate_c Object, please correct it as er your ORG and bulkify:

Trigger Duprecord on Manage_c (after insert) {
if(Trigger.new[0].Name!=NULL)
{
 Manage_c[] manage = [ select id from Manage_c WHERE Phone = :Trigger.new[0].Phone and Name = :Trigger.new[0].Name ];
    
       if (contact.size() > 0) {
     
       Duplicate__c duprecord = new Duplicate__c();
       duprecord.<duprecordID> = Trigger.new[0].ID;
        insert duprecord;
      }
   }
}