Page 1 of 1

Can I get a return value from a headlessclient?

PostPosted: Mon Jul 04, 2011 6:30 pm
by jasantana
I have an SHC that generates some invoices. Before doing that with an SHC I used to do it in a method that returned an array with all the invoices id that were created, can I get that array from the SHC??

If so, where will I get it: in the callback method? How, inside the event or in a new argument?

Thanks.

Re: Can I get a return value from a headlessclient?

PostPosted: Tue Jul 05, 2011 10:38 am
by jcompagner
you return value sits in the data property of the JSEvent (type CALLBACK_EVENT)

Re: Can I get a return value from a headlessclient?

PostPosted: Tue Jul 05, 2011 11:22 am
by jasantana
Thanks Johan, one more question.

My headlessclient will have to perform the process thru the records that the user has marked to. That mark is set in a calculation field and I know that calculation is only stored in the foundset for that user in that session so I have been trying to send the foundset to the SHC but nothing seems to happen. Any clue on how to get this done?

Re: Can I get a return value from a headlessclient?

PostPosted: Tue Jul 05, 2011 11:24 am
by jcompagner
you can't send a foundset to the HC.

so somehow you have to get that state the other way through the db. or as an array of data (like array of integers) that has the same effect.