Creating a Popup when adding an item to a sales or...
# suitescript
g
Creating a Popup when adding an item to a sales order. The SO is not yet saved. I'd like to access the customer on the SO - how would I go about doing that ?
j
You should be able to do so from your Client Script on the form. Example:
Copy code
function fieldChanged(context) {	
		
		// Check that the field that changed was the item.
		if(context.sublistId == 'item' && context.fieldId == 'item') {
			
			// Retrieve the Customer.
			var customer = context.currentRecord.getValue({fieldId: 'entity'});
						
			// Do your popup.
			
		}
		
	}
g
Thank You!