vendredi 2 décembre 2022

Access value from a Netsuite hash, Enumerator

Hi I am trying to extract a value from a Netsuite hash inside custom fields, and some others, which typically look like this - `

"custbody_delivery_ticket_number"=>
 {
 "script_id"=>"custbody_delivery_ticket_number", 
 "internal_id"=>"2701", 
 "type"=>"platformCore:DateCustomFieldRef", 
 "attributes"=> {
 "value"=>"123abc"
 }

}` and want the value of it inside of attributes.

Have tried many different ways, but one in particular -

 delivery_ticket_number: "#{netsuite_sales_orders.custom_field_list.custom_fields.select['custbody_nef_meter_ticket_number']['attributes']['value']}", 

throws error for class Enumerator, NoMethodError: undefined method `[]' for #Enumerator:0x00005589ec778730 which indicates may be getting close, but doing something wrong.

If anyone has any idea how to get values from these kind of hashes?

(Am told by the system admin that it is the correct custbody identifier)

Many Thanks

Aucun commentaire:

Enregistrer un commentaire