In one of our project we have requirement to Add few fields in customer group table and sync these fields with MPOS channel database.
To fulfill this requirement we were following this link
Lets Begin
Step-1
Create New straight table SLD_CustGroup and the same table we created in Channel database as well..
Step-2
Take Insert and update post handler of Cust group and perform insert and update on new table like below screenshot.
Step-3
Create a new resource file to add all custom job information. Here is the template for the resource file and save on any path.
<RetailCdxSeedData ChannelDBMajorVersion="7" ChannelDBSchema="ext" Name="AX7">
<Subjobs>
<Subjob Id="SLD_CustGroup" TargetTableSchema="ext" AxTableName="SLD_CustGroup" IsUpload="false">
<ScheduledByJobs>
<ScheduledByJob>1010</ScheduledByJob>
<!--add existing subjob to another job-->
</ScheduledByJobs>
<AxFields>
<Field Name="CustGroup"/>
<Field Name="SLD_PurchaseLimit"/>
<Field Name="SLD_AllowSale"/>
<Field Name="RecId"/>
</AxFields>
</Subjob>
</Subjobs>
</RetailCdxSeedData>
Following are some information about tags of XML. You can find the detail on this Link
- ChannelDBSchema – The extension schema that you created in the channel database.
- TargetTableSchema – The extension schema that you created in the channel database to add your custom tables.
- AxTableName – The table name.
- IsUpload – A flag that determines whether the job is a push job or a pull job. (In other words, the flag indicates whether you want to send data from Retail HQ to the channel database or pull data from the channel database to Retail HQ). The default value is false, which indicates that you're sending data from Retail HQ to the channel database.
- ScheduledByJob – This resource file contains one or more subjobs.
- Subjob – Each table is added as a subjob, and each subjob is scheduled by one or more scheduler jobs.
- TargetTable – The name of the channel database table. This table is the target table that the push job or pull job must send data to. If a value isn't specified, the system assumes that name of the target table and the name of the source table are the same.
Step-4 Add new resource file and associate the XML file with
Step-5
Subscribe the Delegate registerCDXSeedDataExtension of RetailCDXSeedDataBase in the new class and write the following code to load your newly created Resource file.
Add the resource like below
For Example
resources.addEnd(resourceStr(RetailCDXSeedData_CustGroup));
Step-6
Now perform the build complete model and Sync database.
Step-7
To initialize or reinitialize the CDX module with the customized configuration, follow these steps:
- Go to Retail > Headquarters setup > Retail scheduler > Scheduler jobs > Initialize retail scheduler.
- In the dialog box that appears, select Delete existing configuration.
- Select OK to start the initialization.When the initialization is completed, the CDX scheduler jobs, subjob definitions, and distribution schedules are updated by using the original RetailCDXSeedDataAX7 resource and the customized RetailCDXSeedData_CustGroup resource.
Step-8
For Verification search Scheduler jobs in AX and search bar job 1010. You will find the sub job please check the below screenshot.
Step-9
Click on Sub job to verify that fields are appearing or not..
Feel free to contact me if you are facing any issue.












Tidak ada komentar:
Posting Komentar