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
Siana DcruzSiana Dcruz 

How to copy values of a field in a fieldset

Hi all,
I have 2 objects claim__c and intake__c.
Claim__c has 2 field sets: marine1 and marine2
marine1 has fields :
vesselName1
vesselName2 and so on
simmilarly
marine2 has fields:
vesselName1
vesselName2 and so on
 Intake__c has a fieldset named marine_intake
it has values vesselName1,vesselNumber and so on

What I have to do in my trigger is
if(vesselName1 of marine1 fieldset == 'ferry')
then I have to copy vesselName1 from marine2 fieldset(claim object) to vesselName1 in marine_intake fieldset(intake obj)
I am really confused with these field sets. can anyone plz help me to write the logic for this.
parth jollyparth jolly
Hi Siana,

Can you please make me understand what are the relationship between all the objects or how are they connected .

Thanks

Paarth Jolly
Siana DcruzSiana Dcruz
Hi Parth,
Intake is the main object whereas claim is the child
claim has a field named intake__c which has a lookup to intake