Tag Archives: D365 Finance and SCM
Issue in receiving purchase order in D365 finance and operations
In this blog, I am going to showcase how to resolve the issue in purchase orders at the time of receiving. Once the purchase order is confirmed and try to receive it, you may run into the below error. This issue is happing because purchase order lines are not updated properly. When you are received the purchase order line using excel add-in, the purchase order line will not be imported properly. Use data entity in data management to import purchase order line. Steps to resolve this issue in the purchase order. Open the purchase order. Select the purchase order line for which you are facing this issue. In the line details, Check the inventory quantity. The quantity must be there, you will face this issue because the inventory quantity is blank. If the Inventory quantity is blank, then click on the Purchase order tab and make a change request. Click on edit and update the inventory quantity, according to purchase order line quantity, and Save the purchase order. Confirm and again try to receive the Purchase order. In the receive tab, click on the product receipt. If you are facing this issue for multiple purchase order lines then cancel that Purchase order. Create a new PO and import the purchase order line with the data entity. Hope this helps!
Factbox of workflow history on purchase order in D365FO
Introduction: In this blog, we will see how to create factbox of workflow history of purchase order in Microsoft Dynamics 365 Finance and Operations Details: Well, Factbox is a very pretty cool feature available from the earlier version AX 2012. It is very easy to achieve in Dynamics 365 as well. Here we will see how easy it is and steps for that. As shown in the above image, we will be going to create factbox for the “Tracking details list” Steps: Create the solution in Visual Studio and project for that. We’ll be required four objects mainly that is one display MenuItem, Table, Form (on which to display factbox), another Form (factbox). Reference attached below: 1. Table For displaying workflow history, we need to create the extension of table WorkflowTrackingStatusTable and create the normal relation and its relevant properties as 2. Factbox Now we are required to create the factbox of workflow history. For that we will use the effortless technique, where we will duplicate the standard form “WorkflowStatus” and will name as CFSPurchTableWorkflowHistoryFactBox (give name as per your naming convention standards) After duplicating and renaming the form, we need to change the pattern as “custom” After applying the custom pattern, delete the NavigationList which is not required in factbox, and do visible false ActionPane and PanelTab After that create the new Grid and assign the data source to it in the property and put all the required fields to show in factbox 3. Display MenuItem We will attach the created factbox form to the display menu item and relevant label “Workflow history” 4. Base form Base form we call it as where we will attach the factbox. Here it is purchase form. Go to Parm section and create a new part and give it a relevant name and its properties Properties: Data source: Attached data source with which workflow history is connected Data Source Relation: WorkflowTable.RelationName Name: Part name That’s it. Build the project and go the frontend and check the output how it looks like. Conclusion: It results as (we can scroll left and right to see all the tracking details list) Hurray, How pretty it looks like! In the above example, we have seen how we can develop factbox in Microsoft Dynamics 365 Finance and Operations. Thanks for reading and stay connected with us for more updates!!! Jagdish Solanki | Senior Technical Consultant | CloudFronts Business Empowering Solutions Team “Solving Complex Business Challenges with Microsoft Dynamics 365 & Power Platform”
Change planned purchase order status as draft insted of default approved
When we create purchase order using planned order its default approval status will be approved as displayed in screenshot. To change that status to draft write following code where we will change its status to draft and further code to is to remove version of purchase order which necessary to make delete button enabled on purchase order form code:- /// <summary> /// extension of class: ReqTransPoMarkFirm /// </summary> [ExtensionOf(classStr(ReqTransPoMarkFirm))] final class ReqTransPoMarkFirmCFSClass_Extension { public container conPurchOrders; /// <summary> /// updatePurchTable /// </summary> /// <param name = “_purchTable”>_purchTable</param> protected void updatePurchTable(PurchTable _purchTable) { conPurchOrders += _purchTable.PurchId; next updatePurchTable(_purchTable); } /// <summary> /// purchTablePostProcessing /// </summary> protected void purchTablePostProcessing() { next purchTablePostProcessing(); for (int i = 1; i <= conLen(conPurchOrders); i++) { PurchTable purchTable = PurchTable::find(conPeek(conPurchOrders, i), true); if(purchTable.RecId) { ttsbegin; //delete the version created for po PurchTableVersion purchTableVersion = PurchTableVersion::findLatest(purchTable.PurchId, purchTable.DataAreaId, true); if(purchTableVersion.RecId) { purchTableVersion.delete(); } purchTable.ChangeRequestRequired = NoYes::No; purchTable.DocumentState = VersioningDocumentState::Draft; purchTable.update(); ttscommit; } } } } I hope this will helo you,thank you
Change RFQ purchase order status as draft insted of default approved
When we create purchase order using RFQ its default approval status will be approved. To change that status to draft write following code where we will change its status to draft. create new class and add following code class CFSPOStatusRfq { [PostHandlerFor(classStr(PurchAutoCreate_RFQ), methodStr(PurchAutoCreate_RFQ, endUpdate))] public static void PurchAutoCreate_PurchReq_Post_endUpdate(XppPrePostArgs args) { //PurchTable purchTable = args.getThis(‘purchTable’); PurchAutoCreate_RFQ purchReq = args.getThis() as PurchAutoCreate_RFQ; PurchTable purchTable, purchTablenew; purchTable = purchReq.parmPurchTable(); ttsbegin; select forupdate purchTablenew where purchTableNew.PurchId == purchTable.PurchId; if(purchTablenew && purchTablenew.DocumentState == VersioningDocumentState::Approved) { purchTablenew.DocumentState = VersioningDocumentState::Draft; purchTablenew.update(); } ttscommit; } }