EdHubbard
9th June 2003, 14:05
We have some users that need to reprint sales invoices, but I do not want to allow them access to print new invoices.

I could go to their machine and give them defaults "yes" for the field "Print Already Printed Documents" in tdsls4404m000 but there are a number of problems with this; including the fact they can over-ride it!

We have already customised the tdsls4404 (m000) script so I am not too worried about adding to it.

Any code or other suggestions would be very welcome!

Thanks

Ed

p.cole
9th June 2003, 14:48
Hi,

One way to do it would be to copy the session to a new code, e.g. copy tdsls4404m000 to tdsls4404m0ed and then copy form 1 to a new code.

Then edit form 1 (using ttadv3100m000) so that the "printed" field is defaulted to "tcyesno.yes" by changing the "Default" field, and then put "0" in the "inp./ref Expres." field to prevent the user from changing.

Hope this helps

Phil

EdHubbard
9th June 2003, 15:15
I knew there was something reasonably straight-forward that I could do!

Thanks for your help Phil.

EdHubbard
9th June 2003, 18:50
This actually became a bit more complex than it first appeared!

I had to add my new session to the order steps (I called it step 20) and I had to enter a value in the re-execute field - made it the same as tdsls4404m000.

Eventually I also decided to just have the 1 form attached to my new session (this was form 2 from the standard Baan session).

Also I added a bit of program script as I was getting a few problems (with both scenarios of 1 form or 2 forms) with the form getting "stuck" running through the field.all, before.input section. So I stopped it running when my new session was the object calling it.

field.all:
before.input:
if prog.name$ <> "tdsls4404m0ap" then