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
Sumant KuchipudiSumant Kuchipudi 

How to change a record's field dynamically when a new record with the same Type and RecordType matches?

I have BioRecord custom object which has Email, Phone, Status(picklist, Current, Former), Type (picklist, Home, Office, etc) and Record type (Phone and Email), we have integration that writes the data into this object. If a record is existed with a Type='Home' and recordtype='Phone' and if a new record comes with the same Type and same recordtype, I need to change the status of old record to 'Former'. 
i'm guessting that I can do it in Trigger but is there any alternate way we can change the Status of the record? 
Raj VakatiRaj Vakati
You can do it with workflow .. 

You can able to update the record type Id by using work flow .. 
Sumant KuchipudiSumant Kuchipudi
hi Raj V, thanks for the reply, but I want to update "Status" field not the record type id. And also how can i check a record is already existed with the same Type and RecordType using workflow?
Raj VakatiRaj Vakati
My mistake Sumant ... That case you need to use the trigger or process builder ( You need to apex here also ) 

The only simple way is with the trigger