web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Create Journals using recurring integrations/Recurring Data Jobs

Sukrut Parab Profile Picture Sukrut Parab 71,710 Moderator

Recently I worked on integrating payroll information from workday to dynamics 365 for operations. I used recurring integrations to create journals with in Dynamics 365 for finance and operations. Data management package API and recurring integration can be useful in such a scenarios .

I used duplicate of  LedgerJournalEntity for this purpose as I wanted to change some logic in the entity.  Remember one thing while using this entity , it does set based operations and allocates different journal numbers while inserting data in to staging . So suppose if you have 1000 lines coming in a request from third party application thousand different journals are created but you might not want to do that . To overcome this issue, small piece of code  is needed. That can be done in postGetStagingData method of the entity , where you can generate journal number and update staging.

First step is to create endpoint. To create endpoint import data projects needs to be created , which can be done from data management . Once you create data project , you can create recurring data job from there. Process is well described in the recurring integration  article .

 

My Endpoint looks like this :

https://Mydev-dev678988fead9603c9devaos.cloudax.dynamics.com/api/connector/enqueue/{59FE8AFF-B9BA-44C2-8AD9-BE3AC9DA9250}?entity=PayrollJournal&company=’USMF’

 

Company parameter is needed when you want to create journals in different companies . When you set up recurring data job there is an option to run your request in specific company.

UseCompany.JPG

I will demonstrate this process  using postman here , as I don’t have workday studio to simulate the process.

Below step shows how to acquire token. You can automate the same thing in postman while  executing actual request as well.

GetToken.JPG

Here is request looks like . Token generated in first step is used for authorization .  

request1.JPG

Request.JPG

I used XML in this example . Here is sample XML

<Document>

   <LedgerJournalEntity>
      <JOURNALBATCHNUMBER/>
      <LINENUMBER>1.0000000000000000</LINENUMBER>
      <ACCOUNTTYPE>Bank</ACCOUNTTYPE>
      <ACCOUNTDISPLAYVALUE>CAA-Pay</ACCOUNTDISPLAYVALUE>
      <PAYMENTMETHOD/>
      <PAYMENTREFERENCE>BAN004</PAYMENTREFERENCE>
      <POSTINGLAYER>Current</POSTINGLAYER>
      <POSTINGPROFILE/>
      <QUANTITY>0.000000</QUANTITY>
      <REVERSEDATE>1900-01-01T00:00:00</REVERSEDATE>
      <REVERSEENTRY>No</REVERSEENTRY>
      <SALESTAXCODE/>
      <SALESTAXGROUP/>
      <TAXEXEMPTNUMBER/>
     <TEXT>08/16/2018 - 08/31/2018 (Semi-Monthly (Exempt))</TEXT>
      <TRANSDATE>2018-06-15T00:00:00</TRANSDATE>
      <VOUCHER>Test123</VOUCHER>
      <COMPANY>caa</COMPANY>
   </LedgerJournalEntity>
</Document>

Once the request is sent, its queued in messages queue which will be processed by batch job.Batch job recurrence can be set up while creating recurring data job.

 Message.JPG

Once message is processed , you can see execution history from the message itself.

executionHistory.JPG

Here is journal created after processing of the message

Journal.JPG

If you have any questions feel free to comment.

 

Comments

*This post is locked for comments