I have a project I need assistance with using javascript. I am needing to reverese the view order in which the suppliers are when a user clicks on the Supplier field. For example please see image 1. Now I found the code that pulls in that table in on that page: See image 2. The variable: var supplierField = form.addField('custpage_supplier', 'select', 'Supplier', 'customrecord_reorder_suppliers').setLayoutType('startrow'); This is the code and in particular this id: 'customrecord_reorder_suppliers' is pulling in the field values for screen shot 1. However, I am not sure how to change the order view. Currently the order view is: Number Supplier Name => (12344 Walmart) My goal is to change it to: Supplier Name Number => (Walmart 12344) I have tried using the built in JS methods like so: 'customrecord_reorder_suppliers'.split(' ').reverse().join(' ') but to no avail. I also created a new variable and reassigned the initial variable and called the same methods on the new variable and it still did not work. If someone can help me work through this that would be great.
I have a project I need assistance with using javascript. I am needing to reverese the view order in which the suppliers are when a user clicks on the Supplier field. For example please see image 1.
Now I found the code that pulls in that table in on that page: See image 2.
The variable:
var supplierField = form.addField('custpage_supplier', 'select', 'Supplier', 'customrecord_reorder_suppliers').setLayoutType('startrow');
This is the code and in particular this id: 'customrecord_reorder_suppliers' is pulling in the field values for screen shot 1. However, I am not sure how to change the order view.
Currently the order view is: Number Supplier Name => (12344 Walmart)
My goal is to change it to: Supplier Name Number => (Walmart 12344)
I have tried using the built in JS methods like so: 'customrecord_reorder_suppliers'.split(' ').reverse().join(' ') but to no avail. I also created a new variable and reassigned the initial variable and called the same methods on the new variable and it still did not work.
If someone can help me work through this that would be great.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Thank you for your response. I was wanting to know how do I do it with the exisiting script in the screen shot? This is on NetSuite which is an Oracle product. The field values are coming from a record table that was created in NetSuite and it is a string datatype.