You need to sign in to do that
Don't have an account?
vijendahr k
Dynamically create field mapping in between 2 objects
Hello all,
I have one urgent requrement, i have two objects integration_object, and integration_staging object , we have callouts to insert record in integration_staging object.after inserting record in the stageing object, i have to replicate all the values in integration_object objet . for that i have to crate field mapping dynamically and assign values to it. like
stagingreclist= new integration_staging ();
for( integration_staging is: stagingreclist)
{
integration_object io= new integration_object ();
i0.f1 = 1s.f1;
i0.f2= is.f3;
i have to map above fields dynamically ,
}
Can any one help me achive scenario or help me better approch for it. your help is very help full for me.
I have one urgent requrement, i have two objects integration_object, and integration_staging object , we have callouts to insert record in integration_staging object.after inserting record in the stageing object, i have to replicate all the values in integration_object objet . for that i have to crate field mapping dynamically and assign values to it. like
stagingreclist= new integration_staging ();
for( integration_staging is: stagingreclist)
{
integration_object io= new integration_object ();
i0.f1 = 1s.f1;
i0.f2= is.f3;
i have to map above fields dynamically ,
}
Can any one help me achive scenario or help me better approch for it. your help is very help full for me.
All Answers
i0.f2= is.f2;
Have to do Auto mapp fields like that in the above format.
1) http://amitsalesforce.blogspot.com/2014/11/dynamic-field-mapping-using-custom.html
i have already gone through your post, before post quuesion, but in the example its creating dynamic query , at getAllMapping() funcion, but
i need to achive like
for(obj o: test)
{
acc a= new acc();
a.f1= o.f1;
a.f2= o.f2.....
}
the above mapping shold happen. how can i achive it ?
Thanks for replay amit:)