My Stuff
Nominate Your Peers for NetSuite Support Community's Choice of the Quarter! Submit your nomination today.
Intelligent Payment Automation version 1.0.3 is now available in the SuiteApp Marketplace. The SuiteApp, powered by BILL, lets you automate payments, manage vendor details, and bank account information within NetSuite. Learn more
Comments
-
var Rpayee = record.setFieldValue ('Payee' ,(nlapiLoadRecord('customer', 460 )) ); This is wrong on several levels - 1. It won't return a value, so no need for var Rpayee 2. 'Payee' should be 'payee' 3. nlapiLoadRecord returns a record object and setFieldValue expects a value, so that should simply be -…
-
Wrap your error in a try catch(err) and then output err.message. That should give you a clearer error message.
-
A Client .js on the form itself, or a UE file somewhere else? With a client-side on the html form itself, you can read it with var value = document.getElementById("brah").innerHTML
-
Do you have the checkbox "Run as Admin" ticked in on the script deployment?
-
Submitting a Custom Record Online Form will create an instance of the related custom record. That is the function of the online form. Can you clarify your question?
-
Generally, when something like that happens, we suggest appending "-old" to the now unused item names, and simply inactivating them. Usually does the trick if you don't have special reporting needs.
-
What kind of records?
-
I don't think there is a recalc() for members. If there is, use that. You'll need to take a "snapshot" of your members on pageInit and store that in a global array. Then on recalc, compare the list now vs what it used to be. If there is no recalc, you can compare before members vs after member in a UE script, by using…
-
Hi Brian, Playing with line items is always a pain... Can you post your whole code? There's a few gotcha's I'd like to make sure you catch.
-
Well... there's no API to merge records like, say, Netsuite is able to do when you use Duplicate Record Management. What you could do is code a script that sensibly follows a merge logic - copy every field from record B into record A, unless A has info in it already. The tricky part is the sublist info, like user notes and…
-
beforeLoad is still a server-side script, so an "alert" is not the best function to use to test... go with an nlapiLogExecution(). You should still go ahead with testing, since I myself am not sure, but I do not believe web store browsing of an item will trigger scripts.
-
I think the problem is that, once an entity (such as a Contact) ops out of a subscription, only that entity can then opt back in by logging into the customer center and changing his preferences. So you, as a user, can uncheck the boxes, but you cannot tick them in.
-
AfterSubmit is a server-side script. There's no window to close. Try doing it on onSave on client-side.
-
You must return columns in your search in order to be able to read them - i.e., the last parameter of nlapiSearchRecord should not be null, it should be an array of column objects that match those you want to read.
-
Yes, it's true. And no, there will not be an error message if you go over the limit. To see the amount of deployed scripts is pretty easy though, just go to Setup->Customization->Script Deployments and filter on the record type you want. You'll see all the scripts deployed, and if you've busted the limit. If so, the…
-
I'm not sure if it will work in your case, but a non-scripting solution may exist. If you want to transfer the Parent info to a Custom Field on the Child, you may be able to just use source the info down. If you cannot source it down, in your script, you will need to nlapiLoadRecord the parent to have access to its fields.
-
if(name=='custcolwdsp') { if(nlapiGetCurrentLineItemValue('item','itemtype')=='InvtPart') { ...
-
So Grade Card is a Custom Record, with Customer as a parent. On the Customer, you thus see a sublist, showing 3 lines of grade cards - each grade card has an exam score. You want a field to show the sum of all the Grade Card exam scores. The simplest way to do this would be to go to Setup->Customization->Sublists and…
-
if(nlapiGetRecordId()==null || nlapiGetRecordId()=='') should work I believe - record that have not been created yet do not have internal ids.
-
the function itself is triggered by any field change. The first if() in the code makes sure it is rate that is being changed. However, I think there is a complexity here. If I recall correctly, field changed may not be triggered when you add an item. I think you may need to have the same code on postSourcing of item.
-
Do you mean in a Search or you mean to say you want a field on a Record that you want to sum other fields? I'm guessing the later, since the former is pretty straightforward. In which case, you probably cannot do what you want with just a formula on a field, since the formula is not dynamic - it will load on record…
-
Not really, that's a strange error. But there's a few things you should validate - 1. I'm not 100% 'rate' is the proper field name for the unit price - might want to check that 2. I forget if there are other arguments to the nlapiGet/SetCurrentLineItemValue() that may be required 3. Make sure to replace custcol_whatever…
-
Ok, I have NOT tested the below, but it should be a good starting point - function fieldChange(type, name) { if(type=='item' && name=='rate') { if(nlapiGetCurrentLineItemValue('item','rate')=='' || nlapiGetCurrentLineItemValue('item','rate')==null) { var rate = nlapiGetCurrentLineItemValue('item','rate')…
-
You mean run the script, calculating on the fly the value you need to see? I've never had to do so myself, but I believe you can stick a value in a field that is marked as "do not store value" using a beforeLoad script.
-
nlapiGetFieldText() is not available as a User Event (before load) function. I think you can use nlapiGetFieldValue(), which will return the value id. If you absolutely need the text value, you can use nlapiLookupField(), specifying TRUE for the text parameter.
-
We have done something very similar for another customer, using scripting. There is no other option, really.
-
Well, the close button is just a shortcut that sets "closed" on every line item, as that is where the real "closed" status is kept. So no, I don think there is an event for it. You would require to loop through all your lines and check if they are closed. Since it's possible to close only 1 line item, you'll have to…
-
Is there a particular reason you aren't using nlapiGetFieldValue() instead of using DOM to get your value? I'm going to assume there isn't in the below code: function postSourcing(type, name){ if(name=='entity') { var internalPassword = nlapiGetFieldValue('custbody29'); if(internalPassword != ''){ alert("This customer has…
-
If I understand correctly, you did not check what field is triggering the post sourcing - something you always want to do. All your field change triggers should begin in this fashion - function postSourcing(type, name) { if(name=='fieldyouwant') { doSomething(); } }
-
Indeed. When creating from a Customer, the customer is directly populated, so the postSource would not be triggered in that case. Have the script run on pageInit as well. function pageInit(type) { if(type!='edit') { var internalPassword = nlapiGetFieldValue('custbody29'); if(internalPassword != ''){ alert("This customer…