NetSuite - Adding Features to Standard Transaction Form? - netsuite

Is is possible to add a script to a standard form in NetSuite?
My goal is to just display an inline text of a summation of a sublist column shown on the Bill of Materials Inquiry page.

You can deploy Scripts to Record Types or to Custom Forms. You cannot deploy Scripts to the other native pages like Search Results, a Report, or a list of all the Sales Orders.

Yes, unless you specify the customform field specifically, a script will run on every form.

Related

NetSuite modify packing slip URL

in netsuite how can I modify the URL below so that it can display packing slip based on multiple ID. as example I want new window to display packing slip for id= 366646 and id=361518 on the same window. is this possible?
https://system.netsuite.com/app/accounting/print/hotprint.nl?regular=T&sethotprinter=T&id=366646&label=Picking+Ticket&printtype=pickingticket&trantype=trnfrord&whence=&print=T
There is no way to print multiple picking tickets by default as the hotprint function can only process one ID at a time. You could do the following:
Build a suitelet that can handle both ID's and use the hotprint for each.
Merge the two resulting PDF's together and display that in a popup window.
I will dig around for an example code I did for multiple sales orders.

display locationquanityavailable on Netsuite Sitebuilder Site

Trying to figure out how to set the location of a multi-location Netsuite so that on the web store it only will display the quantity of that location only. Currently it displays ALL locations (sums).
I would like js in the header possibly that will set the location to one location and then when using locationquantityavailable it will grab that locations quantity and displays it.
Anyone been able to display just a locations quantity?
You can mark your locations as making their inventory available in the web store. Then the standard sitebuilder tags quantityavailable and quantityonhand will pull from those.
If that doesn't work you could manage this by various forms of scripting.
Script your inventory affecting transactions so that inventory changes from the desired locations update custom item fields.
Create a Suitelet that takes a page's item ids as a query string and returns current inventory for those items.
create a non-stored custsom item field that populates with the results of a saved search. I doubt this option will work in the context of the web store but it's very low effort to check. Search for "Creating Custom Fields with Values Derived from Summary Search Results" in the Netsuite online help for details.
I've used the first two of these in production to achieve the result you're looking for.
each of these has advantages and disadvantages so there's a trade off between how busy your back-end is vs how busy the site is.

Remove NetSuite Sublist Button

I have a NetSuite Suitelet script that is listing all of a customer's credit cards so that they can edit the cards themselves.
I would like to remove the "remove" button from that sublist, if possible. I've looked all over the NetSuite support site, with no luck. Has anyone encountered this before?
Below is the code that I have:
var creditCardSublist=form.addSubList('custpage_credit_card_sublist','inlineeditor','Current Credit Cards');
/* this does not work */
form.removeButton('custpage_credit_card_sublist_remove');
/* this does not work either*/
creditCardSublist.removeButton('custpage_credit_card_sublist_remove');
Thanks for any assistance with this.
Actually client side is what you have to do.
You create a client script to go along with your suitelet.
use form.setScript... to associate it.
in the client script create an initLine function. That function can use jQuery (automatically included by Netsuite) to find and remove the Remove button.
This is a hack but Netsuite doesn't have any API for manipulating those lists
addSubList(name, type, label, tab) takes a type parameter, which decides the sub list type.
editor - An edit sublist with non-inline form fields
inlineeditor - An edit sublist with inline fields
list - A list sublist with editable fields
staticlist - A read-only segmentable list sublist.
So you might want to use a staticlist type.
use this jQuery in relevant client script.
jQuery(".uir-insert").remove();
jQuery(".uir-remove").remove();
jQuery('#custpage_so_sublist_insert').hide();
jQuery('#custpage_so_sublist_remove').hide();
Note:
you can only use jquery in clienscript so you must create client script along with suitelet script.

Sort articles by template variable

I have built a website (with MODX) where some products are managed and displayed via the articles addon. The products should have a custom ordering but I don't know how to use a template variable for that.
If I enter the name of the TV in the "Sort Field" field nothing is shown at all.
So is it somehow possible to use a TV there?
Or is there another way to achive a custom ordering (note that I need the summary and date fields, so I cant't abuse them for that)?
You can do this by using getResource package. Look at sorbyTV, sortdirTV, sortbyTVType parameters in manual:
http://rtfm.modx.com/extras/revo/getresources#getResources-SelectionProperties

How can I map fields from Product to Order Product and Product to Quote Product in CRM 2011

can anybody please let me know how can I map field from Product to Order Product and Product to Quote Product in CRM 2011.
CRM doesnt allow us to direct map.
You can't map these using attribute mappings.
One way around this is to write plugins on the PreCreate so that at least when you save the record it populates the data on save.
For plugin reference, the Quote Product entity is called quotedetail and the Order Product entity is called salesorderdetail.
Another other way around this, if you only need it firing on the UI, is create some javascript that triggers during onload of the form and populates this data for you.
If you want a no code method you could fire a workflow on create of the Order/Quote product and populate the fields from the product using an update. Only downside to this is the workflow runs asynchronously so you cannot predict when this mapping data will hit the record.
Finally, if you want another no code way to achieve this, and you don't mind investing a little money in a Formula Rules Engine tool I'd recommend looking into Formula Manager by xRM Consultancy and North 52 (Link to Formula Manager). This allows you to set up formulas on both the UI and Server Side which would do all of this mapping for you.
If you want a no code method you could fire a workflow on create of the Order/Quote product and populate the fields from the product using an update. The only downside to this is the workflow runs asynchronously so you cannot predict when this mapping data will hit the record.

Resources