I need some coding help. First time trying this. I...
# suitescript
p
I need some coding help. First time trying this. I'm trying to get the debug to show the field value of the custom field. Other parts of the script execute ok. but this log is never written. custentity_usp_a = dropdown list It is the init function that is not working, thank you!
Copy code
/**
 *@NApiVersion 2.x
 *@NScriptType Portlet
 */
define(['N/record','N/log'],
    function(record,log) {
  function init(context)
  {
       var currentRecord = context.currentRecord;
       var entityUSPa = currentRecord.getText({fieldId: "custentity_usp_a"});
       log.debug({
         title: 'Customer Segment',
         details: 'Seg : ' + entityUSPa 
       }) 
  }
  
  
  function render(params) {
            params.portlet.title = 'Customer Dashboard Links';
            var entity = params.entity;
         


            log.debug({
                title: 'test',
				details: 'Customer ID : ' + entity
              
            });

            var html = 'TEST'

            params.portlet.html = html;

        }
        return {
            render: render,
 			init: init         
        };
    });
b