My Stuff
Comments
-
Hi @"Ina Pablo-Oracle", Thanks for the response. It's too bad this is the way it is. I understand how it's calculated but this seems like a huge hole. So many of our items are sold individually but also used in assemblies that most of the results are inaccurate. I've voted for the enhancement, hopefully NS will actually…
-
I reworked it and now it is working. For anyone interested: function checkalloc_v2() { var today=new Date(); var orderrec; var itemcount; var x; var context=nlapiGetContext(); nlapiLogExecution('DEBUG','Remaining usage at script beginning', context.getRemainingUsage()); var…
-
Thanks! I realize now that I could have done 'getLineItemValue' to figure out what the values were but I appreciate the quick response.
-
As a follow up to my last question, I now have a script that works remarkably well when executed from a button on a sales order but I am trying to make a scheduled script so that it will run nightly. The entire code is function checkalloc(type,form) { var recordone; var itemcount; var orderrec; var test; var today=new…
-
I've been trying to create a scheduled script that will change the commit field values on any pending fulfillment orders with an order date in anytime in the future to be "Do Not Commit". I have a saved search the displays all pending fulfillment orders that the script uses. The script looks at the date on the search and…
-
I've experimented with nlapiDisableLineItemField('item','commitinventory',false); in the initline function of our sales orders and this unlocks the ability to edit the commit field on all line items while in edit mode. Unfortunately the field seems to reset the moment the order is saved. Does anyone know what causes the…
-
(You've probably already considered this or figured it out) but I've done a similar search where it's displaying line items from a transaction, and I just have it set to main line false, and the Created From shows for every line regardless. So I guess the question is why not just do main line false and then you should only…
-
If you include {applyingtransaction} in the results, do any appear? Yes, of the (currently) two results one does have an applying transaction and it displays normally. This was already a results column, the idea being that if an applying transaction exists the user would click on it, otherwise they would click my link and…
-
Might not be null. Might be equal to '' I tried changing the formula to case when {applyingtransaction} = '' then ... but got the same results, that the link never displays. I also tried case when {applyingtransaction} is '' then ... just to see but this resulted in an error as expected.
-
I'm not sure if this would apply to your current way of doing things but if during the processing of the sales orders you are creating an invoice (for instance with Net 30 billing or whatever time frame your loans might be for) you could do a search of these. In what I'm imagining you would create the invoice that shows…
-
Thanks Michoel, this is what I had done in the absence of any other solutions. Not sure why NS has to make things so difficult.
-
Yes all the line item info shows correctly, I've been using the structure for the #list that was in the stock template and just modifying as necessary. If anyone else has any info on this I would appreciate it before I move ahead with another custom column field. Thanks again.
-
Nelliot - I tried your suggestion and I got a slightly different error when I tried to save the template, "Expecting a boolean (true/false) expression here Expression record.amountremaining does not evaluate to true/false it is an instance of com.netledger.templates.model.EmptyModel" It seems to come from the same problem…
-
As a follow up I did get this to work but it is an ugly solution. I ended up going with the line <#if record.billcountry!="US" && (record.amountremaining?length==0 || record.amountremaining!=0)> I would still very much like to know why it behaved the way it did if anyone has any insight or if there is a better…
-
The 'date' builtin actually does the opposite of what you are trying (converts a string to date, not date to string) Try: [CODE]<td>${record.createdfrom.trandate?string('mm/dd/yyyy')</td>[/CODE] You can also set this globally for the template: [CODE]<#setting date_format = 'mm/dd/yyyy'>[/CODE] Michoel - I tried making the…
-
Hey Wes, with that change it still doesn't error but it still doesn't show any results. Thanks for the attempt though.
-
Okay so I've made progress and it will work for my needs but now I'm curious why it is acting the way it is. I tried changing the ?date to specify the correct input format as you suggested but it resulted in the same error as I got above. Then I encapsulated the field value in an <#if> bracket to check if the length of the…
-
Without meaning to hijack this thread, I'm trying to get the original order date to print on an invoice template. I can get [CODE]<td>${record.createdfrom.trandate}</td>[/CODE] to return the date but it is in the format "YYYY/MM/DD hh:mm:ss" but the time value is all 0's. I've tried…
-
I've got a working solution but it's oh so horrible to implement. In generic terms we set up two custom fields on the invoice that are populated by a user event script when the invoice is viewed. The script is executing a saved search that looks at payments and credit memos that are applied to (this field is "applied to…
-
Well the "crazy" comment made me smile...:-) Unfortunately the custom controls still use both of the stock fields "Credit Limit" and "Terms" so I can't make use of that suggestion. Even if I were to make a custom field for the credit limit the terms field is sourced onto sales orders and invoices and customizing all that…
-
Thanks for your help everyone, I've gotten this to work very well. When the original boupdate script runs it expects to be passed a value for salesorderid but checks immediately to see if it is blank, if so it captures it directly from the current order.
-
Well the additional parameter was my attempt at passing the current search result record to the boupdate script so using pseudocode something like function scheduled_boupdate{ run the search x=1 while x<=results.length { thisrec=nlapiLoadRecord('salesorder',results(x).getId()) thisrec.boupdate('view') x++; } } Would…
-
I can do that but how would I handle executing the script when a user just navigates to an order (when it executes on 'view')? If it is set up as function boupdate(recordId,type) but doesn't get passed the recordId value will it throw an error or could I just look for a null value in that variable and assign it the current…
-
Okay thanks. The first script uses the "type" value (checking if type=='view'), is there any way to pass this value from the scheduled script to the library function? Also would I be calling the function on a record object ("thisrec" in thisrec=nlapiLoadRecord('salesorder',nlapiGetRecordId() ) resulting in something like…
-
I had a situation like this, I had a script that I wanted to run nightly on all open sales orders. Originally I had a custom field that was set to false by the first script (it's only task) then my main script ran through them all and set the field to true. The problem I ran into was the system notes became a jumbled mess…
-
Max, Thanks for your help. It would be great if NetSuite actually documented this somewhere but I can't find it when looking through at least two different versions of the Suitescript Records Browser (https://system.netsuite.com/help/helpcenter/en_US/RecordsBrowser/2010_2/index.html and…
-
Unfortunately I defintely don't want the script to run every time the customer is changed, I would just like it to function properly in the event the customer is changed. The search is run twice during the execution of the script but with different filter parameters...the first searches for any records referring to the…
-
Great, I look forward to it. Thanks,
-
Okay thanks for the response. Following up on my project, working towards to same goal I have a script that works well. It executes when the order is viewed (and only does any rewriting when necessary) but if a user that doesn't have "sales order approve" access causes the script to be executed then it resets the order to…
-
Through a combination of debugging using Firebug and the code changes suggested I was able to get it to work, a big thanks to you both. For anyone interested the final results were this (both functions are in the same code block, see original post for separation): function myBeforeLoadFunc(type,form) { if (type == 'view')…