My Stuff
Comments
-
Beauty! thanks for sharing and just before I needed it too!
-
Hi All, I'm seeing this as well. We had some code that kept our gift certificates in synch with an external system. It's been running fine for months. Recently it started failing .Turns out all Gift Certificates back to March 21, 2011 now have different id values than their internal id. e.g. var findCert =…
-
Wow, this is like the third request for this in two weeks. You CANNOT use javascript to upload to a FTP. You must use Web Services. So your approach won't work without a Web Services app sitting between the Suitelet and the FTP. Actually depending on how your remarks are interpreted you might end up causing someone a lot…
-
You can't set the child item's preferred location via the GUI which suggests you shouldn't be able to update it with script and that using items updated via mass update may also run into an issue. The functionality that uses preferred location seems pretty simple so you might be ok but I wouldn't look at this working via…
-
Hi Marty, rec.setCurrentLineItemValue are typically used when you have created/opened a record in dynamic mode. try: var depappl = nlapiTransformRecord('invoice', 1092 , 'customerpayment'); depappl.setFieldValue('trandate',nlapiDateToString(new Date())); //depappl.setFieldValue('postingperiod', period); var lineNum =…
-
That set of comments is appended to html pages retrieved from the NS file cabinet via a URL. Is your suitelet generating data or just pulling static data? If it is just pulling static data you can load the file using nlapiLoadFile(fildId) and write the contents to your suitelet response. Check the nlobjResponse and…
-
you can do this yourself pretty easily. The approach I've taken in the past is as follows: Use whatever set of drop-downs etc to allow item configuration. This allows you to get a list of item internal ids. send ids and offered price to a suitelet that returns the new kit's internal id. Add the new kit's internal id to the…
-
The isn't any published API to use for this. If retrieving the value client side would help there may be a way to do that. Try viewing the PSS and add &xml=T to the URL. If that returns an XML view you could get the search I'd that way. However you are still going to have to register the PSS id with the script so the…
-
Wondering if the idea of having a list of "role centers" as an audience option is a good idea (needed by others)? That way, if I select the 'customer center' role, all roles related to that center will apply and if an administrator adds a new customer center role it will automatically be added to the script deployment…
-
A couple of thoughts: The google geocoding api is limited to 2500 requests per day. If they are being hit too frequently or if they feel the service is being abused they will cut you off. Does your system eventually direct the customer to a map on a website? Do you have an API key? If not you should get one so that only…
-
Here's a script that may help. It uses NS's new nlapiYieldScript call to manage walking through a list. You have to make sure a single job runs in less than 10k governance units but you should be able to do that with what you are up to. function simpleBatch(arr, proc, reserve) { if(!arr || !arr.length) { return; } var…
-
You are also likely to have issues because you are not escaping your data values. e.g. var daram1 = "email="+nlapiGetFieldValue('email'); should be var daram1 = "email="+escape(nlapiGetFieldValue('email')); Also if you haven't used jQuery you'll save yourself a lot of effort in the future if you get to know it a bit. AJAX…
-
BTW... Netsuite professional services originally wrote the script for us so my assumption is they optimized it as best they could. This is a completely invalid assumption. In my experience you should assume the opposite. Approach fixing this the way khultquist said. If you can't combine all of what you described into a…
-
try: countResult[0].getValue('internalid', null, 'count');
-
It looks like currency exchange rate is available via SuiteTalk (Web Services). My team will dig into. We need a SuiteScript to run on a regular basis to retrieve values from a remote pricing service. It will be interesting to see if we can get this to all work within the NetSuite environment versus writing an external…
-
FWIW What I have found is that custom records don't work in the alt position. If you use one of the built in records for the alt type and id the merge works as expected.
-
Hello, In order to get that to work you are either going to have to script the customer deposit or the customer payment. The deposit is your best choice since that's really what it is. How had you planned to get the payment into your system? If script was involved at any point then rather than create a custom record you…
-
Yes. Assign a shipping method that has 0 cost. calculate your shipping cost in a recalc event. Use the recalc toggle method described in other posts. This one references it in an earlier discussion about custom shipping calcs. then if you are applying this script in a Scriptable Check Out script and on the NS GUI you need…
-
You can't access the sublist but that is read only in a client side script anyway. You can run a normal search client side: e.g. var locs = nlapiSearchRecord('item', null, [ new nlobjSearchFilter('internalid', null, 'is', nlapiGetRecordId()), new nlobjSearchFilter('makeinventoryavailable', 'inventorylocation', 'is', 'T')…
-
Don't forget nlapiMergeRecord can take up to two records and extra fields as well: e.g. var empId = nlapiGetUserId(); nlapiMergeRecord(templateId, 'employee', empId, 'salesorder', soId); some warnings here though: you can only have fields for one entity and one transaction in your template. This is because the subtypes of…
-
Thanks Brett, Now i can see my response in both logs and debugger.Its giving the below xml tags in my response. But not able to get the idToReturn field value from this response.pls help <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><CreateBillingAccountResponse…
-
do you have namespaces defined in your documents? NS's dom is pretty standard except there. Here is a thread that discusses the namespace issue. Netsuite's nlapiSelect... functions take a DOM and an XPATH string. I can confirm that xmls.getElementsByTagName('Envelope') is returning what it should client side. However I…
-
One thing to be aware of when logging xml and html. Netsuite doesn't escape it for you so you won't see any xml tags in your log detail. If you look at the log detail and then view source you'll see your xml tags. If you want to log xml then you'd write nlapiLogExecution("DEBUG", "my response",…
-
I'm trying to call from NetSuite into our public-facing API with the following code: function beginCallAPI() { var a = new Array(); a["Content-Type"] = 'application/soap+xml'; var s = ...; // long SOAP envelope in a string var externalURL = '.../Name.asmx'; // my public API nlapiRequestURL(externalURL, s, a,…
-
I have an item record - how do I 1) add a website category to the existing list 2) delete the existing list entirely 3) delete the existing list, and add a new category I tried searching the docs - but I'm not really sure how to refer to website category-like fields (sublists?). It seems like you might get the record,…
-
Thanks Brett - I will try this, when reading your other post that you referred to I was wondering if you could elaborate on what this statement means: if(!request.getParameter('cf')){ //customFormidLogic may be slow; don't call if custom form already set UNLESS this is a security override I've never used request before.…
-
nlapiGetFieldValue('customform'); FWIW this thread shows an example of forcing the custom form based on some before load logic. HTH Brett Knights
-
You could also deal with this by just forcing a redirect with the new form when it is viewed. If the transaction gets edited the form will be saved with the tran. See this thread That example uses an unspecified function customFormIdLogic to get the form to set. In your case it could be as simple as: function…
-
I'm guessing NS has updated their javascript engine. RegExp.rightContext is a deprecated property. http://stackoverflow.com/questions/9167100/why-does-regexp-rightcontext-raise-an-invalid-access-error-inside-an-anonymous-f HTH
-
Ivan, This worked great. Thank you. FWIW that is what the code I posted does. It also keeps track of how much governance each iteration uses and tries to ensure you always have at least as much governance available as was used by your most expensive iteration. It supplies a reasonable %complete as well.