This topic contains 2 replies, has 0 voices, and was last updated by chanarbon 8 years, 2 months ago.

  • Author
    Posts
  • #6634

    adurangalvis

    Hello,

    Like the title states, we would like to add a file to a folder in our file cabinet using web services in c#. Has any one had any luck doing this, I cannot find any documentation.

    thank you
    This is a cached copy. Click here to see the original post.

  • #6635

    Daniel Giguere

    Hello,

    With a RESTlet, you can post a JSON object containing your file content encoded in base 64, along with the filename. Then to add the file to the file cabinet, use :

    Code:
    var file = nlapiCreateFile(filename, filetype, filecontentbase64);
    file.setFolder(folder);
    var fileInternalId = nlapiSubmitFile(file);
    Similarly with SuiteTalk, you need to add a File ( https://system.netsuite.com/help/hel…cord/file.html ), and set its folder and content the same way.

  • #6636

    chanarbon

    Hi @adurangalvis,

    Here’s a quick tip to deal with this concern, you may refer to the Microsoft .NET sample application for CRM in SuiteTalk Developer Resources @ .http://www.netsuite.com/portal/devel…ications.shtml

    You may check out the uploadFile() function in NSClientCRM.cs from the sample application for downloadable from the Developer Resources site.

You must be logged in to reply to this topic.