Hi,
I am Using Nav 2009 Sp1 & and SMS vendor.
The message is going fine when i am hardcoding the Phone No. in the Hyperlink
I am using the following code:
// Hyperlink Code Start ->
CREATE(mxh);
mxh.open('GET',
'
http://api.unicel.in/SendSMS/sendmsg.php?uname=UserName&pass=Password&send=NAPLTO&dest=9999999999&msg='
+M1+M2+M3+M4,FALSE);
mxh.send("var");
"var" := mxh.responseStream;
CLEAR(mxh);
is := "var";
mbt.READ(is);
ci.Picture.CREATEOUTSTREAM(os);
mbt.WRITE(os);
ci.Picture.EXPORT('c:\result.txt',FALSE);
// Hyperlink Code Stop <-
The issue is:
1. On Hardcoding the Phone No., the Message is going fine, but the requirement is dynamic, i need to get the Phone No. from Employee Card, as per his/her Birthday, and it must send a Birthday Wishes Message.
2. On Compiling It shows a Warning "Function 'EXPORT' is obsolete for Microsoft Dynamics NAV Server."
I tried taking the Phone No. of the Employee in a variable and passing it to the Link, but it didn't, it shows the error in error file as Invalid Destination Number.
Answers
I used:
'http://api.unicel.in/SendSMS/sendmsg.php?uname=Username&pass=Pwd&send=NAPLoTD'+'&dest='+ PhoneNo +'&msg='
+M1+M2+M3+M4,FALSE);
and it worked