user = DB[key == zoho.loginuser];
input.userkey=zoho.loginuser;
input.PIN=((zoho.currenttime.toLong() % 1000000)).toString();
zid = insert into PTO_PIN
[
Added_User = zoho.adminuser
Claimed = "Yes"
parentname = user.p1n
parentphone = user.p1p
PIN = input.PIN
school = "Niskayuna High School"
useremail = zoho.loginuserid
userkey = zoho.loginuser
];
success message "Thankyou for paying dues to the Niskayuna High School PTO";
Note: I ran this outside the sandbox for a real world test. The application's payment form was shared to the user.
1) The success message was not displayed and the form simply reloaded - should I use openurl to redirtice to a success page?
2) zoho.loginuser resulted in a
number, not an actual username. However zoho.loginuserid did give the correct email
Please comment on this.
Cheers,
John Whitney