Hi all, I have added a Custom field in Netsuite 'Test Field' of Record Type Account using NetSuite GUI(Web), but when fetching Account data using Netsuite API, I am getting all build in fields but not getting my custom field. I am using below code to get Account data.
public DataTable getAccountSearchBasic()
{
DataTable dtData = new DataTable();
AccountSearchBasic objSearch = new AccountSearchBasic();
try
{
string errorMsg = "";
LoginToService(ref errorMsg);
SearchResult result = _serviceInstance.search(objSearch);
try
{
_serviceInstance.logout();
}
catch (Exception ex)
{
}
List<Account> lstData = new List<Account>();
if (result.status.isSuccess)
{
for (int i = 0; i <= result.recordList.Length - 1; i += 1)
{
lstData.Add((Account)result.recordList[i]);
}
}
dtData = ConvertToDataTable<Account>(lstData);
}
catch (Exception ex)
{
throw ex;
}
return dtData;
}
Also please suggest me a way to get all fields (including custom) of a Record (Account, Department, Location) including their datatypes from NetSuite as I have to show these fields on my mapping screen.
Thanks.
Replies