Showing Last Sold Date In a Netsuite ITEM Saved Search - netsuite

I've created a search that shows current inventory on hand, their purchase price, and a formula that multiplies the two to have current value.
In the results field I want to have a column that shows the last time an item was on a sales order. but i am coming up short. Is there a way to do this?
Filter Criteria
Results Criteria

Criteria -
Inactive - FALS
Type - Inventory Item
Transaction Field: Type - Sales Order
Available - Is greater than 0
RESULTS -
Name - (Summary Type Group)
Description - (Summary Type Group)
Available - (Summary Type Count)
Transaction Fields - Date (Summary Type Maximum)

Did you create the saved search from the Item Record or Transaction Record?
If you created it from the Transaction Record then you will want to make sure to use the Date Field and Summary Type (Results tab) as Maximum.
Field = Date
Summary Type = Maximum
If you created the saved search from the Item Record you will need to use the Transaction Fields... table join to bring in the Transaction Date field.

Related

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.)

NetSuite get transactions that do not contain items with specified attributes

I am attempting to create a list of open pending approval sales orders that do not contain items with specific values defined in a custom field. I am able to do this when the sales order contains only items that meet this criteria. However, when their are two items and one meets while the other does not my search is no longer valid.
I have two sales orders. Sales order 123 has a shipping method of Ground, while Sales order 321 has an item with Shipping method of Ground and shipping method of Freight. I expect to get only Sales order 123 returned.
I made this formula in criteria section:
CASE WHEN {item.custitem_shippingmethod} = 'Freight' Or {item.custitem_shippingmethod} = 'Free Freight' THEN 1 ELSE 0 END
but got both orders returned. I tried using the same formula in the summary criteria but that also did not work. Any suggestions?
Picture of Criteria in NetSuite
Thank you!
You could potentially use summary criteria. It's practical but it's not the cleanest looking search. You need to have a corresponding formula column in your results for it to work:
Group by Document Number.
Create a formula (Numeric) result column with summary type of Sum using your above formula.
Create a summary criteria of type formula (Numeric) with summary of type Sum
and use the same formula and set the value to be less than 0.
This will return only records that do not include those shipping
methods.
Alternatively, have you considered running the logic (workflow/suitescript) when the record is saved and storing a checkbox value such as "Does not include freight"? It would make searches based on that criteria easier.
For example if you store the ship method on the line, something like:
// Set your freight method indexes
var freightMethods = ['1','2']
var itemLinesCount = nlapiGetLineItemCount('item');
// If a line is found with one of the freight methods you're looking for then mark the record.
for(var i = 1; i < itemLinesCount; i++)
{
var shipMethod = nlapiGetLineItemValue('item', 'custcol_shipmethod', i);
if(freightMethods.indexOf(shipMethod) !== -1)
{
nlapiSetFieldValue('custbody_includes_freight', 'T');
break;
}
}
If you store the ship method only on the item record it can be a bit trickier to manipulate (due to the way Netsuite handles item record types).
Does the line being returned have a freight value or are you getting another line from the same order?

Count Index based on Multiple Conditions - Excel

I have a table with order records for each Product Type. The columns contain information like Order Number, Customer Name, Product Category, Product, and Order Receipt Date.
My goal is to find the quantity of orders that fall into the below conditions:
New Customers Ordering any Product Category for the First Time
Existing Customers Ordering from any Product Category for the First Time
Reorders from any Product Category
What would be the best way to go about this?
Think I figured it out:
I created two columns for records: "First Product Type Order?" and "First Order?"
"First_Product_Type_Order": IF(AND(Order2=Order1,Product_Type2=Product_Type1),First_Product_Type_Order1,IF(SUMPRODUCT(($Customer$2:$Customer2=D2)*($Product_Type$2:$Product_Type2=Product_Type2))>1,"Reorder","First Time Order"))
"First_Order":
IF(Order2=Order1,First_Order1,IF(SUMPRODUCT(($Customer$2:$Customer2=Customer2)*1)>1,"Existing Customer","New Customer"))

Show all data in the same row in Framework Manager Cognos

I'm using IBM Cognos Framework Manager/Report Author 10.2.1
The Data looks like the following for two rows:
**Case ID Activity Date Updated**
11111 Bill Paid 09/25/2015
11111 Received Bill 08/01/2015
On my report, I need to show the following for the same exact Case:
**Case ID LAST Activity LATEST ACTIVITY Date Updated**
11111 Received Bill Bill Paid 09/25/2015
Received Paid needs to show in the same Row showing the latest
information with the 09/25/2015 Date.
Not sure how to do this in the report or even Framework Model?
This is tricky but a worthy question as you come across this type of data modeling regularly. I can give you a solution in the report.
The two bits you need to figure out is the maximum 'Date Updated' for each ID and the next to maximum 'Date Updated' for each ID.
Create a new data item called 'Max Date' with the following expression:
maximum([Date Updated] for [Case ID])
Create another new data item called 'Next Max Date' with the following expression:
maximum(
CASE
WHEN [Date Updated] <> [Max Date] THEN [Date Updated]
ELSE null
END
for [Case ID])
Create another data item called 'Latest Activity' with the following expression:
CASE
WHEN [Date Updated] = [Max Date] THEN [Activity]
ELSE null
END
Create yet another data item called 'LAST Activity' with the following expression:
CASE
WHEN [Date Update] = [Next Max Date] THEN [Activity]
ELSE null
END
Set the 'Aggregate Function' property of both 'Latest Activity' and 'LAST Activity' to 'Maximum'.
Summary
We calculate the maximum date for each Case ID. Next we use a CASE statement to exclude the rows that correspond to the max date and then get a maximum for each Case ID of all other rows. We create a new data item that will spit out the Activity if the date matches the max date otherwise null is emitted. We create a second data item that outputs the Activity if the date matches the next to max date otherwise spits out null. We set the aggregate function for both to 'Maximum' which has the effect of getting rid of any null values in those columns through the auto-group and summarize process. This leaves us with two new columns on each row showing the activity of the latest and the one before that.

Sum specific list items and assign the sum value into a different list

Alright, here's my scenario :
I have 2 custom lists : Orders and Items. The Items list contains a field Description (text) and a Amount Per Item field (calculated). The Orders list contains a Total amount field and a Items field (lookup on the description field in items which allows multiple values selection).
Here's a more visual explanation :
Orders
Total amount
Items (lookup on the description field in items which allows multiple values selection)
Items
Description (text)
Amount per Item
I would like to do the sum of the Amount per Item field of the selected items from the Items lookup field from Orders and put the value of the sum in the total amount field in Orders
Any suggestions? Is it possible to do this in SharePoint 2010 without code? If not, could you show what the code would look like?
Thanks.
You could try
OrderList.Total = OrderList.Items.Sum(item => item.AmountPerItem);

Resources