Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

How to create batch job for doing multiple transfers in fixed assets X++

Posted on by 10,270

Please help if someone is stuck with it.

  • Junaid Idrees Profile Picture
    Junaid Idrees 12,740 on at
    RE: How to create batch job for doing multiple transfers in fixed assets X++

    Hi CodeHunter,

    I will not suggest to customize this process as we have standard functionality to transfer multiple assets by using Mass transfer option and i used it many times with at least 10 to 20 assets at a time with batch job and it worked perfectly.  In standard functionality there are many options/filters you can apply to transfer any assets. For example, Asset Book, Asset Group, Location, Department, etc.

    can you please share how many assets you are transfering at a time and how oftenly?

  • Codehunter Profile Picture
    Codehunter 10,270 on at
    RE: How to create batch job for doing multiple transfers in fixed assets X++

    Guys,

    Anybody knows if it is possible to get the args parms from form and send it directly to the job batch to run a specific function in the background

  • Codehunter Profile Picture
    Codehunter 10,270 on at
    RE: How to create batch job for doing multiple transfers in fixed assets X++

    Could you set a code example for what you mentioned previously?

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: How to create batch job for doing multiple transfers in fixed assets X++

    How will you access the data set by the users?

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: How to create batch job for doing multiple transfers in fixed assets X++

    You will still need to gather data from the users related to Transferring assets. You can try the second idea I mentioned in the comment.

  • Codehunter Profile Picture
    Codehunter 10,270 on at
    RE: How to create batch job for doing multiple transfers in fixed assets X++

    Why do I need to set a new table and insert data ? I am just thinking of calling run method in the batch class and set this transfer action inside ?

  • Codehunter Profile Picture
    Codehunter 10,270 on at
    RE: How to create batch job for doing multiple transfers in fixed assets X++

    I need to handle the transfer button in the top bar of the fixed assets to be managed through batch jobs instead of the UI phase . Please let me know how I could start implementing this part

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: How to create batch job for doing multiple transfers in fixed assets X++

    The class for the batch job needs to be created separately. When you say batch process inside the transfer section, what exactly are you referring to?

  • Codehunter Profile Picture
    Codehunter 10,270 on at
    RE: How to create batch job for doing multiple transfers in fixed assets X++

    Could you please tell me how to pro grammatically handle it through the batch job inside the transfer section.

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: How to create batch job for doing multiple transfers in fixed assets X++

    You have two options here -

    1. Force the logic execution in the server. For an example how Purchase order confirmation, product receipt etc. work. You can transfer the Forms\AssetTransfer\closedOk logic to a new class method which is has the keyword "server" in the signature. you can follow the example of PurchFormLetter\mainOnServer method for this.

    2. You can create a new table to store all the values entered in the form. . You can then write a batch job to be executed based on records in this table. You might want to have a checkbox field in this table as well for marking the record as processed on successful asset transfer. In this scenario, you just write the records into this table once the user clicks on "Update".

    For the  logic you can copy the one in AssetTransfer\closedOk without the part where the form "AssetTransferConfirmation" is being called so that no user interaction is necessary.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,986 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans