Is there a way to get number of records in a Data Extension using API? we tried to run data query get the counts data into a new DE, but how can we use API to call the query activity getting the counts data? thank you!
Thanks for your answer. Usually ,We use some program language such as C#, Node to excute the request, not send such soap message directly. When use FuelSDK-Node-SOAP to perform start action of the query activty. it will occur error. FuelSDK-Node-SOAP : http://salesforce-marketingcloud.github.io/FuelSDK-Node-SOAP/FuelSoap.html#perform
The code we excute:
const FuelSoap = require('fuel-soap');
var SOAPoptions = {
auth: {
clientId: '*********',
clientId: '*********'
},
soapEndpoint: 'https://webservice.exacttarget.com/Service.asmx'
};
var SoapClient = new FuelSoap(SOAPoptions);
var def = {
'CustomerKey': 'RecordCounts',
};
SoapClient.perform('QueryDefinition', def, function (err, response) {
if (err) {
console.log('Exception message:'+err.Message);
console.log('Exception code:' + err.code);
console.log('Exception stack:' +error.stack);
} else {
console.log(response.body.Results);
}
});
Below is the exception info :
e:\workspace\node_space\hello\node_9a2eda60b6df3.tmp:5
SoapClient.perform('QueryDefinition', def, function (err, response) {
^
ReferenceError: SoapClient is not defined
at Object.<anonymous> (e:\workspace\node_space\hello\node_9a2eda60b6df3.tmp:5:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
Do you know how to solve this question.