Hi, I created a field on address form using Other ...
# suitescript
t
Hi, I created a field on address form using Other Record fields. But It is not showing on address form on vendor record. Please suggest If i am missing something.field 'State External'
c
You may need to edit the address form itself to make the field visible.
t
@cja what edit should I do?
c
message has been deleted
Sorry, I've just realised that was where you were already
Is that address form selected for all countries?
message has been deleted
t
no, not for all country,,.. Country is blank...Should I include all ?
c
Do you have any other address forms? And if so, do they have any countries selected?
t
Yes I select it for all countries and it is visible now...but I am using script to set this field.. but it is not working
c
Ok. You'll need to provide a lot more information to get help with your script
t
venrec.selectNewLineItem('addressbook') venrec.setCurrentLineItemValue('addressbook','defaultbilling','T'); venrec.setCurrentLineItemValue('addressbook','defaultshipping','T'); //venrec.setCurrentLineItemValue('addressbook','attention',attention); //venrec.setCurrentLineItemValue('addressbook','addressee',addressee); //venrec.setCurrentLineItemValue('addressbook','addr1',addr1); //venrec.setCurrentLineItemValue('addressbook','addr2',addr2); //venrec.setCurrentLineItemValue('addressbook','city',city); //venrec.setCurrentLineItemValue('addressbook','state',state); //venrec.setCurrentLineItemValue('addressbook','country',country); //venrec.setCurrentLineItemValue('addressbook','zip',zip); //venrec.setCurrentLineItemValue('addressbook','custrecord_upy_state_external',stateexternal); var subrecord = venrec.createCurrentLineItemSubrecord('addressbook', 'addressbookaddress'); subrecord.setFieldValue('addressee', 'NetSuite Inc.'); subrecord.setFieldValue('addr1', addr1); subrecord.setFieldValue('addr2', addr2); subrecord.setFieldValue('city', city); subrecord.setFieldValue('state', state); subrecord.setFieldValue('country',country); subrecord.setFieldValue('zip', zip); subrecord.setFieldValue('custrecord_upy_state_external', stateexternal); //commit subrecord and line item subrecord.commit(); venrec.commitLineItem('addressbook');
this is the code that I am using to set custrecord_upy_state_external on address form. The field type is other record field