We are trying to have our customers manage their email preferences in one place. It happens that this one place is a DNN site. We want to recreate the communication preferences link and frame that in the DNN site. That way no matter how they get to the page (email or the customer facing site) the preferences are the same. Less confusing that way.
So, to that end I made a suitelet that takes in a couple of custom parameters. One for the email and one for the customers internal id, both of which we have in the DNN site. Now, through trial and error we have come to the conclusion that the 'h' paramenter in the communications preference link is encrypted. We assumed it was the email for the user. Unless I am doing something wrong it is not the email. I get a very different string with nlapiEncrypt than I seeing in the URL. Here is my code:
if (request.getMethod() == 'GET') { //null check on the required parameter if (request.getParameter('custparam_email') && request.getParameter('custparam_id') != null) { var stEmail = request.getParameter('custparam_email'); var stId = request.getParameter('custparam_id'); response.write(stEmail + '<br />'); var stEncryptEmail = nlapiEncrypt(stEmail); response.write(stEncryptEmail); } } I am calling it with: /app/site/hosting/scriptlet.nl?script=138&deploy=1&compid=1062913&h=9f1a87cb66af70d34746&custparam_email=CONTACTEMAIL&custparam_id=CONTACTIDwhere CONTACTEMAIL and CONTACTID are, of course, the contacts email and id.This is the URL I am trying to build:/app/crm/marketing/campaignlistener.nl?__lstr=__su&c=1062913&__h=42687a4f6575031130ca&__e=CONTACTID&__oi=mThe two strings:Netsuite generated - 42687a4f6575031130castEncryptEmail - 770a9a16ef4b70985d20ec14741c95a9dd6a0fbI have tried encrypting the user's id's (internl and external) and no luck. Can anyone tell me what I am doing wrong?Thanks