Saltar al contenido principal
Adaptive Planning
Última actualización: 2023-06-23
testConnection

testConnection

Un desarrollador de JavaScript debe modificar esta secuencia de comandos de inicio de CCDS para su caso de uso. No funcionará sin modificaciones.
Guarde el siguiente bloque de código como secuencia de comandos en su SAGE Intacct CCDS y asígnele el nombre testConnection.
function testConnection(context) { //Get values from designer settings, and set other variables needed for Intacct API calls var dataSource = context.getDataSource(); var userID = dataSource.getSetting('Intacct UserID').getValue(); var userPassword = dataSource.getSetting('Intacct Password').getValue(); var companyId = dataSource.getSetting('Company ID').getValue(); var senderId = dataSource.getSetting('Sender ID').getValue(); var senderPassword = dataSource.getSetting('Sender Password').getValue(); var intacctURL = dataSource.getSetting('Intacct URL').getValue(); var authenticationRequest = '<request><control><senderid>' + senderId + '</senderid><password>' + senderPassword + '</password>' + '<controlid>AdaptiveTestConnection</controlid><dtdversion>3.0</dtdversion></control>' + '<operation><authentication><login><userid>' + userID + '</userid><companyid>' + companyId + '</companyid>' + '<password>' + userPassword + '</password></login></authentication></operation></request>'; var result = sendAndGetXML_Intacct(intacctURL,authenticationRequest); return result !== false; //result is an object or false, need to return a boolean value }