jojovalenton
15th October 2014, 11:32
hello,

anybody who has an existing afs scripts starting from the header session to update session whinh3112s000?i created some scripts but its not working.

thanks in advance,

jojo

benito
16th October 2014, 17:51
Your profile says you are in BaanIV but you are creating AFS for wh package. Can you use DAL instead of AFS? what are you trying to do in the Warehouse Receipts?

jojovalenton
17th October 2014, 05:27
hi,

thanks for your reply. now i'm using LN fp7 and i'm trying to modify warehouse receipts after saving the report orders completed because from this session i click no on preceding operations will be completed and change the actual receipts and unit in the warehouse receipts. session whinh3112s000 is the 5th sessions from report orders completed, if i start the process on warehouse receipts session, error message came out saying header not found. in addition to this, i need the system will send email to one or two persons in cases the conversion unit is not found in the master data. i will appreciate any help on these two tasks - modify and sending email.

thanks,

jojo

benito
17th October 2014, 17:32
perhaps you can take a peek at these 2 std dlls:

- whinh.dll0312.update.receipt.unit.and.quantity
- whinh.dll0310.update.receipt.header

also, i don't remember how it worked on windows but here is my dll in unix:

function extern pacom.dll0001.send.email( string i.email.addr.to(4096)
,string i.email.addr.fr(100)
,string i.str.subject(100)
,string i.attachment(200)
,string i.email.body(4096))
{
DLLUsage
*************************************************
* Author : Benito
* Date : 08/29/2014
* Description : This DLL sends email with or without attachment, leave blank if none
* args -
* 1)
**************************************************
EndDLLUsage

string command.string(4096)

| create temp file for email body
bodyname = creat.tmp.file$(bse.tmp.dir$())

if isspace(i.attachment) then
command.string = "-s " & quoted.string(i.str.subject) & " -r " & i.email.addr.fr & " " & i.email.addr.to
else
command.string = "-s " & quoted.string(i.str.subject) & " -a " & i.attachment & " -r " & i.email.addr.fr & " " & i.email.addr.to
endif

| write email body
fp = seq.open(bodyname, "w")
seq.puts(i.email.body, fp)
seq.close(fp)

| send the email via unix 'mailx' command

ret = run.prog("mailx",
command.string,
RP_WAIT,
bodyname,
"",
"")

| remove email body file
seq.unlink(bodyname)
}

jojovalenton
19th October 2014, 08:00
hi,

thanks for the reply. i found out that session ttcmf0120m000 is not available in fp7 (see attachment), any idea what is the replacement of this session for fp7? bec i tried the sample script in the baan help for windows but its not working. i asked our mail admin guy he said there must be some parameters for mail server host, port, authentication (anonymous) and user/password like that or this must be set somewhere in the baan system and then it will just be referred to it during run time? this is just my first using this sending mail through baan script.

thanks,

jojo

benito
20th October 2014, 16:34
you might want to look at this discussion. try also looking at a windows utility called blat.

http://www.baanboard.com/baanboard/showthread.php?t=5769&highlight=email+windows

jojovalenton
21st October 2014, 07:42
hi,

thanks a lot benito for your useful ideas, i'll try to look into this.

regards,

jojo