fkrauthan
09/07/2023, 6:37 PMconst vendorPayment = record.create({
type: record.Type.VENDOR_PAYMENT,
isDynamic: true,
defaultValues: {
entity: vendorId,
},
});
and populate the following fields in that order (based on the bill):
• subsidiary
• currency
• apacct
• department
• location
• class
• account
and then we try to select line items by leveraging:
const lineItem = vendorPayment.findSublistLineWithValue({
sublistId: "apply",
fieldId: "internalid",
value: billId,
});
which works perfectly. However we have one client with thousands of line items and somehow it sometimes does not find the line item (returns -1) is there a limit with that method or something else we are missing?battk
09/07/2023, 7:26 PMfkrauthan
09/07/2023, 7:27 PMEXPENSE_REPORT does it?battk
09/07/2023, 7:28 PMbattk
09/07/2023, 7:29 PMbattk
09/07/2023, 7:33 PMbill or vendorbills default valuefkrauthan
09/07/2023, 7:34 PMfkrauthan
09/07/2023, 7:35 PM/app/accounting/transactions/vendpymt.nl?entity=1032&bill=3751 is the URL in the web interface when hitting make payment on a expense report so I should be able to:
const vendorPayment = record.transform({
fromType: "EXPENSE_REPORT",
fromId: expenseReportId[0].billId,
toType: record.Type.VENDOR_PAYMENT,
isDynamic: true,
});fkrauthan
09/07/2023, 7:35 PMbattk
09/07/2023, 7:35 PMbattk
09/07/2023, 7:36 PMfkrauthan
09/07/2023, 7:36 PMbattk
09/07/2023, 7:37 PMfkrauthan
09/07/2023, 7:38 PMtransform for bill payments but I have to use create with ``defaultValues` for EXPENSE REPORTS?fkrauthan
09/07/2023, 7:38 PMbattk
09/07/2023, 7:40 PMbattk
09/07/2023, 7:40 PMbattk
09/07/2023, 7:51 PMfkrauthan
09/07/2023, 7:51 PMfkrauthan
09/07/2023, 7:51 PMfindSublistLineWithValue method can work with or is it more likely that some data was not set correctly which made that bill not show up at all on the sublist?battk
09/07/2023, 7:51 PMbattk
09/07/2023, 7:52 PMbattk
09/07/2023, 7:55 PMfindSublistLineWithValue fails at the sublist line limit, or when a sublist filter is usedfkrauthan
09/07/2023, 9:18 PMbattk
09/07/2023, 9:21 PMfkrauthan
09/07/2023, 9:21 PMfkrauthan
09/07/2023, 9:21 PM