Hi guys,
I have written a little script that extracts some data from a couple of fields and places their contents into the message field for invoicing.
The problem appears to be that thenlapiLoadRecord function doesnt want to work within IE 7.
the script is below.
function MessageFieldText() { var CustomerID = nlapiGetFieldValue('entity'); var CustRecord = nlapiLoadRecord('customer', CustomerID ); var ShippingInfo = CustRecord.getFieldValue('custentityshippinginformation') ; if(ShippingInfo == 'T') { // get field variables for placement into message area. var EndUser = nlapiGetFieldValue('custbody_proj_euser_name'); var ComCode = nlapiGetFieldValue('custbody_proj_company_code'); var BusArea = nlapiGetFieldValue('custbody_proj_business_area'); var CosCent = nlapiGetFieldValue('custbody_proj_cost_centre'); var LeaseNo = nlapiGetFieldValue('custbody_proj_lease_no'); var MessageString = EndUser + 'n' + ComCode + 'n' + BusArea + 'n' + CosCent + 'n' + LeaseNo ; nlapiSetFieldValue('message',MessageString) ; } } as you can see i am loading up the customer record, pending on the ID selected from the CustomerID. I have done all the normal testingby placing alerts etc throughout the page and am finding that within IE 7 the CustRecord variable displays as undefined.In firefox however, the object returns successfully.any ideas on why this is failing. And before you ask... yes I have tested it on a few other machines. lol.