NetSuite Countries With States In Addresses - netsuite

NetSuite, out of the box, comes with the knowledge that several countries - the US, China, Australia, etc. - have states/provinces. In the standard Address form, if you chose one of those countries, rather than giving you a free-form text field in which to enter the state, it gives you a list of the states it knows about based on the country.
You can add to the list of states in a given country via Setup=>Company=>States/Provinces/Counties. If you add a state to one of the countries that NetSuite knows have states, it'll appear in the list of states for that country when you choose the country in the standard Address form.
In the same place at Setup=>Company=>States/Provinces/Counties you can add a new country and specify its states, just like it comes out of the box with US, China, etc. But when you do that and then, in the standard Address form, select that new country, it doesn't give you the list of that country's states - it just gives you the standard free-form text field. But we want it to show the list of states in that country and prevent free-form entry, just like it does out of the box with, say, the US?
My question is - how do I tell NetSuite to use the defined states for the new country in the Address form and not allow free-form text entry?

This is what I observed in my test account: if there is only state/province defined for the country, the free-form entry is still shown in the address form. If there are at least two states, the dropdown is shown.

Related

How can I get suggested 'List' with venues for specific city

There is endpoint for fetching customer's lists https://developer.foursquare.com/docs/users/lists
Is there way to specify city name (location) to choose customer's lists for specific place
You can provide a specific place and see what lists that place appears on here https://developer.foursquare.com/docs/venues/listed

WHERE statement to display contacts on sidebar

I have multiple product pages (same page template), and each page is supposed to have different sales rep contacts on the sidebar. I set up the sidebar contact box as a repeater to pull data/filter data from a SalesRep page type. The SalesRep page type has a field called ContactForPage; and my plan is to put in a string from the product page URL, so that if the string match the page URL, the contact will be displayed on the sidebar for that page.
Example:
Current page url is: www.domain.com/products/product-123
John Doe has ContactForPage = product-abc
Jane Doe has ContactForPage = product-123
Jane Doe will be displayed as contact because the field value matched part of the URL.
I've been trying to write the WHERE statement but don't really know the syntax. Could you help!
Something like: WHERE: SalesRep.ContactForPage LIKE '%CurrentDocument.NodeAliasPath%'
Fist of all using URL as in SQL query is not a good idea. You have to define relation between sales reps and products correctly. Probably one sales reps might be selling TV, the other - cellphones. But if you want to directly connect product to sales man. You can use Related Pages and relationship structure.
Create new Relationship name, i.e. "is Salesman of Product" so
Page A (saleman page) will be related to Page B (product page) via the relationship above
Add related pages, i.e. for all salesmen pages add corresponding products via API or via properties > related pages
Use web RelatedPages web part to shows salesmen list on the right
I see a problem in your design. I assume a sales rep may mange multiple products, correct? If that's the case, you should add a field to the Product pagetype which allows you to select the sales rep instead of the add a field to the SalesRep pagetype, because how will you enter multiple products?
The field (e.g. SalesRepID) you add to the Product PageType can be a drop down list for select the sale rep. You can use Query to auto generate the list from the SaleRep page type. e.g. "SELECT RepID, RepName FROM custom_SalesRep". The RepID would be stored in the SalesRepID field.
For display, you can use the repeater set for SalesRep pagetype and use WHERE condition like this:
RepID = {% CurrentDocument.GetValue("SalesRepID") %}
The Relationship is working both ways. You can have multiple documents related one and vice versa, i.e. one product can be sold by many salesmen and one salesman can sell different products. You just need to define one relationship. If you have a relationship between "Product A" Page and "Salesman John" Page, you will see this relation on both pages in properties > related page.
All I am saying is this: you do not need to add extra fields to your page types (either salesman or product), you should use relationship instead.
Read here Displaying related documents.

How to create a sharepoint list column that links to another list that is editable

I'm not sure if the title is a proper descriptor of what I'm trying to achieve here, hopefully it's close enough. I'm not a SharePoint expert, but I'm comfortable with creating forms and workflows as necessary to get something like this to work.
Basically, I need to have two separate SharePoint lists that are linked together, but one list needs to have row level security to hide data from other users that shouldn't see it. I need the column that is being linked to be an editable text box though, rather than a simple lookup field.
For example:
List A
Customer (text)
Description (text)
Sales People (person, multiple selections allowed)
Expenses (linked field)
List B
Customer (text)
Expenses (number)
Created by (just a reference that the sales people would actually "create" each row here)
Essentially, multiple people can be assigned to a customer in list a. The "sales people" are assigned by another user who actually creates the item for list a. I need to be able to have the people who are assigned as "sales people" to have a text box where they can enter their expenses, but on an individual basis, that would then be stored in list b with row level permissions to prevent them from seeing each others expenses totals.
List B would be able to show each sales person their full list of expenses across all the customers they are connected to, but not be able to see each others expenses. It's not a problem if the person creating the item for List A ends up with items in List B that are 0, but I need to be able to have the Expense field be an editable text box from a form that allows the sales people to enter their total expenses for that customer.
If I was building a custom application, this wouldn't be difficult to do, but I can't for the life of me figure out how to do this in SharePoint, or if it is even possible.
This is possible, but it will require custom development, using the SharePoint Object Model. Create your two lists and then you can either create a javascript/HTML based solution using libaries like jQuery and SPServices, or you can create a custom web part and use C# to update the lists. There's lot of examples out on the internet on how to do this. Write some code, and bring any problems you have with the code back to StackOverflow.

Dynamic columns based on rows

What I am doing might be really stupid, if so, please correct me, but I am trying to do the following thing:
I want to have a list with (for example) the following items:
List Addresses
-Name
-Address
-City
-Country
But, based on their Country, I want to display different columns that I want to record in a List. For instance:
CountryColumns
(United States - SSN - Yes)
(United States - State - Yes)
(United States - Province - No)
(United Kingdom - SSN - No)
(United Kingdom - State - No)
(United Kingdom - Province - Yes)
And then when the user picks United States in the country list, the next time the user edits his information, certain columns will be shown. (It's also possible that all will be shown, and that the next time the columns with No will be hidden).
I've looked at ways to do this, and I only found out that Infopath is able to do this. But, that'd mean I would have to create a different view for every country, and show / hide certain columns. It seems like that is a bit of overkill.
Anyone knows a way how to do this?
Greetings,
Mats
Here are three options:
Custom content types. This is probably the most SharePoint-y way to do it. You can create a content type for each Country and then control which fields are included in that content type. The obvious downsides to this are that you could end up creating a lot of content types and also that selecting a content type (especially when creating a new item) is not the same as selecting a choice from a dropdown list.
Javascript/jQuery. Either by changing your master page or by adding a Content Editor Web Part to your Edit Form, you could use javascript to hide certain fields based on the selected value of Country.
Custom fields. This is the most involved, but instead of having the SSN field be a regular Single Line of Text field, you could create a custom field that inherits from SPFieldText and then manages its render visibility based on the selected value of Country.
There are four ways you could modify SharePoint to do this that come to mind.
Have a list address content type and then a separate content type for each country that requires extra fields. Use a webpart to enter data to the list using the correct country's content type.
Same as above but instead of entering data through a web part, you can add the data into the list using the base address content type. Use an item adding event receiver to decide which content type to add the data to.
Use one super content type that includes all fields but with custom list view pages to filter the fields based on the county value.
Use infopath with either separate views for each country or a section for each special field with a condition to hide it if the required country isn't selected.
Personally I would recommend 4. It's the simplest and quickest to implement.
You cannot do this out of the box.

Sharepoint: Person column in custom list

I have a Person field in my custom list. I want to have a view that will show multiple fields from that Person instead of the one I had to choose when creating the Person column.
So basically I want to have one column for Person and then in the view see Name, title, email, phone. All of those are valid choices but I can only pick one right now.
I really want to avoid typing in the username lookup for each column I choose to display.
This is SP 2007
It sounds like you need to create a custom fieldtype (with a fieldcontrol) that inherits from the userfield but in viewmode renders out the different columns you need. Is that something along the lines you are looking for?
http://www.sharepointblogs.com/nicksevens/archive/2007/08/31/create-custom-field-types-for-sharepoint.aspx
Note: This link is broken
You probably want a Computed Field. Note that this is not a Calculated Column. A Computed Field is what is used to display the same data is different ways. In SharePoint there is a Title field, but there is also a "Title (linked to item with edit menu)" computed field as well as a "Title (linked to item)" computed field.
See midway down this link for more details. I'm not sure if it will have all of the power that you need, but if it does it is almost certainly what you are looking for if you don't mind getting into the Schema XML file a little.
Could you use a DataView web part for this? If it's just a question of viewing the data that might be suitable.
Came across this thread and thought I'd add a tip. This suggestion is clearly not for every use case, but may work well in situations where you're managing a list rather than allowing manual inputs (verified to work with SP 2013):
Create a spreadsheet with columns to match your SharePoint list that contains multiple profile fields. (for example: name, phone number, email address)
In the spreadsheet, enter the same email address in all of the person/group field types in that row. (e.g., boss#company.com, boss#company.com, boss#company.com)
Select and copy the row(s) you wish to transfer to SharePoint.
In SharePoint, change the list view to "Quick Edit" and paste the row(s) into the grid.
SharePoint will process each field and convert the email address to the profile value you selected during the list setup.

Resources