My Stuff

BrettKnights Red Ribbon

Comments

  • Brett, when you say customize fulfillment e-mails, does that mean checking/unchecking the "To Be Emailed"field? Yes. The state of the field is checked in a before submit function. If the field is checked then it is unchecked and the custom fulfillment email is sent out.
  • :o Sorry I guess I should at least review my own code before replying. You're probably right. I do reset that field but that looks like a vestige of when I was first trying to figure out customized fulfillment emails. We actually have unchecked the default "Customers Default to Email Transactions". I do know (at least)…
  • This should be able to be fixed with a beforeSubmit user event script. Not sure how your Amazon fulfillments come through to you but the following works to allow us to customize fulfillment emails : function beforeFulfillmentSubmit(type){ ... var rec = nlapiGetNewRecord(); if(rec.getFieldValue('location') == '3' &&…
  • I had heard that OzLink was working on a cart based integration. May have only been a rumour. I've seen screenshots of a Pacejet based web cart integration. This is not a product as such but used the Pacejet back-end and some custom scripting to integrate with the cart. Not sure how that actually worked since it was part…
  • I've done LTL integrations a couple of ways. One replaces the NS ship methods and one augments them. 1. A client side script generates the freight amount (via a suitelet call ) and adds an extra freight line item to the cart. A custom option field with a "random" value is set for both the freight item and actual item being…
  • For anyone who comes across this the documentation states that you have to include the seconds field when setting a datetime field via script. NS built in timestamp fields don't return seconds. You can do this to add the missing seconds. the function doesn't do anything to a valid value; function fixTime(raw){ return…
  • I've seen this happen when people have enabled inline editing. Are you able to create a saved search that doesn't time out? If you can get to a list of sales orders (via a limiting saved search) check whether or not you have inline editing turned on. If you do turn it off and see if your normal lists load. HTH Brett Knights
  • Hi Mark. This wouldn't be too hard to do. You would:[LIST] [*]create a custom body free form text field and apply it to sales transactions [*]for sales orders you'd fill that field on create in an after submit user event [*]for all other transactions you should be able to fill that with the value of the field from the…
  • Hi John, There are a couple of other things you are likely to run into with your code. The first is that the sample you provided would only work with one result line. You are not actually building up an array to pass back. The second is that when you start including things like store description you have to deal with…
  • Hi Joe, Discussed here and in a couple of other threads. In this case that was just an attempt to have as little as possible happening when saving the contact. I doubt I'd use that parameter in this case in production.
  • No. No workflows on any entities in that account. No scripts on forms. All the entities just have the default form configured.
  • Hi John, If you don't see shopping cart in the list of possible saved search types (i.e. when you create a new saved search) then you'd probably need another feature turned on in your account. (Netsuite's analytics?) That said you could pretty easily post the cart to a custom suitelet -- you'd have to do all the management…
  • Any way to use suitescript, suitetalk, or any other interface to see whats in a customers shopping cart? When viewing a customer record, you can see whats currently in his cart.. But its not available in the sutiescript customer record. Thanks, James If you are in the context of an actual shopping session you can use…
  • Maybe you'd have to look at the items returned and manually ascertain the quantities? It's possible to get the item prices and set up some equations for getting a family of possible quantities. If that produces only a single possible combination then you're good. But that falls off the rails pretty quickly. Say you have…
  • Hi Lynale, The first thing I'd tend to do would be to include the customer's email in the saved search results. Then for processing I'd tend to do something like this: var searchResult = nlapiSearchRecord('invoice','customsearch29',null,null); var alerted= []; if(searchResult) searchResult.forEach(function(res){ var…
  • I'm not at my desk or I'd drop some code here The problem is that NS has no notion of transactional semantics so making something like this that is 100% fool proof is impossible You can create a custom record that has a single integer field and use that for your index You'd use it in a before user event script var nextVal…
  • Thanks for the response, Brett. The shipments we receive from our vendors often partially fulfill multiple POs. This can be dealt with via a single Item Receipt in the Netsuite UI Really?! What feature needs to be set up for this to occur? What menu items do you access to be able to receive multiple POs on a single item…
  • Hi Aaron, This is not possible due to the way an item receipt needs to be linked to a PO's line items. Are you trying to receive a single shipment to fulfill multiple POs? If so a suitelet might be your best bet. This could be set up relatively easily and you could allocate received items and shipping costs to different…
  • Don't know. There are undocumented line item fields called orderdoc and orderline which reference the PO. I haven't tried this but I'd do the following: Group your POs by vendor. for each group var vb = nlapiTransformRecord('vendor', vendorId, 'vendorbill'); var atLine = 1; for each PO in the group var po =…
  • Brett, I just wanted to give an update to say that your code snippet seems to be working great! The items are associated with the right POs and the GL seems to be affected correctly. Thanks again! Hi Aaron, Glad to be of help.
  • Hi BrettKnights, Sample code: function ClientSideRequest() { AjaxRequest.post({ 'url' : 'https://forms.na1.netsuite.com/app/site/hosting/scriptlet.nl?script=122&deploy=1&compid=********&h=********', 'parameters': {}, 'onSuccess': function(req) { alert('Success')}, 'onError': function(req) { alert('Failed')} }); } When I am…
  • Hi Travis, the same thing works for getting sub-categories from a category. e.g.: function walkCat(catId, pad){ if(nlapiGetContext().getRemainingUsage() < 20) return; var x = nlapiLoadRecord('sitecategory', catId); response.writeLine(pad + x.getFieldValue('itemid')); response.writeLine(pad +…
  • Please post some sample code. Calling either external or internal suitelet URLs is very common.
  • I'm trying to extend the Sample_Cart.spp page to show the items' thumbnail image. The storedisplaythumbnail field is not available in the orderitem object. It looks like I have to use the item object to get that information. It's not clear to me how to proceed. I'm not sure if I have to use .getFieldValues() or .getItem()…
  • Sounds like what you need is a user event script on Item Fulfillment creation. From what I gather you aren't really bothered by a false positive. You are trying to minimize work and materials costs while making sure a customer gets an MSDS for every appropriate product. i.e. if, for whatever reason, a customer re-registers…
  • It sounds like what you are trying to do is control the url that the form is at. You'll need to embed the form in an iframe. I generally do this on a category page or (rarely) on an info item page. You can force the form to break out of the iframe by placing the following after your closing </form tag: [HTML] <script…
  • So you need another client script on the RA that tests when you pass in a custbody3 parameter. That is what my previous post outlined. So you'll have: UE on Sales Order to create the button CS on Sales Order to forward to a new un-saved Return Auth CS on Return Auth to set parameters passed by the CS on the Sales Order HTH
  • If you are trying to set this up client side try: function createRA(){ var params = { e : 'T', transform : 'salesord', id : nlapiGetRecordId(), memdoc : 0 }; var qs = []; for(var n in params){ qs.push(n +'='+ escape(params[n])); } var url = nlapiResolveURL('TASKLINK', 'EDIT_TRAN_RTNAUTH') +"?" + qs.join("&");…
  • Thanks. I'm glad that worked out for you. Oddly enough I just had to do this again on another project but this time I had to react on a query parameter in view mode. Since NS doesn't run the page init function in view mode some other hackery was in order: the client code: NOTE: this might look a little strange since this…
  • Unfortunately NS doesn't parse the query parameters for you in a client script. When I am passing parameters to a form I use a client side script: var raClient = new (function(){ function getQP(name){ var qp = (location.search || '?').substring(1).split("&"); for(var i = 0; i&lt; qp.length; i++){ var nvp =…