Aly
03/10/2025, 11:01 PMCeligo AI
03/10/2025, 11:01 PMAI generated answer (using internal Slack threads):The issue you're experiencing, where contacts are not showing under the relationships subtab, is likely due to the fact that static list type sublists, such as 'contacts', do not have SuiteScript support. This means that even though the 'contacts' sublist exists on the record, SuiteScript is unable to access it, which is why
record.getLineCount('contacts')
is always returning 0.
However, there is a workaround to this issue. You can create a Contact search and use the Transaction join to display all the contacts associated with a transaction. Here is a sample SuiteScript 1.0 code that demonstrates this:
javascript
var contactSearch = nlapiSearchRecord("contact",null,
[
["transaction.internalidnumber","equalto","8337"]
],
[
new nlobjSearchColumn("entityid").setSort(false),
new nlobjSearchColumn("email"),
new nlobjSearchColumn("phone"),
new nlobjSearchColumn("altphone"),
new nlobjSearchColumn("fax"),
new nlobjSearchColumn("company"),
new nlobjSearchColumn("altemail"),
new nlobjSearchColumn("internalid","transaction",null),
new nlobjSearchColumn("tranid","transaction",null),
new nlobjSearchColumn("recordtype","transaction",null),
new nlobjSearchColumn("type","transaction",null)
]
);
This code creates a search on the 'contact' record type, with a filter that matches the internal ID of the transaction to '8337'. It then returns a list of columns from the contact and transaction records.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
03/10/2025, 11:01 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.847426414
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.81618
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.810275435
Celigo AI
03/10/2025, 11:01 PM