Help - Am unable to commit the eliminate line in t...
# suitescript
m
Help - Am unable to commit the eliminate line in the Adv Inter company Journal create using suitescript 2.0, Error: Please enter value(s) for: Subsidiary, Account
c
Share your code. The error seems quite clear
m
Copy code
rec.setCurrentSublistValue({
    sublistId: 'line',
    fieldId: 'subsidiary',
    value: toSubsidiary
});
rec.setCurrentSublistValue({
    sublistId: 'line',
    fieldId: 'account',
    value: toCreditAccount
});
Copy code
rec.commitLine({
    sublistId: 'line'
});
errors on commit line
{"type":"error.SuiteScriptError","name":"USER_ERROR","message":"Please enter value(s) for: Subsidiary, Account","stack":["<anonymous>(N/record/recordService.js)"
b
inspect an existing record to see what the internal ids are
m
they have correct internalids, the values am setting is for eliminate line
c
Pretty sure it's
linesubsidiary
on an intercompany journal, and
debit
/
credit
rather than
amount
l
ah
b
inspect an existing record anyways
you are more interested in the field ids than the values
m
updating to linesubsidiary, and checking it
👏 @CD @battk you rock.. This worked. Thank you! i can now move to the next steps... awesome..