주 컨텐츠로 이동
Adaptive Planning
최종 업데이트: 2023-06-23
testConnection

testConnection

이 CCDS 시작 스크립트는 사용 사례에 맞게 JavaScript 개발자가 수정해야 합니다. 수정하지 않으면 작동하지 않습니다.
아래 코드블록을 SAGE Intacct CCDS에 스크립트로 저장하고 이름을 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 }