1
votes

Is there a way to get the customer internal id from current logged in user ? I don't have suitescript, so I'm not sure this is even possible.

PS: This is in checkout page

<script type="text/javascript">
    var internalId = ? // get current customer id
    $.getJSON( 'get_customer.php', { id: internalId } )
        .done(function( data ) {
            console.log(data);
        });
</script>
2

2 Answers

1
votes

Try using

<%=getCurrentAttribute('customer','internalid')%>

I think you are using NetSuite E-Commerce Website

0
votes

This works on the chrome console so I presume its callable via JS:

nlapiGetContext().user

Just type nlapiGetContext() and there are a bunch of available options.