I am accessing the Netsuite using RESTlet by Oauth token. I could get a contact, customer, and other details. Now I want to get profile [acccount holder] details like my first name, last name, mail id, role, and so on.
What is the record type should i use to get above mentioned details?
Or what alternate code should use to get the details?
It depends on type of user, mostly you would need to query
employee
, it has all the details. when querying/searching you may want to add filter that ['giveacess', 'is', 'T'] as you only want to query users with login access.
Other types of users can be customers, partners and vendors
These users can have access to their portals, eg: customer has access to customer portal, vendor to vendor portal and partner to partner portal.
For details on fields available to query , I suggest you to check record browser link
Related
I'm currently building an integration with Netsuite using the Suitetalk REST API. I would like to retrieve the role of each contact associated with a customer to find the Primary and Operational contacts of the customer.
I have tried querying the customer endpoint:
record/v1/customer/ {customerId} /contact/ {contactId} /contactrole
This query returns Role id 14 which is 'Customer Center' for all customer contact records. This is obviously incorrect as this information is returned for contacts tagged with different roles when I check them via the UI.
I have also tried using Suiteql using the query endpoint with the similar results.
Is the query incorrect or should I be using a different endpoint? I have been stuck for days, so I would appreciate any suggestion.
A long comment. Hopefully it helps focus your search for a solution.
Contact Roles is the subrecord for contacts who have login access to a customer's account. The role listed there is the access role. Customer Center is the default access role in a vanilla Netsuite account.
The Records Catalog has contactList as the joining table for contact to company. I don't see any mention of role there that would correspond to contactrole in the records browser so it appears some documenation is missing.
You'll likely have to play with the SuiteQL queries feature to get this.
See Executing SuiteQL Queries Through REST Web Services in the NS help.
with suiteql you can get primary contact with this
{ "q": "select cus.companyname,cus.contact,cont.entityid from customer cus left outer join contact cont on cus.contact=cont.id where cus.id=<<id of ur customer>>"}
I'm using the Graph API to pull down information about a specific user in my organization. This works great, however one piece of information I need is the users "Security Groups" from their Active Directory account.
I use the following URL to request the Graph API information for a given Active Directory objectID.
https://graph.windows.net/[domain]/users/[objectID]?api-version=1.5
This gives me an JSON result that contains the users information such as their Department, jobTitle, userPrincipalName, etc.
How can I also request the users Security Group memberships? Is this possible?
They are available on the memberOf navigation property. So you can make a call to this:
https://graph.windows.net/[domain]/users/[objectID]/memberOf?api-version=1.5
User entity documentation
We are using Google for corporate since last 5 years. There have been many dozens google groups created by different site/business division/local administrators. Now we need to know, for each employee, which all groups he is a part of. Does google provide any API to fetch this details ?
Yes. The Directory API has a function to Retrieve all groups for a domain or the account. Here's a part in the docs that I think is what you are specifically aiming for:
All groups for the account — Use the customer argument with either my_customer or the account's customerId value. As an account administrator, use the string my_customer to represent your account's customerId. If you are a reseller accessing a resold customer's account, use the resold account's customerId. For the customerId value use the account's primary domain name in the Retrieve all users in a domain operation's request. The resulting response has the customerId value.
I am new to Netsuite.
While creating accounts on Netsuite, I found that i can create multiple accounts with same email ID (Netsuite does not check whether the email id is unique or not).
Is there any specific scenario where creating multiple accounts with same email ID will be useful in Netsuite ?
You can associate one email address to multiple Netsuite account. When you login it will redirect you to a window where you can select the account where you want to use the existing login session.
No, It doesnt add or make any advantages to administration at all. You SHOULD NOT associate two separate employees with the same Email ID. Besides, when you set the same email to be associated across different places, it will force logout the current user when the next user attempts to login.
Advantage for the user for sure as they have access to all the roles associated to employee, customer, and partner records associated to their email address. Definitely no advantage for NS administration. If you are looking to do scalable things for implementation, then you need to do mass updates within netsuite across entities...don't try to use a single email placeholder as a shortcut for users or access as this gets derailed by the logout mechanism I mentioned above. If you absolutely need multiple users to have access, you could do something like a limited partner or customer center role to an employee that can act as a parent for all assigned customers within their territory...but that basically is manipulating the system to work differently than intended and could be considered a violation of NS TOS...I would suggest to avoid this as it could mean they could shut off your account and access to your customization.
I'm looking to get check-in data that includes user ID, place and time information, from Foursquare users that have public accounts. What is the best way to do this that doesn't require each user's authentication? Thanks.
I'm afraid that's just not possible using the API. In order to access checkin information a user must authenticate with your app.
If you don't need specific users, you can search Twitter for Foursquare checkins published there and then scrape the linked checkin pages for the user ID, place and time information.