This topic contains 3 replies, has 0 voices, and was last updated by gourisankar 6 years, 4 months ago.
-
AuthorPosts
-
May 7, 2018 at 7:47 pm #21270
adityasrivalliNeed help in understanding how we can access the custom fields set on the address subrecord.
Basically I am loading the customer record in dynamic mode and read the custom field values on the address subrecord using the subrecord view sublist API's , no luck ended up with errors invalid subrecord operation.
Tried using the record API, viewSubrecord() => resulted in SSS_INVALID_FIELD_ON_SUBRECORD_OPERATION.
Request ideas on how to achieve this.
Thank you,
This is a cached copy. Click here to see the original post. -
May 16, 2018 at 11:07 pm #21271
seiferHi there
You've got the same problem I posted over a year ago at https://usergroup.netsuite.com/users…ress-subrecord
Unfortunately, I never worked out a solution.
Good luck. Hopefully someone figures this out.
Maybe time to explore doing this in SuiteScript 2.0 ?
Kane
-
May 17, 2018 at 6:29 pm #21272
adityasrivalliI tried using an inline Suitelet to extract the required info on the client script that worked as expected.
HTML Code:
function testClient(type){
var url = nlapiResolveURL('SUITELET', 142, 'customdeploy1');
var val = nlapiRequestURL("https://system.netsuite.com/"+url+"&custparam_cu=7");
nlapiSetFieldValue('memo',val.getBody());
}function suiteletFromClient(request,response){
var cu = request.getParameter('custparam_cu');
var rec = nlapiLoadRecord('customer',cu);
var addr = rec.viewLineItemSubrecord('addressbook','addressbookaddress',1);
var val = addr.getFieldValue('custrecord14');
response.write(val);
} -
June 27, 2018 at 4:57 am #21273
gourisankarHi Aditya,
var cu = request.getParameter('custparam_cu'); var record = nlapiLoadRecord('customer', cu,{recordmode: 'dynamic'});
record.selectLineItem('addressbook', 1);
var subrecord = record.viewCurrentLineItemSubrecord('addressbook', 'addressbookaddress');
var country = subrecord.getFieldValue('custrecord14');
-
AuthorPosts
You must be logged in to reply to this topic.