how to synchronize a custom table with store connect

5
How to synchronize a custom table with Store Connect Beyond seed data, most likely partners are going to add custom tables into data synchronization with Store Connect. Here are the steps of adding a custom table “TestTable01” for POS DB synchronization. Create the table in AX Suppose we have 2 fields in this table: C1: int, C2: string Create the table in POS DB Go to POS DB in SQL SERVER and create this table. Note: In this example we are implicitly using RecID as primary key, so it must be included in POS side table. Since this table is not global, it contains DataAreaID field in AX. Whether DataAreaID is required at POS side depends on actual business requirement. Here we just include it. CREATE TABLE TESTTABLE01 ( C1 INT, C2 NVARCHAR(10), DATAAREAID NVARCHAR(4), RECID BIGINT PRIMARY KEY )

Upload: islam-sultan

Post on 23-Oct-2015

57 views

Category:

Documents


1 download

DESCRIPTION

How to Synchronize a Custom Table With Store Connect

TRANSCRIPT

How to synchronize a custom table with Store ConnectBeyond seed data, most likely partners are going to add custom tables into data synchronization with Store Connect.

Here are the steps of adding a custom table “TestTable01” for POS DB synchronization.

Create the table in AXSuppose we have 2 fields in this table: C1: int, C2: string

Create the table in POS DBGo to POS DB in SQL SERVER and create this table. Note: In this example we are implicitly using RecID as primary key, so it must be included in POS side table. Since this table is not global, it contains DataAreaID field in AX. Whether DataAreaID is required at POS side depends on actual business requirement. Here we just include it.

CREATE TABLE TESTTABLE01(

C1 INT,C2 NVARCHAR(10),DATAAREAID NVARCHAR(4),RECID BIGINT PRIMARY KEY

)

Define table schema in AXOpen form: Retail -> Setup -> Retail scheduler -> Retail channel schema

Since this table is for POS, pick “AX 2012 R2 POS” and click “Location tables” button

Create a new table “TESTTABLE01”

Then click “Location fields”, and add all 4 fields defined in POS DB (Note: “Type” and “Length” have been deprecated and can be ignored – you don’t need to define them. Only the field names matter.)

Define “normal” subjob in AXNormal subjob is for N-job which does a full-sync of the entire table.

Open form: Retail -> Setup -> Retail scheduler -> Scheduler subjobs

Create a new subjob like this:

Make sure “Retail channel schema” is picked as “AX 2012 R2 POS” Channel table name will list out all tables defined for “AX 2012 R2 POS”, where you will find

“TESTTABLE01” which has just been added to that schema Replicate DataAreaID: since we decided to send DataAreaID data, this needs to be check, and

after that, pick “DATAAREAID” field for “Field for DataAreaID”

Define transfer fieldsClick “Transfer field list” and add all field mappings, except for “DataAreaID”

Save and close.

Define scheduler jobYou can add this subjob “ADDP-TST01” to existing job, or create a new job for it, depending on business requirement. Here we just create a new job.

Open form: Retail -> Setup -> Retail scheduler -> Scheduler jobs, and create a new job like this:

Make sure you include the newly created subjob here.

Make sure you picked “Retail channel schema” as “AX 2012 R2 POS”, and since this is for “normal” subjob, the “Job execution class” must be “RetailConnReplicationNJob”.

Define schedule to run this jobYou can add this job to one of the existing Retail schedules, or create a new schedule for it, depending on business requirement. Here we just create a new schedule.

Open form: Retail -> Periodic -> Data distribution -> Distribution schedule, create a new schedule like this:

Make sure you include the newly added job “N-9000” here.