My Stuff
Comments
-
what is the value of QtyAvailabl? Change alert(2) to alert(QtyAvailable)
-
have you added some debugging alerts to try to narrow down where the problem is? function checkQuantity() { alert(1); var QtyAvailable = Number(nlapiGetCurrentLineItemValue( "item", "Available")); alert(2); if( QtyAvailable <= 5 && QtyAvailable >= 1 ) { alert(3); alert("Available quantity: " + QtyAvailable + " is…
-
oh, I didn't think of that. It shouldn't be, seems pretty basic to me... sorry.
-
Sorry, but I don't understand what you're saying. You are checking if QtyAvailable is between 5 and 1. What is the value in the alert just before the if statement?
-
That will work, you could also construct a Number object if you need to cast to a number rather that add two method calls in the if statement. function checkQuantity() { var QtyAvailable = Number(nlapiGetCurrentLineItemValue( "item", "Available")); if( QtyAvailable <= 5 && QtyAvailable >= 1 ) { alert("Available…
-
Check that you have deployed it to the intended audience (Audience > Roles). Warning, unsolicited suggestion! Have you considered using a saved search that emails on field changes? I didn't spend a lot of time looking at your code, but if you can create a saved search that will send the email it will be a better solution…
-
You may also find that date created has a value although internalid does not - that would indicate "save as"
-
Javascript lacks a clone method. You could extend Array with AddRange(Array) and other such methods but internally you would still end up most likely looping through the items. I don't know if initializing an array with it's contents performs better than push() but it might as push() (or any append operation) will incur…
-
Ah, that makes sense. I'm still unclear about all the XML options in javascript, which are browser features, which are language extensions, etc. I think I will stick to E4X for now and learn that one. Thanks for the clarification.
-
Duh! I had it in my head that I needed to receive base64 encoded data on the client for some reason. I set the content type as expected and now I'm just working with the binary stream and everything is fine. I think my confusion might have come from the help where it says that nlobjFile file will contain base64 encoded…
-
I am and when I do I get binary data in my response, if I don't I get base64 encoded data but no content type header data to determine what the file is.
-
I've moved on. I thought I would use this thread to share some of the techniques and tools I'm learning/using.[LIST] [*]I noticed in a different thread somewhere that people were having trouble with un-escaped urls to images. Depending on how you are generating your PDF you may just want to use the nlapi methods, but if…
-
Thank you for the reply. I tried what you suggested and it gave me basically the same result I was getting with my tests. I'm still in the market for a CSS/Table/Div solution if anyone has any ideas...
-
Caroline, I'm glad you don't like to give up because your post actually helped me solve the mystery! I also tried setting all the fields on the line thinking I needed to calculate the change and I still received the error. Well, it turns out this is because I was using the incorrect fields! Silly me, I trusted the help to…
-
In the formula field of the search, I have the followings. Can someone interpret into understandable programming language for me? what does "/" mean? what does "||" mean? Max / is 0 / CASE {transaction.custbody_program} || TO_CHAR({transaction.custbody_year}) ||{transaction.custbody_semester} WHEN 'CONTED2009Summer' THEN…
-
Thanks for the reply Caroline, I should have mentioned in my original thread that I tried insertLineItem and it made no difference. Just to be double sure I tried it again just now and I get the same exact error. Thanks again.
-
Not when I explicitly run it a second time, but when the debugger breaks on the second event defined on the UE record, e.g. AfterSubmit. I didn't check to see if they are visible on the tab, I just noticed them in the code window (which BTW is still way too small) I've moved out of the debugger domain now so I can't easily…
-
Take a look at nlapiEscapeXML(text). You would pass in your external url and get back the same url but escaped. Good luck.
-
Case# 900600 created, I'll update this thread if anything comes of it.
-
What is dynamic scripting?
-
Long shot, but I just read this in the docs: The "nowrap" value prevents line breaks from happening inside the block. On HTML pages, this can result in text overflowing the width of the page and a horizontal scrollbar appearing. In pdf documents, there is no scrollbar, and text will merrily disappear off the right hand…
-
Ah, thanks Yang! I remember reading that somewhere, maybe the help. The error had me barking up the wrong tree because I had been tweaking the Role I was convinced that was where the problem was.
-
Putting NS core business logic into nlobjRecord, elevating it from a simple data object? If that's the deal then that sounds cool.
-
What?! :D When was support for folders added?? https://usergroup.netsuite.com/users/showthread.php?t=14650&highlight=folder Yang, I've searched the help and I'm not finding any mention of being able to script folders. 'folder' is not listed on the supported record types. Also... how much can we do with folders? I would…
-
var folder = nlapiCreateRecord('folder'); if(folder) { folder.setFieldValue('parent', ''); // create root level folder folder.setFieldValue('name', 'Created from SuiteScript'); var folderId = nlapiSubmitRecord(folder); nlapiLogExecution('DEBUG', 'new folder created', 'new folder ID: ' + folderId); }
-
You are forcing a same type comparison by using the !== operator. if memo_text actually is a valid empty String (it probably is) then your test will fail. Try if(!memo_text) or if you want to support null you can do if(memo_text == null || memo_text.length < 1) My util method for this (NetSuite used to be very…
-
Hi Jim, That is a creative solution. You would need to use a global variable to make sure you don't have a refresh routine running for every row returned from the search.
-
No, this is not possible. There might be some FF add-ons out there that will do this.
-
It's duplicate code. You are fetching the same data twice and assigning to different variables. var memo = nlapiGetFieldValue('memo'); var memo_text = memo; would be the same as what you have. Is it possible that you have a typo and that you intend to access two different fieldIds? e.g. 'memo' and 'custrecord_terms_memo'?…
-
only via DOM methods and even then I think there are some images being used for the rounded corners. You would need to replace them as well. Serious DOM work.