Be.Smart ERP Connector
(EN) ERP Connector
(EN) ERP Connector
  • ℹ️What is ERP Connector?
  • ⚙️System Requirements
  • 🔑Installation & Activation Guide
  • 🆕What's New
    • Versions 30.1.0.6, 29.3.0.5, 28.8.0.5 & 27.14.0.5
    • Versions 30.0.0.3, 29.2.1.2, 28.7.3.3 & 27.13.0.5
    • Versions 28.7.1.1, 27.13.0.1
    • Versions 29.2.1.0, 28.7.1.0, 27.13.0.0
    • Versions 29.1.0.0, 28.6.0.0, 27.12.0.0
    • Versions 29.0.0.1 & 28.5.1.1
  • Data Interface - Reference Manual
    • Abbreviations
    • Data interface
      • Data tables, relations
        • Table EcENTITY
        • Table EcASSOC
        • Table EcLINK
        • Table EcLOG
        • Stored procedure EcWriteEntity
    • Exporting data from a Vault
      • Properties / Attributes
      • Associations
      • Links
      • Reading data from data interface
        • Workflow sample
        • Another samples
    • Importing data into a Vault
      • Mandatory EcENTITY table fields
      • Default values
      • LifeCycle States
      • Writing data into data interface
        • Using SQL Stored Procedure
          • Example #1 – insert single EcENTITY record
          • Example #2 – insert two associated EcENTITY records
        • Using SQL syntax
        • Using SQL Management Studio
    • SQL views
      • ERP data displayed dynamically in VE Tab
        • SQL view definition sample:
      • ERP synchronized enums
    • Logging
    • Using thumbnail image data
Powered by GitBook
On this page

Was this helpful?

  1. Data Interface - Reference Manual
  2. Importing data into a Vault
  3. Writing data into data interface
  4. Using SQL Stored Procedure

Example #2 – insert two associated EcENTITY records

Example #2 – insert two associated EcENTITY records

DECLARE @BulkID int, @EntName nvarchar(100), @EntClassID nvarchar(10)
DECLARE @CldId bigint, @ParId bigint;
SET @BulkID = NULL;
SET @EntName = 'PurchItem 123';
EXEC @CldId = EcWriteEntity @EntName, @BulkID OUTPUT
UPDATE EcENTITY SET category = N'Purchased' WHERE id = @CldId;
SET @EntClassID = 'CUSTENT';
SET @EntName = 'PurchRequest';
EXEC @ParId = EcWriteEntity @EntName, @BulkID OUTPUT, @EntClassID
UPDATE EcENTITY SET
guid = '25737496-b00d-4f2f-a898-2c7df05250d6',
lfcycst_name = N'Approved'
WHERE id = @ParId;
INSERT INTO EcASSOC
(ent_id_parent, ent_id_child, assoc_type)
VALUES
(@ParId, @CldId, 30);
UPDATE EcENTITY SET comm_status = 0 WHERE bulk_id = @BulkID;
SELECT @BulkID;
PreviousExample #1 – insert single EcENTITY recordNextUsing SQL syntax

Last updated 12 months ago

Was this helpful?