/// <summary> /// Invokes NetSuite's getSelectValue(..) method. /// </summary> /// <param name="fieldDescription">The field description.</param> /// <param name="pageIndex">Index of the page.</param> /// <returns></returns> public virtual GetSelectValueResult GetSelectValue( GetSelectValueFieldDescription fieldDescription, int pageIndex) { return(InvokeService <GetSelectValueResult>(new object[] { fieldDescription, pageIndex, }, "getSelectValue")); }
public async Task Can_execute_a_PickList_lookup_on_a_CustomRecord() { var gsvDesc = new GetSelectValueFieldDescription { customRecordType = new RecordRef { internalId = "54" }, field = "custrecord_advpromo_customer_sid" }; var result = await client.getSelectValueAsync(gsvDesc, 0); result.status.isSuccess.Should().BeTrue(); result.baseRefList.Should().NotBeNull(); }
private void LogInvocationMeaningfully(string method, object arg) { try { if (arg is CustomizationType) { _log.Debug(string.Format("Invoking method '{0}' with {1}", method, ((CustomizationType)arg).getCustomizationType.ToString())); } else if (arg != null && arg is Array && IsGetSelectValueInvocation(arg)) { Array argArray = (Array)arg; GetSelectValueFieldDescription fieldDesc = (GetSelectValueFieldDescription)argArray.GetValue(0); _log.Debug(string.Format( "Invoking method '{0}' with '{1}.{2}'", method, fieldDesc.customRecordType != null ? fieldDesc.customRecordType.internalId : fieldDesc.recordType.ToString(), fieldDesc.field)); } else if (arg is CustomRecordSearchBasic) { _log.Debug(string.Format( "Invoking Custom Record Search for RecType={1}", method, ((CustomRecordSearchBasic)arg).recType.internalId)); } else if (arg is GetAllRecordType) { _log.Debug("Retrieving All Records of Type " + ((GetAllRecordType)arg).ToString()); } else { _log.Debug(string.Format("Invoking method '{0}' with {1}", method, arg)); } } catch { } }
public virtual async System.Threading.Tasks.Task <GetSelectValueResult> getSelectValueAsync(GetSelectValueFieldDescription fieldDescription, int pageIndex) { var request = new getSelectValueRequest() { passport = passport, tokenPassport = tokenPassport, applicationInfo = applicationInfo, partnerInfo = partnerInfo, preferences = preferences, fieldDescription = fieldDescription, pageIndex = pageIndex, }; var response = await((NetSuitePortType)this).getSelectValueAsync(request); return(response.getSelectValueResult); }