Hi, I am using the records <browser> to try to fin...
# beginners
e
Hi, I am using the records browser to try to find the correct way of finding all subscriptions for a company. I think that the
sublistId
is subscriptions, but how do I know what the
fieldID
is?
Copy code
const invObj = objRecord.getSublistSubrecord({
       sublistId: 'subscriptions',
       fieldId: 'something',
       line: 0,
    });
b
the record browser documents the 3 sublist fields you have access to
e
Is this it?
b
you should go through Understanding Subrecords to know what a subrecord is so you know when to use subrecord related methods
👍 1
e
@battk What I dont understand is where do I find information about sublists and their content? If I list all sublist for the customer record:
Copy code
const objRecord = record.load({
        type: record.Type.CUSTOMER,
        id: 23059,
    });
    log.debug(objRecord.getSublists());
I dont see subscriptions, but in the records browser I do see it
b
that should show it
do you actually have a subscriptions sublist on your customer?
e
Well the customer has subscriptions in the subscription tab
b
thats not the native subscription sublist
e
Ok, so I am looking for a custom name then
b
kinda depends on the sublist type while editing the record.
e
Ok, but it makes sense then why I did not find subscription sublist
b
depends on the features in the account
I believe the subscription sublist is related to subscription categories
otherwise there is only a single global subscription status
e
If I request a subscription record I get
The feature 'Subscription Billing' required to access this page is not enabled in this account
b
sounds like the wrong type of subscription
there is subscription billing, and campaign subscriptions
s
sounds like maybe this is a custom record(s)?
b
DT Contract Subscription is almost certainly a custom record type
s
so @Eystein Bye, don't expect these subscriptions to appear on any native sublists/subrecords. It's more likely that
DT Contact Subscription
has a field that points back to the customer, rather than the customer pointing to it. So try searching those custom records.
e
Ok, thanks