Which datatypes are pass by reference?

It just came to my understanding that List is passed to server action by reference, while basic datatypes and structure are by value. 

May I know what other datatypes is pass by reference too? I can't seem to find any documentation online.

Hi Chong,

As per my knowledge Lists, objects and Binary data is passed by reference.


-Hitesh-

Solution
Solution

Hi All, 

May it be possible the list of arrays to be pass by value instead of pass by reference? Because I have a list of value prepared in server actions and then pass back to client action. 


Thank in advance






Hi Jessica,

You could always copy the list with the ListDuplicate action before sending it to an other action. 

But in case of a client action calling a server action, this will always be a copy because the server can never get a memory reference to the local device. So communication going back and forth is always a copy of the list.

Greetings,

Vincent

Hi Vincent,

Thank for your prompt response. 

I want to pass a list value from server action to client action. As the list is passed by reference, I cannot get the list value in the client action. Any suggestion?


Hi Jessica,

Can you give us a PoC application demonstrating your issue? I don't recall ever having this issue (or perhaps I use different methods to achieve the same). 

Kind regards,

Vincent

Hi Vincent,

I have solved it by passing JSON.

Thank a lot