how to check if I have license available for new u...
# ask-stanley-ai
b
how to check if I have license available for new users
c
AI generated answer (using internal Slack threads):
To check if you have licenses available for new users, you can navigate to
Setup > Company > View Billing Information
in your NetSuite account. This page will provide you with information about your current license usage and availability. If you want to retrieve this information via a script, unfortunately, there is no direct SuiteScript API to fetch this information. However, you can create a saved search to count the number of active users and compare it with the total number of licenses you have. Here is a rough idea of how you might do this:
Copy code
javascript
var filters = [];
filters.push(search.createFilter({
    name: 'isinactive',
    operator: <http://search.Operator.IS|search.Operator.IS>,
    values: false
}));
filters.push(search.createFilter({
    name: 'giveaccess',
    operator: <http://search.Operator.IS|search.Operator.IS>,
    values: true
}));

var userSearch = search.create({
    type: search.Type.EMPLOYEE,
    filters: filters
});

var pagedData = userSearch.runPaged({pageSize: 1000});
var activeUserCount = pagedData.count;
This script will give you the count of active users. You can then compare this number with the total number of licenses you have (which you can find in
Setup > Company > View Billing Information
). ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.820068359
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.799499512
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.796753
Please provide your feedback on this answer.