Saved search in customer center on tab

If you are using the NetSuite customer center or My Account if you are using Ecommerce, you have the ability to post different search results to customers. If you wanted to have a list of items that will be discontinued,

you can mark the items using a custom field and then using the inventory levels, you can create a search that is looking for all items discontinued (checkbox == T) that has inventory > 0. When the item officially has 0 stock, it will be removed from the list. If you wanted to make this available to wholesalers only or a certain demographic, you can create a saved search looking for those criteria.

After that create a group. Assign that group to an audience driven web site tab (do not mark Display in WebSite).

On the audience tab, associate the group. Then publish your saved search to the web. When a customer in the group logs into the site or customer center, the tab will appear displaying the search results. It's a great way to create dynamic content for your customer base.

How to display search results for a Custom Record Type in NetSuite Customer Center

We've had several NetSuite customers ask us how to do the following:

Is there a way to display the results of a saved search for a custom record type in NetSuite Customer Center, and filter the search results so that the Customer Center user can only see his/her own custom records?

For example, one of our clients had set up custom records in NetSuite to store information about their customers' subscription information. Our client asked us if there was a way to display the subscription information in NetSuite Customer Center, so that when their customers logged in to Customer Center, they could view their own (and only their own) subscription information.

In order to come up with a solution, we had to research this quite a bit, including digging through the NetSuite user group, and ultimately investing in some trial and error. While we found that there were useful tips on how to do this in the user group posts, we could not find a concise set of steps to follow to do this, so we decided to publish some simple instructions that should work for most situations.

Note: There are probably many ways to do this. We've found two ways that have worked well for our customers, and we describe each method below. If you have any reasons for recommending one approach or the other, we'd love to hear your opinion.

Common Steps for Either Method

1. The Custom Record Type can be defined however you want, but it MUST include the following:
1. A Customer field (i.e., a custom field of Type List/Record-Customer), so that you can filter the custom record search results by Customer.
2. The "Use Permissions" checkbox must be checked
3. On the Permissions tab, select the Customer Center role(s) that you will assign to your Customer Center users, and give them at least "View" level access.
2. Create a saved search for your custom record type. This saved search can be defined however you want, but it MUST have the following Filter Criteria:
1. "<Customer field> is me" (i.e., "<Customer field> any of Mine")

Method 1: Using a Custom Center Tab

1. Navigate to Setup > Customization > Center Tabs > New to setup a new Custom Center Tab.
1. You can enter any text you want for the Label (this is the label that will appear for the custom tab in Customer Center), but MUST select Center = "Customer Center".
2. Under Content > Categories > Label, you can enter any name you want (this is the label that will appear for the category in your custom tab).
3. Under Content > Portlets > Type, you MUST select Type = "Links" and Show = "Yes".
4. Under Audience, make sure that the "Select All" checkbox is checked for the Roles list.
5. Save your new Custom Center tab.
2. Navigate to Setup > Customization > Center Tabs, and click on the NAME of the new Custom Center Tab that you just created (do NOT click on the "Edit" link; you want to view the Custom Center Tab that you just created).
1. Under Content > Categories, click on the "Edit" link for the Category that you created.
2. On the Custom Center Category page, select the Link for the saved search that you created in the Common Steps section above (i.e., the saved search that you want to display on Customer Center).
1. IMPORTANT: When you look in the Link list for your saved search, you will find 2 entries for your saved search with similar names. One entry in the list will have "Results" in the name, the other will not have "Results" in the name. (For example, if your saved search is called "Subscription Data", then you will see one entry in the Link list will be "Subscription Data", and the second entry will be "Subscription Data Results".) You MUST select the entry with "Results" in the name. The difference between these two entries is this: the link that does not have "Results" in the name (for example, "Subscription Data") takes you to the page where you edit the search itself; the link with "Results" in the name (for example, "Subscription Data Results") takes you to the page that shows the actual search results. Another way to look at this is like this: when you go to look at all of your Saved Searches in your normal NetSuite account, you always see two links next to each search. One link is called "Edit", which takes you to the page where you define what the search is. The second link is called "Results", which actually runs the search and takes you to a page that shows the results. The "Subscription Data" link is equivalent to the "Edit" link. The "Subscription Data Results" link is equivalent to the "Results" link.
3. Save your changes to the Custom Center Category.
3. Test this in Customer Center by logging in as one of your customers and verify the following:
1. You should see the new custom tab, category, and link you just created.
1. NOTE: If you don't see the new tab, category, and/or link, then you should hit CTRL-F5 to reload and re-cache each page in Customer Center so that you are sure that you are looking at the latest versions of the Customer Center pages.
2. When you click on the link, the search results should only display custom records associated with the customer that you are logged in as.

Method 2: Using a Published Saved Search

1. Navigate to Lists > Web Site > Tab > New > New Presentation Tab to create a new Web Site Tab where you can access your published saved search. (You could use an existing tab, but for instruction purposes, we'll create a new tab.) The new Presentation Tab can be set up however you want, but the setup MUST include the following:
1. The "Display in Web Site" checkbox should be unchecked (so that this new tab only shows up for your Customer Center users, and does not show up as a new tab on your website).
2. Under Roles, the "Select All" checkbox should be unchecked, and you MUST select the Customer Center role(s) that you will assign to your Customer Center users.
3. Save your changes to the new Presentation Tab.
2. Navigate to Lists > Web Site > Categories > New to create a new Site Category where you can put the published saved search. (You could use an existing site category, but for instruction purposes, we'll create a new site category.) The new Site Category can be set up however you want, but the setup MUST include the following:
1. Subcategory of = <the value corresponding to the new Presentation Tab you just created in Step 1>.
2. The "Display in Web Site" checkbox should be unchecked (so that this new site category only shows up for your Customer Center users, and does not show up on your website).
3. Under Audience > Roles, the "Select All" checkbox should be unchecked, and you MUST select the Customer Center role(s) that you will assign to your Customer Center users.
4. ave your changes to the new Presentation Tab.
3. Navigate to Lists > Web Site > Publish Saved Search > New to create a new Published Saved Search. This Published Saved Search MUST have the following settings:
1. Search = <the name of the saved search you created in the Common Steps section above>
2. Subcategory of = <the value corresponding to the new Site Category you just created in Step 2>
3. "Display in Web Site" checkbox should be unchecked (so that this new published saved search only shows up for your Customer Center users, and does not show up on your website).
4. Under Audience > Roles, the "Select All" checkbox should be unchecked, and you MUST select the Customer Center role(s) that you will assign to your Customer Center users.
5. Save your changes to the new Published Saved Search.
4. Test this in Customer Center by logging in as one of your customers and verify the following:
1. You should see the new custom tab, category, and published saved search you just created.
1. NOTE: If you don't see the new tab, category, and/or published saved search, then you should hit CTRL-F5 to reload and re-cache each page in Customer Center so that you are sure that you are looking at the latest versions of the Customer Center pages.
2. When you click on the link for the published saved search, the search results should only display custom records associated with the customer that you are logged in as.

I hope this helps.

原文地址:https://www.cnblogs.com/backuper/p/1685697.html