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
OnkiOnki 

Dynamic Trigger Filed Name

Please Helpe to solve this

 

I want access Trigger value with dynamic Name

 

Trigger.New[0].Name -  It will return Name value

 

i need these thing like

 

string Name1 = 'Name';

 

Trigger.New[0].Name1 ---- I want do this way

 

 

can any one help to do this or this will not possible?

 

 

 

 

 

hisrinuhisrinu

You can do as follows.

 

for(Account a : Trigger.New)

{

 system.debug('##a.Name##:'+a.Name);

}

 

Does this helps you?

Rajesh ShahRajesh Shah

Yes, you can use Dynamic Apex to achieve it. I am not sure of the exact syntax but you can go through the following example:

 

http://wiki.developerforce.com/index.php/Sorting_Tables

OnkiOnki
I want do with Trigger?
Rajesh ShahRajesh Shah
I think you can use Dynamic Apex in Trigger though I am not 100% sure of it.