I need to call the ProcessCalling.LaunchForm function with multipl contextvalue

I need to open the job entry form from another form but I want to pass multiple parameters to the Job Entry form.

I was doing this:

LaunchFormOptions lfo = new LaunchFormOptions();
lfo.ContextValue = projectID;
ProcessCaller.LaunchForm(oTrans, "PJGO1010", lfo);

but it’s only one ContextValue. If possible, i would need to have a key => value array or somehting like that. What’s the best way to do this ? Right now, it seems like I can create an array and put it into ContextValue and in my Job Entry, I get the context value and get the variables one by one and treat them. Is it the best solution to this problem or is there any other easier way?

Thanks

Finally, I found a solution. I created a list with

NameValueCollection list = new NameValueCollection();

And i just added the list to ContextValue. Pretty simple finally !

Hi @Stevensi1018
could you share your full code in both BO here please ?

1 Like