when creating a Location through the rest api, how...
# ask-stanley-ai
l
when creating a Location through the rest api, how can you set the location to be available to all children subsidiaries
c
AI generated answer (using internal Slack threads):
When creating a Location through the REST API and setting it to be available to all children subsidiaries, you need to set the
subsidiary
field in the request body. However, it seems like you're encountering an error with setting the
subsidiary
field. This could be due to the specific way NetSuite handles references to other objects in the REST API. In your case, you're trying to set the
subsidiary
field like this:
Copy code
subsidiary: {
    items: [{ id: "2" }]
}
This is resulting in an error. It's important to note that the
subsidiary
field in the Location record is a reference to a Subsidiary record. Therefore, you need to have the necessary permissions on the Subsidiaries table as well. However, it's also worth noting that the Location record in NetSuite does not support multiple subsidiaries. If you need to associate a location with multiple subsidiaries, you would need to create multiple location records, one for each subsidiary. ****** 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.841507375
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.83055675
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825385928
Please provide your feedback on this answer.