firstCommand with parameters??

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
crisg0112
Posts: 395
Joined: Fri Jan 31, 2014 3:45 am
Location: Melbourne, Australia

firstCommand with parameters??

Post by crisg0112 »

Hi,

I have a link that i sent out as part of an email message. The email basically just asks the user if he/she has paid the invoice already.

So I would need to pass the invoice number as a parameter so I know which record to update in the database

The user guide doesn't really say much on how to pass a parameter using the firstCommand option.

is this possible?
Thanks in advance!

Cris
MSSQL 2008R2, Aware 7 b2146, IE11, , Firefox 35.0.1, Windows 8 Bootstrap theme
customaware
Posts: 2401
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: firstCommand with parameters??

Post by customaware »

Are you talking about clicking a link in the email and then sending something back to Aware Chris?

If so, I think it is not doable.

I tried to do it via a webservice from an email and could not get it to work and everything I read about it kept telling
me that indeed it should not be allowed as it creates a security breach.

From what I have seen is then only way is to send an email back to Aware with some code in the Subject line which
is read by Aware. That is doable but the problem is the reliance on the email recipient sending back the correct thing in
the subject line.

Alternatively is having a link in the email that will open a browser and login to the app with predefined credentials. This is
also doable but not recommended as it exposes the login details.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: firstCommand with parameters??

Post by tford »

You can build a URL, then encrypt it and send in an email. I will look up the BSV I have that is doing this and post it tomorrow.
Tom - V8.8 build 3137 - MySql / PostGres
customaware
Posts: 2401
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: firstCommand with parameters??

Post by customaware »

Oh, I would like to see that Tom. ;-)
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: firstCommand with parameters??

Post by tford »

I have a BO called GameAssignments that has this rule on it:

GameAssignments.Edit_Game_URL='http://domain.com:8080/AwareIM/logonOp. ... D+',main')

Note that I store a generic login name & password in SystemSettings to use in this encrypted link. If anyone can figure out a better way to do this part, I would love to hear it. In this case, the user that clicks on this link has only one option, so it's not a big deal. You'll notice that the VP that this link logs into is called EditOneGame_ViaLink which reflects the limitations.

Following is the line in an HTML email that sends the encrypted link to the user:

<b>Update link:</b> <a href="<<GameAssignments.Edit_Game_URL>>">Edit this game</a>
Tom - V8.8 build 3137 - MySql / PostGres
customaware
Posts: 2401
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: firstCommand with parameters??

Post by customaware »

Slick... I like it.

Thanx Tom.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: firstCommand with parameters??

Post by tford »

For some reason, I can't get the who link text to appear, so here it in in a photo:
game link 2.jpg
game link 2.jpg (74.93 KiB) Viewed 9624 times
Tom - V8.8 build 3137 - MySql / PostGres
yuri.rj
Posts: 223
Joined: Tue Jan 11, 2011 8:05 pm

Re: firstCommand with parameters??

Post by yuri.rj »

Tom
I use the user login and password
Can be the user that send the email or the one who will receive it...
Of course if it's someone that is not a regular user, i would need to do what you did...
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: firstCommand with parameters??

Post by tford »

I use the user login and password
Can be the user that send the email or the one who will receive it...
That's good to know. I will be trying that soon on another BSV that I'm writing.
Tom - V8.8 build 3137 - MySql / PostGres
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: firstCommand with parameters??

Post by tford »

I use the user login and password
Can be the user that send the email or the one who will receive it...
Implemented this in a BSV.

You can't use the normal Password attribute of a SystemUser. When calculating the encrypted link to send in an email, the password has to be from a Plain Text field.
Tom - V8.8 build 3137 - MySql / PostGres
Post Reply