Dynamics 365 Archives - Page 53 of 88 - - Page 53

Category Archives: Dynamics 365

Vendor Invoice Journal-Dynamics 365 Finance and Operations

Introduction: Vendor invoice journal helpful to post purchase invoices that are not associated with purchase orders. Examples of this type of invoice include expenses for supplies or services. Steps: Go to Accounts Payable > Invoices > Invoice journals Click on new button, select name of the journal and enter a description in description field. In the Date field, enter the posting date that will update General Ledger. Select Vendor account Specify invoice number in Invoice field. Enter Description in the field description In the Credit field, enter a number. In the Offset account field, enter the account number or click the drop down button to open the lookup Click on Validate to check the data are correct. Click on post to Post the Invoice

Share Story :

Create Fixed Asset Journal using X++

In this blog article, we will see how we can create Fixed Asset Journal using X++. Write below code to create Journal Header in LedgerJournalTable Table and Lines record in LedgerJournalTrans and LedgerJournalTrans_Asset Tables. public void createFixedAssetJournal()     {                LedgerJournalTable ledgerJournalTable;         LedgerJournalTrans ledgerJournalTrans;         LedgerJournalTrans_Asset ledgerJournalTrans_Asset;         Assettable assetTable;         ledgerJournalTable.initValue();         ledgerJournalTable.JournalNum   = JournalTableData::newTable(ledgerJournalTable).nextJournalId();         ledgerJournalTable.Posted       = NoYes::No;         ledgerJournalTable.JournalName  = ‘ACQUI’;         ledgerJournalTable.JournalType  = LedgerJournalType::Assets;         ledgerJournalTable.initFromLedgerJournalName(ledgerJournalTable.JournalName);         ledgerJournalTable.insert();          ledgerjournalTrans.initValue();         ledgerJournalTrans.CurrencyCode      = Ledger::accountingCurrency(CompanyInfo::find().RecId);         ledgerJournalTrans.AccountType       = LedgerJournalACType::FixedAssets;         ledgerJournalTrans.TransactionType   = LedgerTransType::FixedAssets;         ledgerJournalTrans.Approved          = NoYes::Yes;         ledgerJournalTrans.Approver          = HcmWorker::userId2Worker(curuserid());             ledgerJournalTrans.LineNum                              = LedgerJournalTrans::lastLineNum(ledgerJournalTrans.JournalNum) + 1;         ledgerJournalTrans.TransDate                            = DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone());         ledgerJournalTrans.LedgerDimension                      = LedgerDynamicAccountHelper::getDynamicAccountFromAccountNumber(AssetTable.AssetId,LedgerJournalACType::FixedAssets);                   ledgerJournalTrans.accountName();                ledgerJournalTrans.AmountCurDebit                       = ’45’;         ledgerJournalTrans.OffsetAccountType                    = LedgerJournalACType::Ledger;         ledgerJournalTrans.OffsetLedgerDimension                = ledgerJournalTrans.getOffsetLedgerDimensionForLedgerType(AssetLedgerAccounts::assetOffsetLedgerDimension(AssetTable.AssetId, AssetTable.assetBookCurrent().BookId, AssetTransType::Acquisition),curExt());         ledgerJournalTrans.insert();         ledgerJournalTrans_Asset.initValue();         ledgerJournalTrans_Asset.RefRecId                       = ledgerJournalTrans.RecId;         ledgerJournalTrans_Asset.AssetId                        = assetTable.assetId;         ledgerJournalTrans_Asset.TransType                      = AssetTransTypeJournal::Acquisition;         ledgerJournalTrans_Asset.BookId                         = AssetTable.assetBookCurrent().BookId;         ledgerJournalTrans_asset.insert();         ttsbegin;         LedgerJournalTable.selectForUpdate(true);         LedgerJournalTable.numOfLines = LedgerJournalTable.numOfLines();         LedgerJournalTable.update();         ttscommit; }

Share Story :

New D365 Admin portal and new way to access Organization Insights

Introduction: Lot of D365 Administrators would have observed that we no longer see the Organization Insights solution on AppSource anymore. This is because you can now see the Organization Insights on the new Administration portal for D365. New D365 Admin Portal! There is new portal for D365 Administration which is in preview. You will see the option to go to new D365 Admin Portal from the Current Admin portal screen. Administrators can also access the portal from the URL: https://admin.powerplatform.microsoft.com The new portal is also called as the Power Platform since it now includes Administration of your Power Apps and CDS as well. You can manage the environments, do the analytics and lot more things. I am expecting this Portal will be upgraded and will have lot more features in future.

Share Story :

Create Fixed Asset using X++

In this blog article, we will see how we can create a Fixed Asset using code based on AssetGroupID. Add below code in class to create a Fixed Asset, public void createFixedAsset(AssetGroupId assetGroupId) {         AssetTable assetTable;         NumberSeq numberSeq;         assetTable.initValue();         assetTable.assetGroup = AssetGroupId;         //Initialize Number Seq for Asset Id         numberSeq = assetTable.initAssetNumberSeq(assetTable.Assetgroup);         AssetTable.AssetId = NumberSeq.num();           //Initialize other fields based on Asset Group assetTable.initFromAssetGroupId(assetTable.Assetgroup);         //Initialize name and Name Alias fron Item Id         assetTable.Name = InventTable::find(‘ITM1104’).itemName();         assetTable.NameAlias = assetTable.Name;         //Validate and Insert Fixed Asset. On insertion asset book is also created         assetTable.validateWrite();         assetTable.insert();     }

Share Story :

Resolve “The Team member position has already been filled” error

Introduction: You might receive alert “The Team member position has already been filled” while submitting a request for an actual resource. Description: I was working on a project and we use PSA solution for resource management. Some Team Members was already added in project with “Generic Resource” and we wanted to replace resource with actual team member. But whenever I try to submit Resource request in PSA in “Project Team Member” I Receive alert message with “The Team member position has already been filled“. Solution: When you are adding a Project Team Member, are you choosing “Generic Resource” on Bookable Resource lookup for that team member? When you do this, you’re setting a Bookable Resource to team and thus can’t request for one anymore. When adding a Project Team Member, leave the Bookable Resource lookup unpopulated. This way a Bookable Resource is not assigned on the project team and you can submit a request against the created generic. When adding the Architect (Role), I have chosen Generic Demo Resource in the Bookable Resource lookup on the Quick Create. When adding the Consultant, I have left the Bookable Resource lookup unpopulated. Conclusion: So, this can be avoided if you are adding Resource from “Project Team member Associated view”.

Share Story :

D365 Unified Interface: Enabling embedded legacy dialogs

Introduction: Quite simply put, some of the embedded dialogs like the Advanced Find, Merge Records, Assign & Edit record windows which are not by default visible on the Unified Client Like when you multi-select records, you can’t see the typical Merge, Edit buttons on the ribbon. Here’s how you enable them. System Settings: In your Web Application’s system settings, you have an option under general where you can enable these buttons in the Unified Interface. Now, you can retain those buttons in the Unified Interface as well. Have a great time exploring Unified Interface!

Share Story :

Activate Order button is not working on Order Entity in UCI

Posted On October 10, 2018 by Admin Posted in

Introduction: This blog explains an alternative approach to Activate an Order in UCI. Scenario: We are using Prospect to Cash solution to integrate Sales Order from Sales to Operations (CRM To Operations). In UCI Activate Order button is not working which is used for Order Integration. In this blog we will see an alternative approach to achieve this. Pre-Requisites:    D365 Sales    Microsoft Flow Steps to be followed: Dynamics 365 – 1. Create Custom “Activate Order” button in UCI. 2. Add below JavaScript code which will trigger on Click of “Activate Order” Button. (This code will take the Order Guid and pass it to the http post request) Refer this blog to understand more about HTTP Post Request using Microsoft Flows: https://www.cloudfronts.com/http-post-requests-using-microsoft-flows/ // JavaScript source code CallMSFlowsToActivateOrder: function () { var entityGuid = Xrm.Page.data.entity.getId(); entityGuid = entityGuid.replace(“{“, “”).replace(“}”, “”); var data = JSON.stringify({ “OrderID”: entityGuid }); var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener(“readystatechange”, function () { if (this.readyState === 4) { console.log(this.responseText); } }); var xhr = new XMLHttpRequest(); xhr.open(“POST”, “URL Created From MS Flow”, true); xhr.setRequestHeader(‘Content-Type’, ‘application/json’); xhr.send(JSON.stringify({ “OrderID”: entityGuid })); } Microsoft Flow: 1. Create Flow from Blank. 2. Select the Http request is received trigger. 3. Add below in Request body JSON Schema 4. Add Get Record Trigger of Dynamics 365. In Item identifier pass the OrderId from the Dynamic Content. 5. List all related Sales Order Product of that Order. 6. Add apply to each control and update the value of Order is Active field. 7. Update the Processing state field of Order entity. Overall Flow:

Share Story :

Run Report in UCI Form for Web Browser

Introduction: This blog details steps for Run Report button in UCI Form via Web Browser in D365 Sales. Scenario: Client requires Run Report button in UCI Form for Order Entity in D365 Sales Steps: Below are steps to be performed for enabling Report button on Order Entity Create WebResource with below javascript function. Create a button on Form and call function “PrintSalesOrderDetails”. Conclusion: Hope this blog helps you to run report in UCI browser.

Share Story :

Identify who imported the solution – Dynamics 365 CRM

Introduction: Sometime there is a need to know when and who imported the solution in to CRM. This will be done by XrmToolBox plugin called “Solution History”. Purpose of Solution History: The purpose of the tool is to view a historical list of solutions that have been imported. This provides sort of audit functionality for solutions, as the OOB solution view doesn’t really display how many times a solution has been imported, version number that was updated, error/warning messages that were encountered during solution import. Steps: Install Solution History plugin from Plugin Store in XrmToolBox. Open the plugin and connect to the environment. Select the time frame for the solution. The solutions will be displayed as below. Select the solution for which you want to check the details. Click on Load Solution History. The details will be shown as highlighted below. Other methods of knowing this are listed below: 1) Looking in to the database 2) Checking XML Hope this helps!!

Share Story :

[SOLVED] “Corrupted report PDF generated using JavaScript” in Dynamics 365 V9.0

Posted On October 9, 2018 by Clinton D'Mello Posted in Tagged in

Introduction We had developed a functionality for Dynamics CRM v8.2 on Quote Entity by adding a custom button and on clicking a button we run a report, capture its contents using JavaScript, convert it to a PDF and attach the PDF to an Email Record. Below shown is the code snippet quoteInvoice = { runReportToPrint: function () { debugger; var params = quoteInvoice.getReportingSession(); var newPth = Xrm.Page.context.getClientUrl() + “/Reserved.ReportViewerWebControl.axd?ReportSession=” + params[0] + “&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=” + params[1] + “&OpType=Export&FileName=public&ContentDisposition=OnlyHtmlInline&Format=PDF”; //Calling the below function converts the report to PDF format. quoteInvoice.convertResponseToPDF(newPth); }, getReportingSession: function () { var selectedIds = Xrm.Page.data.entity.getId(); selectedIds = selectedIds.replace(‘{‘, ”).replace(‘}’, ”); var strParameterXML = “<fetch distinct=’false’ mapping=’logical’ output-format=’xml-platform’ version=’1.0′><entity name= ‘quote’><all-attributes/><filter type=’and’><condition attribute=’quoteid’ value='” + selectedIds + “‘ operator=’eq’ /></filter></entity ></fetch >”; var reportGuid = “DAF05843-CA33-E711-811E-FC15B42827EC”; var reportName = “Quote Invoice.rdl”; var pth = Xrm.Page.context.getClientUrl() + “/CRMReports/rsviewer/QuirksReportViewer.aspx”; var retrieveEntityReq = new XMLHttpRequest(); retrieveEntityReq.open(“POST”, pth, false); retrieveEntityReq.setRequestHeader(“Accept”, “*/*”); retrieveEntityReq.setRequestHeader(“Content-Type”, “application/x-www-form-urlencoded”); retrieveEntityReq.send(“id=%7B” + reportGuid + “%7D&uniquename=” + Xrm.Page.context.getOrgUniqueName() + “&iscustomreport=true&reportnameonsrs=&reportName=” + reportName + “&isScheduledReport=false&p:quoteid=” + strParameterXML); var x = retrieveEntityReq.responseText.lastIndexOf(“ReportSession=”); var y = retrieveEntityReq.responseText.lastIndexOf(“ControlID=”); var ret = new Array(); ret[0] = retrieveEntityReq.responseText.substr(x + 14, 24); ret[1] = retrieveEntityReq.responseText.substr(x + 10, 32); return ret; } } The runReportToPrint() function is called when the custom button is clicked Issue and Error Details Once the environment was upgraded to V9.0 we were facing issues as the PDF that was generated was corrupted as show below. While debugging the code we got the following message. On further research we found that the URL has been changed and  below shown is the new path that has to be used which works correctly on V9.0. var pth = Xrm.Page.context.getClientUrl() + “/CRMReports/rsviewer/ReportViewer.aspx”; Once this change was done  we did not get any error and the PDF of the report that was generated opened correctly with all of  its contents.

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange