Tuesday, October 25, 2022

How to improve performance for purchase order receipt and confirmation posting in batch in Microsoft Dynamics 365 Supply Chain Management

If you experience any performance issues with these 2 processes: purchase order receipt and confirmation posting in batch, with 10.0.25 you can improve this. What you can do, you can enable multithreading/paralleling these processes. For instance, you are posting a huge number of product receipts within 1 batch, now you can split those product receipts into parallel threads, that will speed up the overall posting process. 

There are 2 parameters available to control this:


Documents per task: Controls how many orders will post per task. This will be useful if a batch job picks up a big number of orders for posting.

Lines per task: limits the number of lines per order that will post in a single task. This is great for orders volume with uneven number of order lines, so that those orders with bigger/biggest number of postings will be in new posting threads.

  • This parameter will not! split order lines of individual order into separate batch tasks, it will only ensure that those whole orders whose lines exceed the lines per task setting (2) go into their own new batch task/thread for posting
  • This parameter takes precedence over the Documents per task parameter (1), so if the parameter 2 is greater than 0, the parameter 1 is ignored. 
  • This parameter is only available once the feature Limit the number of purchase order lines per batch task is enabled.


 

Couple of examples for easier understanding:

Example 1:

Parameter 1: 5
Parameter 2: 0 
These are defaults

Product receipt batch job picks up 6 orders


Result: 2 posting batch tasks will be created.

Example 2:

Parameter 1: 5
Parameter 2: 10

Product receipt batch job picks up 4 following orders:
Order 1 with 10 lines
Order 2 with 20 lines
Order 3 with 3 lines
Order 4 with 11 lines

Result: 3 posting batch tasks will be created:   
1st task picks up order 1, 
2nd task picks up order 2 and order 3
3rd task picks up order 4

That's it!

Friday, October 7, 2022

Microsoft Dynamics 365 SCM: Data entities templates to speed up your implementation

There are multiple data entities templates available out of the box that are aimed to speed up the configuration and data import. 

I will show you how you can set it up and use it.

Walkthrough:

  • Go to Data management workspace
  • Select Framework parameters tile
  • Select Entities settings tab
  • Select Refresh entity list button and wait until batch job is completed
  • Select Templates Tile

  • Select Load default templates
  • Select the template you would like to load

  • Once the load is done, the template will be displayed.

You can now use this template to upload data needed in the right order.

Thursday, August 18, 2022

Ideas implemented in Microsoft Dynamics 365 SCM: Vendor group default financial dimensions

In these series of posts, I would like to go through some ideas that were implemented and show case the actual features details:

Vendor group default financial dimensions: 

See ideas for your reference:

In 10.0.28 this feature has been introduced:

This feature enable you to setup default financial dimensions on the vendor group and set financial dimensions on the vendor based on the vendor group selected. The concept is similar to the exact same functionality on the Customer side.

Walkthrough: 
  • Go to Accounts payable > Vendors > Vendor groups.
  • Select Vendor group tab on the Action pane and select Default financial dimensions button.
  • Define the financial dimensions values.

  • Navigate to Accounts payable > Vendors > All vendors.
  • Select New button.
  • Set mandatory fields like Vendor account number, Name. 
  • Set the Vendor group field. Based on the selected group financial dimensions will be defaulted to the vendor.


  • Expand Financial dimensions tab. Notice that financial dimensions are automatically set.
  • Change the Vendor group field value. 
  • Confirmation dialog will be shown. 
    • If you select Yes, the Vendor group will be changed and Financial dimensions will be overridden. 
    • If you select Cancel, the Vendor group value will be reverted back to the previous saved value. 


You can also track financial dimension for Vendor group and use "Copy values to this dimensions on each vendor group created". I will first start off by saying what this Copy flag does. If this parameter is enabled, when you create a new vendor group and vendor group is defined as a financial dimension, default financial dimensions for that vendor group will be filled in with the created Vendor group ID.  


Walkthrough: 
  • Go to General ledger > Chart of accounts > Dimensions > Financial dimensions.
  • Create a new financial dimension Vendor group.
  • Do not set "Copy values to this...."


  • Select Activate button (You will need to turn off maintenance mode)
  • Create a new Vendor group.
  • Select Default financial dimensions button. Notice that Vendor group financial dimension is blank.

  • Create a new Vendor with the created vendor group.
  • Notice that Vendor group financial dimension is blank as well.
  • Go to the Financial dimensions and set "Copy values to this...." to Yes.

  • Create a new Vendor group.
  • Select Default financial dimensions button. Notice that Vendor group financial dimension is set based on the Vendor group ID.

  • Create a new Vendor with the created vendor group.
  • Notice that Vendor group financial dimension is filled automatically by the vendor group selected.
That's it!

Thursday, August 11, 2022

WHS release to warehouse related classes in Microsoft Dynamics 365 SCM

Quite recently we needed to find all classes that are used for Release to warehouse functionality. As you might know, there are multiple release to warehouses options:

For instance, 

  • Accounts receivable > Orders > All sales order > Warehouse tab on the Action pane > Release to warehouse
  • Inventory management > Outbound order > Transfer order > Ship tab on the Action pane > Release to warehouse
  • And the rest that are under release to warehouse group in the Warehouse management module:


So, below is the list of all classes utilized by different releases to warehouse:



That's it!

Tuesday, August 9, 2022

Query to retrieve roles, duties and privileges information for a given user and resource in Microsoft Dynamics 365 SCM

In this blog post I would like to provide useful queries for retrieving roles, duties and privileges information. 


DECLARE @Resource varchar(250)

DECLARE @NetworkAlias varchar(250)

 

SET @Resource = '<<RESOURCE NAME>>' -- sample: BATCHABORT, SALESLINE

SET @NetworkAlias = '<<NETWORK ALIAS>>' <name>@d365operationslicensing.ccsctp.net

 

DECLARE @UserID varchar(100)

 

SELECT @UserID = ID FROM USERINFO

WHERE NETWORKALIAS = @NetworkAlias

 

1. Roles for given User

SELECT DISTINCT SECURITYROLE, SR.AOTNAME, SR.NAME 

FROM SECURITYUSERROLE SUR

JOIN SECURITYROLE SR

ON SR.RECID = SUR.SECURITYROLE

WHERE SUR.USER_ = @UserID

AND SUR.ASSIGNMENTSTATUS = 1


1a. Roles specific to a company/organization

SELECT DISTINCT 

USER_ AS [USER ID], 

SUR.SECURITYROLE AS [ROLE ID],

SR.NAME AS [ROLE NAME],

ISNULL(CSR.DATAAREA, '4ALL') AS [COMPANY]

FROM SECURITYUSERROLE SUR

LEFT JOIN SECURITYUSERROLECONDITION CSR

ON SUR.RECID = CSR.SECURITYUSERROLE

JOIN SECURITYROLE SR

ON SR.RECID = SUR.SECURITYROLE

WHERE SUR.USER_ = @UserID

AND ASSIGNMENTSTATUS = 1

 

2. Roles and sub-roles for given User 

SELECT RECID AS [SECURITYROLE], AOTNAME, NAME, 'Yes' AS [IS SUB ROLE]

FROM SECURITYROLE SR

WHERE RECID IN

(SELECT SECURITYSUBROLE

FROM SECURITYSUBROLE 

WHERE SECURITYROLE IN

(SELECT SECURITYROLE 

FROM SECURITYUSERROLE

WHERE USER_ = @UserID

AND ASSIGNMENTSTATUS = 1

))

UNION

SELECT RECID AS [SECURITYROLE], AOTNAME, NAME, 'No' AS [IS SUB ROLE]

FROM SECURITYROLE SR

WHERE RECID IN

(SELECT SECURITYROLE

FROM SECURITYSUBROLE 

WHERE SECURITYROLE IN

(SELECT SECURITYROLE 

FROM SECURITYUSERROLE

WHERE USER_ = @UserID

AND ASSIGNMENTSTATUS = 1

))

 

3. Duties assigned to given User

SELECT * 

FROM SECURITYDUTY

WHERE RECID IN 

(SELECT SECURITYDUTY 

 FROM SECURITYROLEDUTYEXPLODEDGRAPH SDE

 JOIN SECURITYUSERROLE SUR

 ON SUR.SECURITYROLE = SDE.SECURITYROLE AND SUR.ASSIGNMENTSTATUS = 1

 WHERE SUR.USER_ = @UserID

)

 

4. Privileges for given User (this includes privileges assigned via duties and subrole)

SELECT DISTINCT 

SP.IDENTIFIER,

SP.NAME AS [PRIVILEGE]

FROM SECURITYPRIVILEGE SP

JOIN SECURITYROLEPRIVILEGEEXPLODEDGRAPH MAP

ON MAP.SECURITYPRIVILEGE = SP.RECID

WHERE MAP.SECURITYROLE 

IN (SELECT SECURITYROLE FROM SECURITYUSERROLE

WHERE USER_ = @UserID

AND ASSIGNMENTSTATUS = 1)

 

5. Permissions and grants for given User (this includes privileges assigned via duties)

SELECT DISTINCT SECURABLETYPE,

MAP.SECURITYROLE AS [ROLEID],

RES.AOTNAME AS [RESOURCE],

RES.AOTCHILDNAME AS [CHILD RESOURCE],

SP.NAME AS [PRIVILEGE],

RES.READACCESS,

RES.UPDATEACCESS,

RES.CREATEACCESS, 

RES.CORRECTACCESS,

RES.DELETEACCESS

FROM SECURITYRESOURCEPRIVILEGEPERMISSIONS RES

JOIN SECURITYPRIVILEGE SP

ON SP.IDENTIFIER = RES.PRIVILEGEIDENTIFIER

JOIN SECURITYROLEPRIVILEGEEXPLODEDGRAPH MAP

ON MAP.SECURITYPRIVILEGE = SP.RECID

WHERE MAP.SECURITYROLE 

IN (SELECT SECURITYROLE FROM SECURITYUSERROLE

WHERE USER_ = @UserID

AND ASSIGNMENTSTATUS = 1)

 

6. Permission for a given User and Resource (this includes privileges assigned via duties)

SELECT DISTINCT SECURABLETYPE,

MAP.SECURITYROLE AS [ROLEID],

RES.AOTNAME AS [RESOURCE],

RES.AOTCHILDNAME AS [CHILD RESOURCE],

SP.NAME AS [PRIVILEGE],

RES.READACCESS,

RES.UPDATEACCESS,

RES.CREATEACCESS, 

RES.CORRECTACCESS,

RES.DELETEACCESS

FROM SECURITYRESOURCEPRIVILEGEPERMISSIONS RES

JOIN SECURITYPRIVILEGE SP

ON SP.IDENTIFIER = RES.PRIVILEGEIDENTIFIER

JOIN SECURITYROLEPRIVILEGEEXPLODEDGRAPH MAP

ON MAP.SECURITYPRIVILEGE = SP.RECID

WHERE MAP.SECURITYROLE 

IN (SELECT SECURITYROLE FROM SECURITYUSERROLE

WHERE USER_ = @UserID

AND ASSIGNMENTSTATUS = 1)

AND RES.AOTNAME = @Resource

 

7. Permissions required for given Resource

SELECT DISTINCT SECURABLETYPE,

MAP.SECURITYROLE AS [ROLEID],

SR.NAME AS [ROLE NAME],

RES.AOTNAME AS [RESOURCE],

RES.AOTCHILDNAME AS [CHILD RESOURCE],

SP.NAME AS [PRIVILEGE],

RES.READACCESS,

RES.UPDATEACCESS,

RES.CREATEACCESS, 

RES.CORRECTACCESS,

RES.DELETEACCESS

FROM SECURITYRESOURCEPRIVILEGEPERMISSIONS RES

JOIN SECURITYPRIVILEGE SP

ON SP.IDENTIFIER = RES.PRIVILEGEIDENTIFIER

JOIN SECURITYROLEPRIVILEGEEXPLODEDGRAPH MAP

ON MAP.SECURITYPRIVILEGE = SP.RECID

JOIN SECURITYROLE SR

ON SR.RECID = MAP.SECURITYROLE

WHERE RES.AOTNAME = @Resource

ORDER BY MAP.SECURITYROLE , SECURABLETYPE

 

8. Permissions required for given Resource (using SecurityroleRuntime table. This is used during runtime and should have same data as above)

SELECT DISTINCT TYPE, SECURITYROLE AS [ROLEID], NAME AS [RESOURCE], CHILDNAME AS [CHILD RESOURCE], CREATEACCESS, READACCESS, UPDATEACCESS, DELETEACCESS FROM SECURITYROLERUNTIME

WHERE NAME = @Resource

ORDER BY SECURITYROLE, TYPE


That's it!

Monday, August 8, 2022

Financial dimensions defaulting logic on the purchase orders created from purchase requisitions (active dimension link, merge parameters) in Microsoft Dynamics 365 SCM

In this blog post I would like to explain what capabilities we have out of the box for financial dimension setup on the purchase order/lines when creating purchase order from purchase requisition. 

When Purchase requisition is being created (without project involvement), financial dimensions are set from the following setups and in the following priority: Dimension link -> Vendor -> Item.

When PO is being created from the Purchase requisition, financial dimensions on the created purchase orders are initialized in the following way:

  • Purchase order header financial dimensions are set from the vendor
  • Purchase lines financial dimensions are set from the purchase requisition lines

If Merge financial dimensions from the vendor that was added after purchase requisition approval = YES (Purchasing policies > Purchase order creation and consolidation rule > Manual purchase order creation), then financial dimension from the requisition line will be merged with the financial dimensions from the vendor and set it on the purchase order line.

  • Purchase order header financial dimensions are set from the vendor
  • Purchase lines financial dimensions are set from the purchase requisition lines. If any fin dims are blank on purchase requisition line -> then it will be taken from vendor. 
Imagine the following situation: 
You raised a Purchase requisition with Business unit = 001, Cost center = <blank> and submitted for approval. While waiting for approval, vendors financial dimensions Cost center gets defaulted to 007. Upon purchase order creation, purchase order line will get financial dimension: Business unit = 001, Cost center = 007. Without this parameter activated, it would have set to Business unit = 001, Cost center = <blank>.

Within 10.0.25 release, a new feature has been introduced that affects the financial dimensions merge logic.

Feature name: “Merge financial dimensions from the vendor with active dimension link financial dimension on the purchase order”
Feature description: This feature allows for the merge financial dimensions from the vendor with active dimension link financial dimension after purchase requisition approval if you set up a link between a financial dimension and the site inventory dimension. Purchase order creation and demand consolidation purchasing policy rule can be setup to drive the decision for merging financial dimensions from vendor with active dimension link financial dimension on purchase order header level.

Once this feature is enabled, new parameter will be displayed Merge financial dimensions from the vendor with active dimension link financial dimension on the purchase order (Purchasing policies > Purchase order creation and consolidation rule > Manual purchase order creation).

If this parameter is enabled, the financial dimension from the vendor and dimension link will be merged together and set on the purchase order header. 

Try out the following: 
1. Enable Dimension link (Inventory management > Setup > Posting > Dimension link).
  • Select the financial dimension in the Dimension link page, for instance Cost center
  • Go to Sites and set Cost center value for all sites (Inventory management > Setup > Inventory breakdown > Sites)
  • Go to Dimension link page and select Activate link. Wait until completed. 
2. Set Business unit = 001, Cost center = <blank> on the vendor record. 
3. Create Purchase requisition with Business unit = 001, Cost center from the site, let's say 008. 
4. Submit and Approve requisition.
5. If parameter is disabled, Purchase order header financial dimensions will be defaulted to Business unit 001, Cost center = <blank>.
If parameter is enabled, Purchase order header financial dimensions will be defaulted to Business unit 001, Cost center = 008.

That's it!

Tuesday, July 12, 2022

Post registered quantities of stocked products and remainders of not-stocked products for receipts and vendor invoices feature in Microsoft D365 SCM

In this blog post I would like to briefly explain what has been done in scope of the Post registered quantities of stocked products and remainders of not-stocked products for receipts and vendor invoices feature. 

Feature name: Post registered quantities of stocked products and remainders of not-stocked products for receipts and vendor invoices

Description:
This feature changes how quantities of not-stocked products (such as services) are posted when processing vendor invoices and inbound shipments against purchase orders. The "Registered and services" quantity option now works as "Registered quantity and not-stocked products" and aligns with the similarly named option already available for posting quantities for sales packing slips.

When you post a product receipt or vendor invoice using the "Registered quantity and services" quantity option, the system posts the registered quantity of stocked products, but posts the remainder quantity of not-stocked products (including both services and non-services). Without this feature, the system still posts the registered quantity of stocked products (including services configured as stocked items) but always posts the full ordered quantity of not-stocked service products (and ignores not-stocked products that are not of type "Service").

Before this feature was introduced, the following logic was in place. 
When you were trying to Post product receipt and selecting 'Registered quantity and services' quantity option on the Posting product receipt page, the system was displaying:
  • registered items
  • procurement category lines
  • items that have product type = Service
The system was not showing the items with the type of Item and item model group with the Stocked product parameter unselected. 

Unlike Product receipt, Packing slip posting on sales orders side is slightly different and Quantity field contains another option "Picked quantity and not stocked products". If this option is selected, the system picks up the following:
  • picked items
  • items that have product type = Service
  • items that have product type = Item and item model group has Stocked product parameter disabled.
With the help of this feature, the logic is attempted to be the same. 
With new feature enabled, when trying to Post product receipt and selecting 'Registered quantity and services' quantity, the system will be displaying:
  • registered items
  • items that have product type = Service
  • items that have product type = Item and item model group has Stocked product parameter disabled.


That's it!