My Stuff
Comments
-
Ok, I was mistaken earlier. I know, big surprise. Here's some code for my portlet: [PHP] var content = ''; content += '<html>'; content += ' <head>'; content += ' <meta charset="utf-8">'; content += ' <title>jQuery test</title>'; content += ' </head>'; content += ' <body>'; content += ' <script…
-
Ok, so I was finally able to get jQuery to work in a portlet. I had to change the type of the portlet to form, set jQuery in the file cabinet and use .setScript to get it all to work. Sample code: [PHP] function getMap(portlet, column) { portlet.setTitle('Customer Map'); portlet.setScript('customscript_jquery'); var…
-
No, at this point I am just trying to add a click event to a div in the portlet.
-
I added a workflow to remove both the print button in view mode and the save to print button in edit mode, based on role. Works like a charm. Thanks.
-
Good eye, but that didn't fix it. I am stumped :confused:
-
Ok, I should just delete this post, but someone might find it useful. It was one of those days where as soon as I ask a question I find the answer. var rec = nlapiLoadRecord('employee', empid); rec.setFieldValue('image', id); var id = nlapiSubmitRecord(rec, true); This worked fine and I can now send an image and have it…
-
I have written a script that uses Google Maps API to geocode all of our customer's billing addresses and another one that does it on create and edit, so I can keep them up to date. Side note, I would love to be able to add custom fields to the address book, so I could get coordinates for all of the addresses. I then wrote…
-
Bump for the new week. Anyone know the trick to binding events in a portlet?
-
Actually, it turns out that the trick was just to use a form portlet. The .setScript function is not needed. I can include the Google hosted latest jQuery just adding it into another script tag in the content field.
-
Well, it depends on how you are calling the RESTlet, really. If you are calling it from a mobile app (or some other way to get around XSS) you can use JavaScript (jQuery in my case) to set the headers. [PHP] $(document).ready(function () { var url =…
-
Never mind. Turns out it works, I must have just mis pasted or something. Now, if I can just get the next line to work I will be golden: nlapiSubmitField('employee', empid, 'image', id); The image id is retrieved in the code in the previous post. I expect there is a better way to set a select type field than this. Well1,…
-
In the mean time you can always add another parameter to the query string.
-
I guess it's another area not exposed to scripting. Understandable, I guess. There is hardly any reference to people coding custom print jobs in the forums here, so I assume that hardly any people are coding print jobs.
-
Here are my header and footer. They are placed in the head tag. Included is the body tag to show how they are invoked. <macrolist> <macro id="myHeader"> <table width="8.5in" style="padding:0;"> <tr style="padding-top:.32in;"> <td class="title" width="5.55in"…
-
I was rereading my post and felt like I should clarify a bit. I need to know how to keep formatting from the fields in NetSuite but I need to be able to wrap lines after a certain length. If I can't get some insight from somewhere today I will have to build out a function to parse the string. I would much rather use CSS,…
-
Ok, quick update. I have solved my formatting issue by formatting it in the Suitelet. A replace of either 'n' or ' ' with '<br/>' and '*' respectively gives me what I want and then I leave the pre tag out of the XML. desc = record.getLineItemValue(listId, 'description', i).replace(/n/g, '<br/>').replace(/ /g,…
-
I'm not sure it is so nice. Email has been broken since November 18th. Now, finally, it is to be fixed - after another week goes by. A three week email outage is pretty pathetic. Most organizations would have some urgency about fixing email issues. Or are we the only NetSuite customer who uses nlapisendemail for business…
-
I believe your issue is unrelated to the topic of this thread. Netsuite made a change the weekend of November 19th that appears to have affected nlapiSendEmail. We got them to create an S1 defect last Wednesday, I believe - Defect 209800 That will be an issue for us soon. We are not using the support module yet, but we are…
-
As an update to this thread. I have finally deployed my Suitelet, but it is not as I originally wanted. It turns out that the only way to get a custom print redirect to work on proposals (estimates) is to enable the HTML print option per user. That's not an option for us, so I created a user event script to place a button…
-
Nice. Thanks.
-
Support got back to me and it turns out nlapiRedirectURL will work, but I have to set my preferences for transactions to Print Using HTML. That really is not an option as it would make all transactions print to HTML. Is there a way to programmatically get around that? Is my only option to add a button to the form that does…
-
I opened a case to ask about this, but we are going on 24 hours now and I am purely stumped. I must have tried 45 different ways to get this to work yesterday. For instance, if I use nlapiRequestURL and a url of 'https://system...' I get a server response of 206 and then the regular print action takes place. If I use a…
-
Ok, here is my latest beforeLoad script: function beforeLoad(type) { if(type == 'print') { var a = new Array(); a['User-Agent-x'] = 'SuiteScript-Call'; var getPDF = nlapiRequestURL('https://system.netsuite.com/app/site/hosting/scriptlet.nl?script=171&deploy=1', null, a); // getPDF.setContentType(getPDF.getType()); //…
-
Sigh. I still don't get it. I have the Suitelet set up and if I click on it in the deployment I can see my pdf test, but I can't get the beforeLoad (in the user event script attached to proposals) function to work: if(type == 'print') { var getPDF = nlapiRequestURL('/app/site/hosting/scriptlet.nl?script=171&deploy=1'); } I…
-
How about using workflow to delete standard Print and Save & Print buttons, and then add your Custom Print button? Note: currently you cannot pass parameter to workflow go to page action and needs to use the workaround as specified in…
-
I wonder if the problem is because it's beforeLoad. I have tried all of the examples of either nlapiSetRedirectURL and nlapiRequestURL and nothing is working. Also, the help section for nlapiRequestURL says it returns an nlobjResponse type object, but the debugger calls it a nlobjServerResponse type object and several of…
-
Ok, instead of or in addition to nlapiRequestURL? *edit nlapiSetRedirectURL is not doing the trick either.
-
We got access to the RESTlets a while ago (I bugged Elham at SuiteWorld to no end), but we are not on 11.2 yet. I just checked the beta preview and the execute as admin flag is gone. That is troublesome. I sincerely hope that is an oversight and it wasn't just a beta feature.
-
Our RESTlets are set to execute as admin.
-
Elham stated that there was a high concurrency limit. Has that changed?