How To Create Pull jobs for newly created Tables in AX retail 2012.
For creating Pull jobs for newely created tables, we need to follow the following steps :
1 . Create a new table as below :
2.Add below fields in table other than your normal fields :
RetailTerminalId
RetailStoreId
RetailStatementId
RetailStaffId
ReplicationCounter
3.Add below two methods in your table :
public RetailReplicationCounter maxReplicationCounterFromOrigin(RetailConnDistributionLocationId _locationId)
{
RetailPosBatchTable posBatchTable;
RetailTerminalTable terminalTable;
if (_locationId)
{
if (RetailStoreTable::find(_locationId))
{
select maxof(ReplicationCounter) from posBatchTable
where posBatchTable.StoreId == _locationId;
}
else
{
terminalTable = RetailTerminalTable::find(_locationId);
if (terminalTable)
{
select maxof(ReplicationCounter) from posBatchTable
where posBatchTable.TerminalId == terminalTable.TerminalId;
}
}
}
return posBatchTable.ReplicationCounter;
}
public void setMaxReplicationCounter(RetailConnDistributionLocationId _locationId, RetailReplicationCounter _counter)
{
RetailPosBatchTable posBatchTable;
RetailTerminalTable terminalTable;
if (_locationId)
{
if (RetailStoreTable::find(_locationId))
{
ttsbegin;
while select forupdate posBatchTable
where posBatchTable.StoreId == _locationId
&& posBatchTable.ReplicationCounter >= _counter
{
posBatchTable.ReplicationCounter = _counter;
posBatchTable.update();
}
ttscommit;
}
else
{
terminalTable = RetailTerminalTable::find(_locationId);
if (terminalTable)
{
ttsbegin;
while select forupdate posBatchTable
where posBatchTable.TerminalId == terminalTable.TerminalId
&& posBatchTable.ReplicationCounter >= _counter
{
posBatchTable.ReplicationCounter = _counter;
posBatchTable.update();
}
ttscommit;
}
}
}
}
Replace the RetailPosBatchTable with your table name.
4. Go to Retail ->Setup ->Retail Scheduler -> Distribution Location :
Select your distribution Location and click on Location table , select the table for which you want to pull data,click on Location fields , now you can add fields either Manually or you can use function button provided.
[Make sure to select only those fields which are available in corresponding AX table,else AX will throw error , filed in not available in table]
5. Now go to Retail ->Setup ->Retail Scheduler ->Scheduler subjob
Create a new subjob :
And set the important fields as below :
6.Click on Create TempDBStaging table , which will make a temporary table TableX .
TableX is being used by AX to hold staging data.
7. Now either you can create a new P-job or you can add this sub job in existing P-job.
Run the P-job and data will be pulled to AX from Store
[Off-course you should have retail settings in Place :) ]
hello, the Job is not working proberly ... it coping successfully .. then when change data and run again ... it does not work again
ReplyDelete!!!
please can u give me any hint for the solution
Trung tam day ke toan Tai cau giay
ReplyDeleteTrung tam day ke toan Tai tu liem
Trung tam day ke toan Tai thanh xuan
Trung tam day ke toan Tai ha dong
Trung tam day ke toan Tai long bien
Trung tam day ke toan Tai nguyen chinh thanh dong da
Trung tam day ke toan Tai minh khai hai ba trung
Trung tam day ke toan Tai bac ninh
Trung tam day ke toan Tai hai phong
Trung tam day ke toan Tai tphcm
Trung tam day ke toan Tai quan 3
Trung tam day ke toan Tai thu duc
Trung tam day ke toan Tai da nang
Trung tam day ke toan Tai bien hoa
Trung tam day ke toan Tai dong nai
Trung tam day ke toan Tai nam dinh
Trung tam day ke toan Tai thai binh
Trung tam day ke toan Tai bac giang
Trung tam day ke toan Tai vinh phuc
Trung tam day ke toan Tai thai nguyen
Trung tam day ke toan Tai quang ninh
Trung tam day ke toan Tai hai duong
Trung tam day ke toan Tai hung yen
Trung tam day ke toan Tai ha nam
Trung tam day ke toan Tai ninh binh
Trung tam day ke toan Tai nghe an
Trung tam day ke toan Tai vung tau
trung tâm kế toán tại bình dương
trung tâm kế toán tại an giang
trung tâm kế toán tại tiền giang
trung tâm kế toán tại cần thơ
Wow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Thanks shedstore promo code
ReplyDelete