Comments (5)
What is the JSON used to generate this structure?
from intacct-api.
customfields: [{
customfield: {
customfieldname: 'DELIVERY_UNITS',
customfieldvalue: 'impressions'
}
},
{
customfield: {
customfieldname: 'DELIVERY_AMOUNT',
customfieldvalue: '1000'
}
}
]
from intacct-api.
What do you get if you try this:
customfields: [{
customfield: [{
customfieldname: 'DELIVERY_UNITS',
customfieldvalue: 'impressions'
},
{
customfieldname: 'DELIVERY_AMOUNT',
customfieldvalue: '1000'
}
]
}]
from intacct-api.
from intacct-api.
Maybe you have changes locally because I did a fresh install from NPM with this script and got the right output:
const intacctAPI = require('intacct-api');
const xmlbuilder = require('xmlbuilder');
const cid1 = new intacctAPI.ControlFunction('create_invoice', {
customerid: 'C99999',
datecreated: {
year: '2019',
month: '04',
day: '12',
},
invoiceitems: [{
lineitem: {
accountlabel: '4000',
amount: '99999.99',
customfields: [{
customfield: [{
customfieldname: 'DELIVERY_UNITS',
customfieldvalue: 'impressions'
}, {
customfieldname: 'DELIVERY_AMOUNT',
customfieldvalue: '1000'
}]
}],
projectid: 'IP99999999'
}
}]
});
const root = xmlbuilder.create('request', {
version: '1.0',
encoding: 'UTF-8',
standalone: true
});
console.log(cid1.toXML(root).toString());
and got this output:
<function controlid="7c1a36e0-6778-11e9-9269-81b11967ec15">
<create_invoice>
<customerid>C99999</customerid>
<datecreated>
<year>2019</year>
<month>04</month>
<day>12</day>
</datecreated>
<invoiceitems>
<lineitem>
<accountlabel>4000</accountlabel>
<amount>99999.99</amount>
<customfields>
<customfield>
<customfieldname>DELIVERY_UNITS</customfieldname>
<customfieldvalue>impressions</customfieldvalue>
</customfield>
<customfield>
<customfieldname>DELIVERY_AMOUNT</customfieldname>
<customfieldvalue>1000</customfieldvalue>
</customfield>
</customfields>
<projectid>IP99999999</projectid>
</lineitem>
</invoiceitems>
</create_invoice>
</function>
from intacct-api.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intacct-api.