Skip to content

Instantly share code, notes, and snippets.

View cafeasp's full-sized avatar

Victor Pacheco cafeasp

View GitHub Profile
@cafeasp
cafeasp / CloseSalesOrder.js
Created July 19, 2019 22:21
Sales Order - Close Sales Order
function closeSalesOrder(salesOrderInternalId) {
try {
var order = record.load({
id: salesOrderInternalId,
type: record.Type.SALES_ORDER,
isDynamic: true
});
var itemIndex = 0;
@cafeasp
cafeasp / Suitelet-CloseSalesOrder.js
Created July 24, 2019 10:11
NetSuite-Suitelet Suite Script Close Sales Order
/**
* @NApiVersion 2.x
* @NScriptType Suitelet
* @NModuleScope SameAccount
*/
define(['N/file', 'N/record', 'N/redirect', 'N/search', 'N/ui/serverWidget', 'N/runtime', 'N/email'],
/**
* @param {file} file
* @param {record} record
* @param {redirect} redirect
@cafeasp
cafeasp / Google Drive API C#
Last active November 9, 2023 10:59
Google Drive API Demo. For this to work you need to get the credentials.
using Google.Apis.Auth.OAuth2;
using Google.Apis.Drive.v3;
using Google.Apis.Services;
using Google.Apis.Util.Store;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
@cafeasp
cafeasp / AppSettings.config
Created October 22, 2022 01:32
This is an xml file that will get merge with Web.config file in Visual Studio
<?xml version="1.0" encoding="utf-8" ?>
<appSettings>
<add key="Scope" value="read_products"/>
<add key="ShopifyApiVersion" value="2020-10"/>
<add key="Secret" value="secret_key"/>
<add key="AppId" value="api_key"/>
</appSettings>
@cafeasp
cafeasp / parse-edi-file.cs
Created February 23, 2023 14:33
.net to parse an edi file
using System.Text;
using EdiEngine;
using EdiEngine.Runtime;
using Newtonsoft.Json;
namespace ParseEDI;
class Program
{
static async Task Main(string[] args)
{