This topic contains 0 replies, has 0 voices, and was last updated by Daniel.Cesare 9 years, 5 months ago.

  • Author
    Posts
  • #6942

    Daniel.Cesare

    Currently I am using a Project Saved Search to get a project from NetSuite. As part of this search, I am also returning File information from the File Cabinet so I can display this project has these files attached to it. I posted my code below to show what I am doing currently. Is there a way I can do a fileJoin in order to get file information from a project in web services?

    public List tcGetProjects(string internalId)

    {

    List projects = new List();

    //Set some preferences for the search

    SearchPreferences projectSearchPreferences = new SearchPreferences();

    projectSearchPreferences.pageSize = 50;

    projectSearchPreferences.pageSizeSpecified = true;

    projectSearchPreferences.bodyFieldsOnly = true;

    this.searchPreferences = projectSearchPreferences;

    JobSearchAdvanced projectSearchAdv = new JobSearchAdvanced();

    projectSearchAdv.savedSearchId = “7730”;

    JobSearch projectSearch = new JobSearch();

    projectSearch.basic = new JobSearchBasic();

    projectSearch.basic.internalIdNumber = new SearchLongField();

    projectSearch.basic.internalIdNumber.@operator = SearchLongFieldOperator.equalTo;

    projectSearch.basic.internalIdNumber.operatorSpeci fied = true;

    projectSearch.basic.internalIdNumber.searchValue = Convert.ToInt64(internalId);

    projectSearch.basic.internalIdNumber.searchValueSp ecified = true;

    projectSearchAdv.criteria = projectSearch;

    SearchResult response = this.search(projectSearchAdv);

    if (response.status.isSuccess)

    {

    tcProcessFileSearchResponse(response, projects, projectSearchPreferences.pageSize);

    SearchResult searchMoreResult = tcSearchMore(response);

    while (searchMoreResult != null)

    {

    tcProcessFileSearchResponse(response, projects, projectSearchPreferences.pageSize);

    searchMoreResult = tcSearchMore(searchMoreResult);

    }

    }

    return projects;

    }

    public void tcProcessFileSearchResponse(SearchResult response, List projects, int pageSize)

    {

    SearchRow[] records = response.searchRowList;

    for (int i = 0, j = (response.pageIndex – 1) * pageSize; i This is a cached copy. Click here to see the original post.

You must be logged in to reply to this topic.