How to use google drive video in your website

If you have your video on your google drive and you want to embed it to your website. you can follow the steps as below
1. Open your video on google drive
2. Click on ||| sign at the right top
3. Click on Open in New Window
4. Click on ||| Sign at the right top again
5. Click on Embeded Item
6. Copy the link on box "Paste HTML to embed in website:"  And paste to your website



How to Integrate Sales Order from Other System to SAP

In this example, I am going to integrate Sales Transaction from POS System to SAP Business One. To do this, I have separated some parts as below
I. Connection
 a. SAP Connection : Connection is the first require that you need to define. Without connection, you can do nothing. the connection contain some information such as SAP Server Address, System Landscape Address, Database Name, Database User, SAP User and SAP user password ( for SAP User, normally I use user manager for integration ).
 b. POS Connection: To get data from POS database, u need to define connection to POS System. There are alot of ways to get data from SQL database such as SQLDataAdapter, Entity, Linq...In this example, I am going to use Linq to get data from POS Database and integrate to SAP.
II. SAP Components
  SAP components, I refer to what object are you going to integrate to SAP such as Item Master Data, Business Partner Master Data, Sales Order, Purchase Order,..... you need to define which object? In this example, I am going to integrate Data from POS to AR Invoice.
III. Let's do it.
 a. Variable Declaration
   a.1 SAPbobsCOM.Company oCompany;
   a.2 SAPbobsCOM.Documents AR = null;
   a.3 POSDataContext db = null;
 b. Create Function
   b1. ConnecttoSAP: you need to set propertied as below
       db=new POSDataContext("Data Source=192.168.0.1;Initial Catalog=POSDB;Persist Security Info=True;User ID=sa;Password=1111");
       oCompany = new Company();
      
oCompany.Server = "192.168.0.1"; SAP Server Name
      
oCompany.LicenseServer =
"192.168.0.1"; SAP System Landscape
      
oCompany.CompanyDB = "SBODEMOAU"; SAP Database Name
      
oCompany.DbServerType =  BoDataServerTypes.dst_MSSQL2014; (It is your SQL Version)

       oCompany.DbUserName = "sa";
    
  oCompany.DbPassword = "1111"; SQL sa Password
    
  oCompany.UserName = "manager"; SAP User ( manager )
    
  oCompany.Password = "1111"; // manager password
       int i = oCompany.Connect();
       Noted: If i=0, mean you connect to SAP successfully
   b.2. Integrate Data to AR 
       foreach (Invoice inv in db.Invoices.Where(x => x.sync==null))//loop that get data from POS DB
      {

             AR = (SAPbobsCOM.Documents)oCompany.GetBusinessObject(BoObjectTypes.oInvoices);
          ////BoObjectTypes.oInvoices = AR Invoice, you can define other by just changing this value
          AR.CardCode = inv.bpcode;
          AR.CardName = inv.bpname;
          AR.DocDate = inv.docdate.Value; 

          foreach (invoiceitem item in inv.invoiceitems)//Loop to detail transaction detail item
          {

               AR.Lines.ItemCode = item.itemcode;
               AR.Lines.ItemDescription = item.itemname;
               AR.Lines.Quantity = (double)item.quantity.Value;
               AR.Lines.Price = (double)item.unitprice; 

               AR.Lines.DiscountPercent = (double)item.discountpercent.Value; 
               AR.Lines.WarehouseCode = item.whscode;
               AR.Lines.Add();
          }
         int haserror=AR.Add()         {
         Noted: If haserror==0 mean that this transaction already added to AR Invoice in SAP
        }

If you cannot integrate and got some error, you can paste your error in comment and I will help to solve for you. Have a great day!!! 

How to build SAP B1 Add On for 64bit

To build SAP Add On for 64bit Computers, there are several way to do such as AddOnRegDataGen, Visual Studio....In this, I am going to show with Visual Studio way. You can follow the step as below
 I. Part 1
 1. If it is the project, you need to create new project
 2. If it is the old project mean it has source code already, so you need to clean your project ( delete all file and folder in Bin Folder )
 3.Add UI and DIAPI to your add on project reference from C:\Program Files\SAP\SAP Business One DI API\DI API 90\SAPbobsCOM90.dll and C:\Program Files\SAP\SAP Business One\SAPbouiCOM.exe
 4. On project propertied, Build: keep plateform and target as "Any CPU" and Build your project
II. Part 2
 1. Create your installer project with B1DE and choose " EXE " from Part1 Step4
 2. Click on your Installer Solution and Press Ctrl+H( Find and Replace) and Type " AddOnInstallAPI.dll " by replace to "AddOnInstallAPI_x64.dll"
3. Go to project propertied=>Compile=>Target CPU is x64 and Build you project
4. R-Click on AddOnRegDataGenFile\AddOnRegDataGen.bat
5. Open your .ard file with Notedpad and replace << platform="N" >> to << "platform="X">> and save.
 After you followed the steps below, you can try to register your .ard file to Add On Adminstrator in SAP Business One.