0
votes

One type of transaction in NetSuite is "Currency Revaluation" and there are examples of such transactions (e.g. see those with InternalIDs 3335, 3346 and 3347 in the NetSuite testdrive sample data, Honeycomb Mfg). I would like to know how to retrieve these transactions using the SuiteTalk web service API. I can get other types of transaction very easily, for example using the following Java code (simplified for clarity):

TransactionSearchBasic srch = new TransactionSearchBasic();
srch.setRecordType(new SearchStringField(RecordType._invoice, SearchStringFieldOperator.is));
SearchResult res = stub.search(srch);
if (res.getStatus().isIsSuccess()) {
    for (Record rec : res.getRecordList().getRecord()) {
        Invoice inv = (Invoice) rec;
        // ... do things with inv ...
    }
}

Now the problem is that, while there are many different transaction record types in SuiteTalk, such as the above (RecordType.invoice and class Invoice), there doesn't seem to be a record type for currency revaluations defined in the web service. How do you search for these?

1
Did you try using fxreval ?Rockstar
@Rockstar yes I did. There is no such thing as RecordType._fxReval (or any similar spelling) and the recordtype parameter is mandatory. Also there is no such thing as an FxReval class. I tried to hack it by creating my own FxReval RecordType instance and that resulted in the web service returning an error status code with a message saying I've used an invalid record type name.Klitos Kyriacou
Not sure, but var rec = nlapiLoadRecord('fxreval',3335); working pretty fine in debuger for me. You can see the xml response representing the record also, its showing <record recordType="fxreval" id="3335" perm="4"Rockstar
Thanks @Rockstar but your solution is using SuiteScript while I'm using SuiteTalk, the SOAP web service. I'm using it in a Java application, though I can take answers using SuiteTalk in C# or any other language. I've taken your line of SuiteScript code and tried to use it in a SuiteTalk 'get' SOAP operation but got the following error message: "RemoteException: org.xml.sax.SAXException: fxreval is not a legal value for {urn:types.core_2015_1.platform.webservices.netsuite.com}RecordType".Klitos Kyriacou

1 Answers

0
votes

If the transaction you need in this case fxreval is not in the section of schema browser, you can not access it from webservice.

https://system.na1.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2016_2/schema/record/fairvalueprice.html