Dynamics 365 Archives - Page 27 of 89 - - Page 27

Category Archives: Dynamics 365

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

Share Story :

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;     } }

Share Story :

[Solved] Date Field Shows Wrong Date in Power Automate

Introduction: We recently noticed the Power Automate Trigger body showing a date prior to the date selected in CRM. This behavior was not expected because the field was set to Date Only and so the time zone would not cause this problem. However, after discussion we found that : The behavior of field was set to User Local and so when this field will be set it will be seen as per the user time zone settings as Power Automate processes the Date in UTC Format. All existing date/time fields in CRM are set as User Local by default. Given below are the two approaches by which we can get the proper date in Power Automate. Approach 1: Create a new field in CRM with Format and Behavior set to Date Only. The date for this field will be correctly captured by trigger in power automate. Approach 2: Create a formula in Power Automate to add 1 day to the date coming from CRM, using add days expression. Adddays(parameter from which date is coming from, number of days to add, format of date[optional]) Eg: addDays(triggerBody()?[‘Fieldnamexyz’],1) Conclusion : The above workaround can help rectify the Date in Power Automate.

Share Story :

Enable Record as Active or Inactive record in PowerApps

Introduction: In this blog, we will learn how to Enable multiple records as active or inactive record. Use Case: We have a requirement where there is a Grid of CDS Data Source, on clicking the Deactivate or Active Button on top of the Grid, it should Deactivate every record which is selected through the checkbox which is there on every record of the Grid. Steps: There is a Screen on which there a Editable grid of custom Entity Objective. To Create an Editable Grid refer to the following link. To add Lookup Fields in the Grid refer to the following link. This is the grid with a checkbox.  To Deactivate or Activate selected records, first create a Collection: OnSelect property of the Deactivate Button: When we select the Deactivate Button, it will collect all the records where the Checkbox is selected. To Deactivate the records from the CDS, set the OnSelect property of the Deactivate Button to the following formula: OnSelect property of the Deactivate Button: Combine the Whole formula in the OnSelect property of Deactivate Button : For eg: DeactivateSelectedRecord.OnSelect =  Note: For Activating the record just replace the Inactive to Active in the Patch Formula Conclusion: Hope above Blog helps you Activate, Deactivate multiple records of CDS from the Grid.

Share Story :

Financial Dimensions in Retail Stores and payment methods in D365 Commerce and Retail

Overview: As we are aware that Financial Dimensions are available for user to identify the posting routine of payments, sales, purchases etc in the ledger account. These values are selectable / mandatory at all checkpoints on D365 FNO. However, in retail we would have to configure the financial dimensions in Retail Store or Payment Methods of retail store. This will help user to identify the posting routine with details of the transaction. If financial dimensions are not mapped then posting will happen but it will be posted as entry without dimensions as below images. Without Financial Dimensions: With Financial Dimensions: To configure Financial Dimensions: Payment Methods: Goto Retail and Commerce > Channels > Stores In Action Tab > Set Up > Payment Methods Select Desired Payment method and in details tab you can find Financial Dimensions 2. Stores: Goto Retail and Commerce > Channels > Stores And select desired store that you want to set the default dimensions on the bottom as shown in the image. (Note: Enabling this will overwrite the Financial Dimensions that were enabled on payment methods as this will be set as Default Dimensions for all types of transactions.) Thanks! Hope this was helpful!

Share Story :

Send D365 Email Using Power Automate

Introduction: Searching Power Automate connectors for Send Email Step available in Workflow? Follow the below steps to send Email from Power Automate . 1)Go to Common Data Service(Current Environment)Connector. Select Create a new record, Entity: Email Messages Add Activity Party Attributes, Email Body, Subject and set regarding. 2) Once Draft Email is ready, add Action Perform a bound action from Common Data Service( Current Environment)Connector. Entity name – Email Message Action name – Send Email Item ID – This will be the GUID (unique ID) of the record to send. (Note: Here, we will provide the Email message ID of the Draft email created in Step 1. IssueSend – This is a No/Yes option list. Set this to “yes” for the email to send. Conclusion: We can replicate the Send Email functionality of Workflows in Power Automate easily.

Share Story :

List of security roles for current user | D365FO

Introduction: In this blog, we will see how we can get a list of security roles assigned to a current user  Solution:  UserInfo userInfo; SecurityRole securityRole; SecurityUserRole securityUserRole; while select securityRole exists join securityUserRole where securityUserRole.SecurityRole == securityRole.RecId exists join userInfo where userInfo.id == securityUserRole.User && userInfo.id == curUserId() { info(securityRole.name); } Thanks for reading !!!

Share Story :

Duplicate address record entry through Data entity in Dynamics 365 Finance and Operations

Introduction:In this blog, we will see how to allow system for accepting duplicate addresses of customer, vendor or any other, through doing bit change in Data Entity  Solution:For allowing duplicate entries we will create one field in LogisticsPostalAddress. Here field name is as IsCreateFromEntity. Field-IsCreateFromEntity will be used as flag, type of boolean / NoYesId (EDT). [ExtensionOf(tableStr(LogisticsPostalAddressBaseEntity))] final class LogisticsPostalAddressBaseEntityCFSJSTable_Extension { public static LogisticsLocationId resolveRemittanceAddressLocationId(LogisticsPostalAddressBaseEntity _postalAddressEntity, DirPartyNumber _partyNumber) { LogisticsLocationId locationId, locationIdCreateNew; locationId = next resolveRemittanceAddressLocationId(_postalAddressEntity, _partyNumber); if(_postalAddressEntity.IsCreateFromEntity) { locationId = locationIdCreateNew; } return locationId; } } Aforementioned code would replace the standard locationId variable with new locationIdCreateNew which will be null always. Once new variable locationIdCreateNew is replaced with standard code,  system will generate the new locationId in the LogisticsLocation(Table) and create the same duplicate address along with state, city, country, zipcode and all other respective fields. Moreover, we will just need to pass YES value to the newly created field ISCreateFromEntity while creating the new address and run the execution. How easy it is!!! Thanks for reading !!!

Share Story :

Deploy SSRS reports through Windows Powershell in Dynamics 365 Finance and Operations

Introduction:In this blog, we will see how to deploy SSRS reports in Microsoft Dynamics 365 Finance and Operations   Solution:  For on-prem environment, we will open Windows PowerShell in administrator mode and run the below scrip step by step. cd C:\AOSService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\ .\DeployAllReportsToSsrs.ps1 For online Cloudhosted/Dev environment, we will run below mentioned script cd k:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\ .\DeployAllReportsToSSRS.ps1 -PackageInstallLocation “k:\AosService\PackagesLocalDirectory” It appears as When deploying reports are completed, It looks like Thanks for reading !!!

Share Story :

Introducing Microsoft 365 Project Operations – MBAS 2020 Takeaway

Among the fabulous sessions at MBAS 2020 Online Conference, Introduction of Project Operations was the most anticipated for me. Here are my takeaways from the same – Gurkan Salk & Kevin Horlock provided an overview of what to expect for Project Operations/  What is Project Operations? Some key points –  Project Operations is an extension of capabilities to existing PSA in Dynamics 365 to a whole new product called as Project Operations. This is a new offering by Microsoft. GA is 1st Oct 2020 Project Operations will utilize the Project based Sales Capabilities including quotation and resourcing  Project Management capabilities will run from Microsoft Project and utilize the power scheduling engine it has to offer. Taking capabilities directly from Project for the Web. Will now be embedded inside Project Operations Capabilities of D365 Finance will be utilized for Costing and Invoicing/Accounting capabilities. Better Teams Integration to bring in Project Team Members on a Teams channel to be able to better collaborate. Flexible and easy to use Gannt Chart for Tasks. Clicking on the bars would let us configure the attributes of the Task Resource Manager has all visibility across all Projects. Revenue Recognition in Finance and Operations – Looking into Project And Operations for Outstanding Invoices. Overview of the Revenue Recognition angle of a Project can be over-viewed in FnO. AI to interpret receipts what have been scanned and entered against the Project. When is Project Operations available? General Availability is 1st Oct 2020 Some good QnAs in the session Could Integrate with Azure DevOps.Ans: Won’t be available out-of-box integration, but we can use Power Automate. Planned Integration?Ans: No direct Planner usage. PO and supporting CDSAns: PO will run on Dynamics platform. Will encapsulate PSA capabilities. All PO data available in CDS. Hope this initial info helps and we’ll keep you posted as we approach GA.

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange