German
German

Reputation: 1

How to access and edit Customer Unit Price via Script

Good afternoon, I need know how I can access to the unit price field outside the customer record, this field is in customer --> Financial SubTab --> and sublist Item Pricing. I need edit this value via script but now I don't know how I can access to this field and where/when this value is generated because this value is no in the item. Thanks for your time! enter image description here

I was searching how this value is generated, in the record browser I found this about the unit price but I cant found in the item record enter image description here

Upvotes: 0

Views: 143

Answers (1)

wozzarvl
wozzarvl

Reputation: 364

ItemPricing it´s a sublist from customer record you can loop with this

   var customer = record.load({
            type: record.Type.CUSTOMER, 
            id: internalid,
            isDynamic: true
        });


for ( var j = 0; j < customer.getLineCount( 'itempricing'); j++ ) {

    var  infoField=customer.getSublistValue( 'itempricing', 'FIELD YOU ARE LOOKING FOR', j ) 

}

Upvotes: 0

Related Questions