sam291091
7th November 2014, 13:41
Hi,

I need to mark multiple records at time in session through AFS

Any Solution?

bhushanchanda
7th November 2014, 14:03
Hi,

What you can do is use a while/for/select loop and call a function with AFS script to mark and process record multiple times.

You can refer to this http://www.baanboard.com/baanboard/showthread.php?t=23228

sam291091
8th November 2014, 10:41
Hi ,
I try this but previous record was unchecked. If you have any code then send it

mark_h
9th November 2014, 00:24
Bhushan showed one example of how this can be done. The next question is what session and is your code like? Different sessions could have different solutions. Also what version of Baan is it on? You can also search this forum for the session to see solutions from others.

sam291091
10th November 2014, 05:38
Hi,
I am using ERP LN (fp9)

1) First run the session Split Production Order (tisfc0208m000)
2) Open session select serial number to split off(tisfc0208m100) on clicking "Select"
3) Then i want to select multiple records from select serial number to split off(tisfc0208m100) using AFS ??

How can i do this ??

bhushanchanda
10th November 2014, 12:27
Hi,

Even I do not have FP9 so cant give it a try. Well as said, you can try to send one record at a time to process or a second way is, if the table has a field called "marked/checked" then you can just update the table using DAL before processing with AFS. Again, I am not sure how the actual scenario is.

mark_h
10th November 2014, 15:44
If you get it to work with 1 record for the split, then what you can try is doing a stpapi.find for each serial number, followed by a stpapi.mark. So it would be stapi.find, stpapi.mark,stapi.find, stpapi.mark, stapi.find, stpapi.mark - etc. I am not sure that would work, but worth a shot.

Everything I have done has been on a record by record, or all the records at once.

sam291091
11th November 2014, 18:43
Hi Bhushanchanda and Mark,

I have done this by creating a new session in that user can insert serial numbers instead of selecting records of Particular Production Order so that no need to mark any records just pass inserted serial numbers in array. Then I write AFS on this session


Thanks for Helping