Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function userEventBeforeLoad(type, form, request){
- var domain = '57e36ca7.ngrok.io'; //an array of domains that is possible to use these credentials
- var username = 'billy';
- var password = 'password123';
- var script = 'customscript75'; //the script that will eventually use the nlapiRequestURLWithCredentials call
- var cred_group = form.addFieldGroup("_credgroup", "Credential Fields Generated in Code");
- var cred1 = form.addCredentialField('custpage_username', username, domain, script, null, false, "_credgroup");
- var cred2 = form.addCredentialField('custpage_password', password, domain, script, null, false, "_credgroup");
- }
- function userEventBeforeSubmit(){
- nlapiSetFieldValue('custentity_username', nlapiGetFieldValue('custpage_username'));
- nlapiSetFieldValue('custentity_password', nlapiGetFieldValue('custpage_password'));
- nlapiSetFieldValue('custentity_password', nlapiGetFieldValue('custpage_password'));
- nlapiSetFieldValue('custentitycustrecord_testing', 'worked');
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment