NetSuite Saved Search for Kit/Package - How to include columns for each component and their quantity - netsuite

I am trying to create a Saved Search for Kit/Package records. Each Kit/Package includes two component SKUs. The desired result is to have a Saved Search that pulls in each component SKU into its own column. I would also like another column for each of the respective quantities.
I am using this Saved Search to create an Advanced PDF/HTML template. So, I cannot use a Saved Search that includes summary fields. Also, these items cannot be grouped in the Saved Search because I need to reference them separately in the Advanced PDF/HTML template.
EXAMPLE: Kit/Package SKU "XYZXYZ" includes 10 x "Component 1" and 1 x "Component 2". The Saved Search would include the following columns:
Kit/Package SKU
Component 1 SKU
Component 1 QTY
Component 2 SKU
Component 2 QTY
How can I accomplish my goal?

This can be done. Follow the steps below:
1) Create an Item saved search.
2) Use the following settings
Criteria: Type is Kit/Package
Result: Name
Result: Member Item (Or whatever you're using for SKU. Maybe Member Item Fields...Internal ID)
Result: Member Quantity
Available Filter: Name. Show in Filter : Yes
Save & Run
3) Create the Advanced HTML template. Use this code
<?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdf>
<head>
</head>
<body>
<table>
<tr>
<td>
<#list results as result>
<#if result_index==0>
Kit/Package SKU ${result.itemid} includes ${result.memberquantity} x ${result.memberitem}</#if>
<#if result_index==1> and ${result.memberquantity} x ${result.memberitem}
</#if>
</#list>
</td>
</tr>
</table>
</body>
</pdf>

This is currently not a feature supported by NetSuite. There is an enhancement request submitted for this feature.

Related

Filter dropdown list based on another dropdown list in userform

Thank you for viewing this request.
Details:
I have 2 lists: Category ID; Task ID.
There is a 1 to many relationship from Category ID --> Task ID, meaning that Task ID can be associated with only 1 Category ID; but, multiple Task IDs can share the same Category ID.
Category ID = Broader Description | Example: Continent: North America
Task ID = Granular Description | Example: Since North America was selected only Canada, 'Merica, and Mexico should populate, not the rest of the countries.
Question:
When creating a dropdown list in a user form, is it possible to for Country Dropdown list to be filtered based off of what was already selected in Continent dropdown list?
Images for Reference:
This is what I want it to look like but for user form in VBA

Is there a way to create a saved search to find the buildable quantity of assembly items that are back-ordered

We need to establish what assembly items can be built to meet existing demand, i.e. the items on back order. The results should only list the assemblies + volume that can be built based on the component items being available.
To show the Buildable Quantity of all Assembly/Bill Of Materials items that are currently on back-order:
Create a Item Saved Search as follows:
Criteria (Standard) Tab
Type ANY OF Assembly/Bill Of Materials
Inventory Location ANY OF - None - and <Your Location>
Member Item Fields > Inventory Location ANY OF - None - and <Your Location>
Member Item Fields > Type ANY OF Assembly/Bill Of Materials and Inventory Item
Criteria (Summary) Tab
Line 1
Type: Minimum
Field: Formula (Numeric)
Formula: GREATEST(FLOOR(NVL({memberitem.locationquantityonhand},0)/{memberquantity}),0)
Greater than 0
Line 2
Type: Minimum
Field: Location Back Ordered
Greater than 0
Results Tab
Internal ID (Summary type Group)
Name (Summary type Group)
Description (Summary type Group)
Inventory Location (Summary type Group)
Location Back Ordered (Summary type Group)
Formula (Numeric) (Summary type Minimum): GREATEST(FLOOR(NVL({memberitem.locationquantityonhand},0)/{memberquantity}),0)
Formula (Text) (Summary type Group): 'Build | Open'
Example of results:
NOTES
IMPORTANT: You may want to change locationquantityonhand to locationquantityavailable in the formulas used in both the Criteria (Summary) and Results tabs.
Doing so will change the result to only show how many assemblies can be built without using items that are already committed to other customer orders.
Clicking the "Build" link in the search results takes you straight to the Build Assembly page with the item and stock location pre-selected.
If you require work orders for your builds you can change the URL generated in the Formula (Text) field in the Results columns.
Clicking the "Open" link in the search results takes you to the Item Record.
BONUS
If you'd like to be able to build the assembly without leaving the search results page you can add a column directly after the Formula (Numeric) column (the buildable quantity) as follows:
Formula (Text) (Summary type Group): '<a target="_blank" href="#" onclick=''try { itemid='||{internalid}||'; loc='||{inventorylocation.internalid}||'; qty=this.closest("td").previousElementSibling.textContent; qty=prompt("How many would you like to build?",qty); if(qty>0) { this.textContent = "PROCESSING"; rec=nlapiTransformRecord("assemblyitem",itemid,"assemblybuild",{"quantity":qty,"location":loc}); id=nlapiSubmitRecord(rec); this.textContent = "BUILT "+qty; this.removeAttribute("onclick"); this.href = "/app/accounting/transactions/build.nl?id="+id; } } catch(e) { alert("ERROR: "+e.getCode()+": "+e.getDetails()); this.textContent = "ERROR"; } return false;''>Immediate</a>'
This will create a link that says "Immediate" which, when clicked, will prompt the user to enter a quantity and will then create a build for that amount and record it in the search results so you can see which ones you've done (clicking the new "BUILT (qty)" text after a completed build will take you to the newly created Assembly Build record.)

Macro to list all documents field value only select list

I am trying to list all items in a section of Kentico as a drop-down list but want only one field value to be returned for each document.
What I have tried
Lists Nothing:
Documents.WithAllData["/Foo/Bar/Bar"].AllChildren.WithAllData.All.GetValue("FooBar")
Lists all document information:
Documents.WithAllData["/Foo/Bar/Bar"].AllChildren
You'd use a macro similar to this:
<select id="ddlItems">
{% Documents["/Foo/Bar/Bar"].Children.WithAllData.ApplyTransformation("cms.event.transformationname") %}
</select>
To list out all your items. The transformation will then have your column information:
<option>{% FooBar %}</option>
**** UPDATE ****
Based on your comment, you can simply use a sql query (which a macro will run anyway). If you know what page type you want to query you can go directly to that page type's table:
SELECT Col1, Col2, FROM Content_YourTable
If you need the data from your page type based on a particular path in the tree, then you can use something like this:
SELECT Col1, Col2
FROM View_CMS_Tree_Joined
INNER JOIN CONTENT_MenuItem on DocumentForeignKeyValue = MenuItemID
WHERE NodeAliasPath like '/Foo/Bar/Bar/%'
AND Classname = 'cms.menuitem'

not able to paginate using struts

<table id="example1" class="cell-border" cellspacing="0" width="100%">
<thead>
<tr>
<th>Entry Page Name</th>
<th>Visits</th>
<th>Bounce</th>
</tr>
</thead>
<tbody>
<s:iterator value="table" var="dashboardTable">
<tr>
<td><s:property value="actionName" /></td>
<td><s:property value="count" /></td>
<td><s:property value="sum" /></td>
</tr>
</s:iterator>
</tbody>
</table>
This is my code.
(Struts) I want to paginate my data in table for each 10 rows. Please can anyone help?
You seem to be populating data in a table , pagination in any grid has these following steps
I'm going to explain a simple but not so elegant method .
let's say you have 100 records , and you wish to display 10 records / page
In the grid (Table and other elements) you put a dropdown , which has 1-10 page numbers (since you have 100 records / 10 records per page) , which you can get by doing a select count(*).
1.Initially you display limited data , by executing a sql select with limit clause , say you display 10 records initially .
EX : select * from patient limit 1,10 - get first 10 records
2.Next user wishes to get patients from 5th page , hence he selects '5' from drop down and clicks "fetch" , backend you need to multiply 5 * 10 (records you wish to display per page" now you execute following sql query
EX : select * from patient limit 51,60
now the records from 51 - 60 are fetched and displayed
this a simple and easy pagination which doesn't involve jquery or any javascript , you can modify it by removing page no dropdown and putting it for display in a linear fashion by using many libraries .
Hope it helps.

Merging two spreadsheets using a script and creating HTML language

I have to merge this two stylesheet - http://www.j-e.com/Demo_Database.xlsx
The first one "DB" is a database of products, is a music shop.
As you can see I have four columns: the id of the product, the title, the price, and the tracklist.
Title and price are OK, but the column of the tracklist for now is empty.
The second one "TRACKS" is where my tracks are. Tree columns, the first one is the id of the produt who refer, the second column is the number of the track, and the third column is the title.
I need to merge all the tracks on different lines for each product from "TRACKS" in a single cell of the tracklist in "DB"
The real BESTBESTBEST is to have a structure like this in the cell tracklist of "DB" :
<table>
<tbody>
<tr>
<td>1.</td>
<td>TITLE_1</td>
</tr>
<tr>
<td>2.</td>
<td>TITLE_2</td>
</tr>
<tr>
<td>3.</td>
<td>TITLE_3</td>
</tr>
</tbody>
the question is
solved here:
http://www.vbaexpress.com/forum/showthread.php?54574-Merging-two-spreadsheets-using-a-script-and-creating-html-language
Thanks

Resources