Guest User

Untitled

a guest
Mar 13th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. function userEventBeforeLoad(type, form, request){
  2. var domain = '57e36ca7.ngrok.io'; //an array of domains that is possible to use these credentials
  3. var username = 'billy';
  4. var password = 'password123';
  5. var script = 'customscript75'; //the script that will eventually use the nlapiRequestURLWithCredentials call
  6. var cred_group = form.addFieldGroup("_credgroup", "Credential Fields Generated in Code");
  7. var cred1 = form.addCredentialField('custpage_username', username, domain, script, null, false, "_credgroup");
  8. var cred2 = form.addCredentialField('custpage_password', password, domain, script, null, false, "_credgroup");
  9. }
  10.  
  11. function userEventBeforeSubmit(){
  12. nlapiSetFieldValue('custentity_username', nlapiGetFieldValue('custpage_username'));
  13. nlapiSetFieldValue('custentity_password', nlapiGetFieldValue('custpage_password'));
  14. nlapiSetFieldValue('custentity_password', nlapiGetFieldValue('custpage_password'));
  15. nlapiSetFieldValue('custentitycustrecord_testing', 'worked');
  16. return true;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment