John-Paul Jorissen
03/13/2019, 3:33 PMform.addCredentialField
method for use with nlapi.nlapiRequestURLWithCredentials
.John-Paul Jorissen
03/13/2019, 3:33 PMJohn-Paul Jorissen
03/13/2019, 3:35 PMnlapiRequestURLWithCredential
1. Two custom fields with username and passwords are added to a form:
var credField = form.addCredentialField('custpage_credname', 'password', null, valueFromCustomField, '<http://cert.merchante-solutions.com|cert.merchante-solutions.com>', 'customscript_usecredentialfield');
var usrfield = form.addCredentialField('custpage_username', 'username', null, valuefromusernamecustfield, '<http://cert.merchante-solutions.com|cert.merchante-solutions.com>', 'customscript_usecredentialfield')
John-Paul Jorissen
03/13/2019, 3:35 PMvar credValue = nlapiGetFieldValue('custpage_credname');var username = nlapiGetFieldValue('custpage_username');nlapiSetFieldValue('custentity_custompassword', credValue);nlapiSetFieldValue('custentity_customusername', username);
John-Paul Jorissen
03/13/2019, 3:37 PMbattk
03/13/2019, 3:39 PMbattk
03/13/2019, 3:40 PMJohn-Paul Jorissen
03/13/2019, 3:41 PMbattk
03/13/2019, 3:42 PMJohn-Paul Jorissen
03/13/2019, 3:44 PMJohn-Paul Jorissen
03/13/2019, 3:45 PMnlapiGetFieldValue('custpage_credname')
on the vendor pageJohn-Paul Jorissen
03/13/2019, 3:45 PMbattk
03/13/2019, 3:53 PMJohn-Paul Jorissen
03/13/2019, 3:55 PMJohn-Paul Jorissen
03/13/2019, 3:57 PMbattk
03/13/2019, 4:01 PMbattk
03/13/2019, 4:01 PMJohn-Paul Jorissen
03/13/2019, 4:02 PMbattk
03/13/2019, 4:03 PMbattk
03/13/2019, 4:03 PMJohn-Paul Jorissen
03/13/2019, 4:03 PMbattk
03/13/2019, 4:04 PMJohn-Paul Jorissen
03/13/2019, 4:04 PMJohn-Paul Jorissen
03/13/2019, 4:06 PMbattk
03/13/2019, 4:06 PMbattk
03/13/2019, 4:07 PMJohn-Paul Jorissen
03/13/2019, 4:07 PMJohn-Paul Jorissen
03/13/2019, 4:08 PMbattk
03/13/2019, 4:08 PMbattk
03/13/2019, 4:09 PMbattk
03/13/2019, 4:10 PMJohn-Paul Jorissen
03/13/2019, 4:11 PMJohn-Paul Jorissen
03/13/2019, 4:35 PMJS_EXCEPTION ReferenceError nlapiRequestURLWithCredentials is not defined
John-Paul Jorissen
03/13/2019, 4:36 PMJohn-Paul Jorissen
03/13/2019, 4:47 PMnlapiRequestURLWithCredentials
in after submit user event?