<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Büşra UÇAN on Medium]]></title>
        <description><![CDATA[Stories by Büşra UÇAN on Medium]]></description>
        <link>https://medium.com/@busraucnn?source=rss-7d6fd53ece8d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*oFyBDJDnrGXL6QGp</url>
            <title>Stories by Büşra UÇAN on Medium</title>
            <link>https://medium.com/@busraucnn?source=rss-7d6fd53ece8d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 07:58:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@busraucnn/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Custom Accounting Distributions for Purchase Orders in D365FO]]></title>
            <link>https://medium.com/@busraucnn/custom-accounting-distributions-for-purchase-orders-in-d365fo-83b6230873ad?source=rss-7d6fd53ece8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/83b6230873ad</guid>
            <dc:creator><![CDATA[Büşra UÇAN]]></dc:creator>
            <pubDate>Wed, 06 Aug 2025 15:00:19 GMT</pubDate>
            <atom:updated>2025-08-06T15:00:19.664Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pQ3rIp4BMqMdTcimDZoCGQ.png" /></figure><p>📌 <strong>Scenario</strong></p><p>In some projects, the way accounting distributions are automatically generated for purchase order lines in Dynamics 365 Finance and Operations may not fully align with business requirements. In such cases, we may need to implement a custom cost allocation logic and override the standard behavior of D365FO.</p><p>📌 <strong>Goal</strong></p><p>To generate custom accounting distributions for purchase order lines and reflect these distributions into the system’s AccountingDistribution records.</p><p>📌 <strong>Note</strong></p><p>When the cost allocation is customized at the purchase order line level, it will also be carried over to the invoice. This ensures that the same distribution logic is applied during the invoicing process.</p><p>📌 <strong>Solution</strong></p><p>After the purchase order is created, the SourceDocumentLineProcessor class is triggered with the relevant parameters to initiate the accounting distribution process:</p><pre>SourceDocumentLine sourceDocumentLine = _purchline.sourceDocumentLine();<br>SourceDocumentLineProcessor::submitSourceDocumentLine(sourceDocumentLine, false, SourceDocumentLineAccountingStatus::FullyDistributed);</pre><p>By subscribing to the processedEventHandler delegate of the AccountingDistributionProcessor class, the default accounting distribution records can be deleted or modified according to custom logic. Below is a full example implementation:</p><pre>internal final class AccountingDistributionProcessorPurch_YourModelName_EventHandler<br>{<br>    [Hookable(false), SubscribesTo(classStr(AccountingDistributionProcessor), delegateStr(AccountingDistributionProcessor, processedEventHandler))]<br>    public static void processedEventHandler(SourceDocumentLineItemList _sourceDocumentLineItemList)<br>    {<br>        SourceDocumentLineItemListEnumerator itemEnumerator = _sourceDocumentLineItemList.getEnumerator();<br><br>        while (itemEnumerator.moveNext())<br>        {<br>            SourceDocumentLineItem lineItem = itemEnumerator.current();<br>            SourceDocumentLine sourceLine = lineItem.parmSourceDocumentLine();<br><br>            PurchLine purchLine = this.getPurchLine(sourceLine);<br>            if (!purchLine)<br>                continue;<br><br>            RecId defaultDimension = purchLine.DefaultDimension;<br>            if (!defaultDimension)<br>                continue;<br><br>            str costCenterGroup = this.getDimensionGroup(&quot;costCenter&quot;, defaultDimension);<br>            str expenseType     = this.getDimensionValue(&quot;expenseType&quot;, defaultDimension);<br>            str expenseMaker    = this.getDimensionValue(&quot;expenseMaker&quot;, defaultDimension);<br><br><br>            AccountingDistributionList distributionList = lineItem.parmAccountingDistributionList();<br>            AccountingDistribution template = this.deleteExistingDistributions(distributionList);<br><br>            while select match<br>                where match.CostCenterGroup == costCenterGroup &amp;&amp;<br>                      match.ExpenseType     == expenseType<br>                join Account<br>                where Account.MatchRec == match.RecId<br>            {<br>                Amount splitAmount     = _baseAmount * (Account.Rate / 100.0);<br>                Percent splitPercent   = Account.Rate / 100.0;<br><br>                AccountingDistribution newDist;<br>                newDist.data(template);<br>                newDist.TransactionCurrencyAmount = splitAmount;<br>                newDist.AllocationFactor          = splitPercent;<br><br>                RecId mainAccountRecId = LedgerDefaultAccountHelper::getDefaultAccountFromMainAccountId(Account.Account);<br>                newDist.LedgerDimension = LedgerDimensionFacade::serviceCreateLedgerDimension(mainAccountRecId, defaultDimension);<br><br>                if (newDist.validateWrite())<br>                    newDist.insertAccountingDistribution(true);<br>            }<br>        }<br>    }<br><br>    private PurchLine getPurchLine(SourceDocumentLine _line)<br>    {<br>        if (_line.SourceRelationType == tableNum(PurchLine))<br>        {<br>            return PurchLine::findBySourceDocumentLine(_line.RecId);<br>        }<br>        return null;<br>    }<br><br>    private str getDimensionValue(str _name, RecId _dimensionRecId)<br>    {<br>        DimensionAttribute attr = DimensionAttribute::findByName(_name);<br>        if (!attr)<br>            return &quot;&quot;;<br><br>        DimensionAttributeValueSetStorage storage = DimensionAttributeValueSetStorage::find(_dimensionRecId);<br>        return storage.getDisplayValueByDimensionAttribute(attr.RecId);<br>    }<br><br>    private str getDimensionGroup(str _name, RecId _dimensionRecId)<br>    {<br>        str value = this.getDimensionValue(_name, _dimensionRecId);<br>        DimensionAttribute attr = DimensionAttribute::findByName(_name);<br>        if (!value || !attr)<br>            return &quot;&quot;;<br><br>        DimensionAttributeValue attrValue = DimensionAttributeValue::findByDimensionAttributeAndValue(attr, value);<br>        return attrValue.GroupDimension;<br>    }<br><br>    private AccountingDistribution deleteExistingDistributions(AccountingDistributionList _list)<br>    {<br>        AccountingDistributionListEnumerator enumerator = _list.getEnumerator();<br>        AccountingDistribution template;<br><br>        while (enumerator.moveNext())<br>        {<br>            AccountingDistribution dist = enumerator.current();<br>            if (!dist)<br>                continue;<br><br>            ttsbegin;<br>            template.data(dist);<br>            dist.selectForUpdate(true);<br>            dist.delete();<br>            ttscommit;<br>        }<br><br>        return template;<br>    }<br><br>    private DmrOdooDimensionValues getDimensionValues(RecId _dimensionRecId)<br>    {<br>        DmrOdooDimensionValues values;<br>        values.CostCenterGroup = this.getDimensionGroup(&quot;costCenter&quot;, _dimensionRecId);<br>        values.ExpenseType     = this.getDimensionValue(&quot;expenseType&quot;, _dimensionRecId);<br>        values.ExpenseMaker    = this.getDimensionValue(&quot;expenseMaker&quot;, _dimensionRecId);<br>        return values;<br>    }<br><br>   }<br><br></pre><p>This approach allows you to fully control the accounting distribution logic for purchase orders, while ensuring consistency and compliance with internal financial rules.</p><p>✅ The custom logic is preserved throughout the invoice process, which helps maintain traceability and accuracy across the purchasing lifecycle.</p><p>#Dynamics365 #D365FO #AccountingDistribution</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83b6230873ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[D365 Quick Tip: Expand or Collapse All Groups in Grids]]></title>
            <link>https://medium.com/@busraucnn/d365-quick-tip-expand-or-collapse-all-groups-in-grids-5b41eb8da34b?source=rss-7d6fd53ece8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b41eb8da34b</guid>
            <dc:creator><![CDATA[Büşra UÇAN]]></dc:creator>
            <pubDate>Sat, 12 Apr 2025 19:14:19 GMT</pubDate>
            <atom:updated>2025-04-12T19:14:58.754Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*6QHci8WAc08rypyb.png" /></figure><h3>When you’re working with lots of data in Dynamics 365 Finance and Operations, grouping rows in a grid is a great way to make things easier to read and manage.</h3><p>👉 You can expand or collapse all groups with just one click.</p><h3>Here’s how:</h3><ol><li>Click the three-dot menu (⋮) in the top-right corner of the grid.</li><li>Choose either:</li></ol><ul><li>✅ Expand all groups</li><li>🔽 Collapse all groups</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GGBOHZ-7ROMuxGSy" /></figure><p>That’s it!</p><p>This is super handy when you have a lot of grouped data or multiple group levels. It helps you stay organized, work faster, and gives users a cleaner view.</p><h3>Grouping and Total Calculation with Code:</h3><p>You can also perform grouping or calculate the total in the grid using code as follows:</p><ul><li>To group data:</li></ul><pre>GridSalesLine.groupBy(&quot;SalesTable_SalesName&quot;);</pre><ul><li>To calculate the total of grid rows:</li></ul><pre>SalesLine_SalesQty.totalShown(1);</pre><p>Here, GridSalesLine is the grid control, and SalesLine_SalesQty is a grid field. You can use these features to easily manage your data and quickly get totals.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b41eb8da34b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dynamics 365: Resolving ‘Could not find stored procedure…]]></title>
            <link>https://medium.com/@busraucnn/dynamics-365-resolving-could-not-find-stored-procedure-4bd252762361?source=rss-7d6fd53ece8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4bd252762361</guid>
            <dc:creator><![CDATA[Büşra UÇAN]]></dc:creator>
            <pubDate>Fri, 27 Dec 2024 20:02:33 GMT</pubDate>
            <atom:updated>2024-12-27T20:02:33.602Z</atom:updated>
            <content:encoded><![CDATA[<h3>Dynamics 365: Resolving ‘Could not find stored procedure WHSInventReserveMinValuesForDimIdWithDelta’ Error</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*v2uSpsV3jSRIVAMm.png" /></figure><p>While working on a Dynamics 365 Finance and Operations project, I encountered the following error:</p><p>“Could not find stored procedure ‘WHSInventReserveMinValuesForDimIdWithDelta’.”</p><p>This issue commonly occurs after upgrades or deployments when certain configurations or database objects are not initialized correctly.</p><p>The Solution</p><p>Access the following URL (replace <a href="http://yourdynamics365url.com/">YOURDYNAMICS365URL.COM</a> with your environment URL) and run the Tutorial_WHSSetup class:</p><pre>https://YOURDYNAMICS365URL.COM/cmp=USMF&amp;mi=SysClassRunner&amp;cls=Tutorial_WHSSetup </pre><p>This class reinitializes Warehouse Management settings and creates the missing stored procedure.</p><p>Let me know your thoughts — happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4bd252762361" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Merging and Downloading Attachments as a Single PDF in Dynamics 365 X++]]></title>
            <link>https://medium.com/@busraucnn/merging-and-downloading-attachments-as-a-single-pdf-in-dynamics-365-x-88a1e5b391e7?source=rss-7d6fd53ece8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/88a1e5b391e7</guid>
            <dc:creator><![CDATA[Büşra UÇAN]]></dc:creator>
            <pubDate>Wed, 02 Oct 2024 08:13:32 GMT</pubDate>
            <atom:updated>2024-10-02T08:13:32.086Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*nmcy6dEUPeKXSGMW.png" /></figure><p>In this post, I’ll demonstrate how to merge various types of file attachments (PDF, Word, Excel, Images) into a single PDF and allow users to download it within Dynamics 365. This process is divided into two parts: the first part involves creating a DLL to handle the file conversion and merging, and the second part is developing the functionality in X++ to apply this solution.</p><h3>Part 1: Creating a DLL to Merge Files</h3><p>The DLL handles the conversion of different file types to PDF format and merges them.</p><ul><li><strong>Convert Word to PDF</strong>: Using libraries like Aspose.Words, we can convert any .docx or .doc file into a PDF.</li><li><strong>Convert Excel to PDF</strong>: Similarly, we use Aspose.Cells to handle .xlsx and .xls files, converting them to PDF.</li><li><strong>Convert Images to PDF</strong>: For image formats such as .jpg, .png, or .bmp, we use Aspose.Pdf to convert them into a PDF.</li><li><strong>Merge PDFs</strong>: After converting the files to PDF, we use PdfSharp to merge these PDF documents into one. The process involves appending pages from each file into a single, consolidated document.</li></ul><p>Below is a code snippet illustrating how to achieve this:</p><pre>using System;<br>using System.IO;<br>using Aspose.Words;<br>using Aspose.Cells;<br>using PdfSharp.Pdf;<br>using PdfSharp.Pdf.IO;<br><br>namespace DmrFileToPdfMerger<br>{<br>    public class PdfMerger<br>    {<br>        public Stream MergeFiles(string fileExtension, Stream newFileStream, Stream mergedPdfStream = null)<br>        {<br>            // Conversion logic for different file types<br>            Stream convertedStream = ConvertFileToPdf(fileExtension, newFileStream);<br>            <br>            // Merge files if needed<br>            if (mergedPdfStream != null)<br>                mergedPdfStream = MergePdfFiles(mergedPdfStream, convertedStream);<br>            else<br>                return convertedStream;<br><br>            return mergedPdfStream;<br>        }<br>        <br>        private Stream ConvertFileToPdf(string fileExtension, Stream fileStream)<br>        {<br>            switch (fileExtension.ToLower())<br>            {<br>                case &quot;.pdf&quot;:<br>                    return fileStream;<br>                case &quot;.docx&quot;:<br>                case &quot;.doc&quot;:<br>                    return ConvertWordToPdf(fileStream);<br>                case &quot;.xlsx&quot;:<br>                case &quot;.xls&quot;:<br>                    return ConvertExcelToPdf(fileStream);<br>                case &quot;.jpg&quot;:<br>                case &quot;.jpeg&quot;:<br>                case &quot;.png&quot;:<br>                    return ConvertImageToPdf(fileStream);<br>                default:<br>                    throw new Exception(&quot;Unsupported file type&quot;);<br>            }<br>        }<br><br>        private Stream MergePdfFiles(Stream firstStream, Stream secondStream)<br>        {<br>            using (PdfDocument firstDocument = PdfReader.Open(firstStream, PdfDocumentOpenMode.Import))<br>            using (PdfDocument secondDocument = PdfReader.Open(secondStream, PdfDocumentOpenMode.Import))<br>            {<br>                foreach (var page in secondDocument.Pages)<br>                {<br>                    firstDocument.AddPage(page);<br>                }<br><br>                MemoryStream mergedStream = new MemoryStream();<br>                firstDocument.Save(mergedStream);<br>                mergedStream.Position = 0;<br>                return mergedStream;<br>            }<br>        }<br><br>        private Stream ConvertWordToPdf(Stream wordStream) { /* Implementation */ }<br>        private Stream ConvertExcelToPdf(Stream excelStream) { /* Implementation */ }<br>        private Stream ConvertImageToPdf(Stream imageStream) { /* Implementation */ }<br>    }<br>}</pre><h3>Part 2: Implementing in X++</h3><p>Once the DLL is ready, we integrate it into Dynamics 365 X++ by creating a class to process attachments and merge them.</p><pre>class DmrDownloadAllDocumentAsPdf extends RunBase<br>{<br>    public void process()<br>    {<br>        // Merge documents using the DLL<br>        DmrFileToPdfMerger.PdfMerger merger = new DmrFileToPdfMerger.PdfMerger();<br>        System.IO.Stream mergedStream = null;<br>        <br>        while select docuRef<br>        {<br>            using (System.IO.Stream fileStream = DocumentManagement::getAttachmentStream(docuRef))<br>            {<br>                mergedStream = merger.MergeFiles(docuRef.fileExtension(), fileStream, mergedStream);<br>            }<br>        }<br>        <br>        File::SendFileToUser(mergedStream, &quot;Merged_Document.pdf&quot;);<br>    }<br>}</pre><p><strong>Note: Don’t forget to add the necessary libraries (Aspose.Words, Aspose.Cells, Aspose.Pdf, PdfSharp) as references in your project to ensure the solution works correctly.</strong></p><h3>Why This Solution Works</h3><ul><li><strong>Efficiency</strong>: Users no longer need to download attachments one by one. Instead, they can download all relevant files in a single PDF document.</li><li><strong>Ease of Sharing</strong>: Having all files in a universal PDF format simplifies sharing and storage.</li><li><strong>Customizable</strong>: The solution is flexible, and additional file formats can be supported by extending the DLL.</li></ul><p>By following these steps, you can enhance the document management process in Dynamics 365 and improve the user experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88a1e5b391e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Updating Development Machine’s Data With UAT Database — Resolving ‘KILL DATABASE CONNECTION’ Permi]]></title>
            <link>https://medium.com/@busraucnn/updating-development-machines-data-with-uat-database-resolving-kill-database-connection-permi-ff9185e414da?source=rss-7d6fd53ece8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff9185e414da</guid>
            <dc:creator><![CDATA[Büşra UÇAN]]></dc:creator>
            <pubDate>Wed, 15 May 2024 21:10:17 GMT</pubDate>
            <atom:updated>2024-05-23T08:07:46.345Z</atom:updated>
            <content:encoded><![CDATA[<h3>DB Restore — Resolving ‘KILL DATABASE CONNECTION’ Permission Error</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*n5PvpAUGS9egoK23.png" /></figure><p>An error occurred while <a href="https://medium.com/@busraucnn/updating-development-machines-data-with-uat-database-resolving-kill-database-connection-permi-ff9185e414da?source=your_stories_page-------------------------------------">Updating Development Machine’s Data With UAT Database</a>:</p><p>SQL72014: Core Microsoft SqlClient Data Provider: Msg 4630, Level 16, State 1, Line 1 The permission ‘KILL DATABASE CONNECTION’ is not supported in this version of SQL Server. Alternatively, use the server level ‘ALTER ANY CONNECTION’ permission.</p><p>SQL72045: Script execution error. The executed script: GRANT KILL DATABASE CONNECTION TO [ms_db_configreader</p><p>Solution Steps:</p><ol><li>Convert your bacpac file to a .zip format (you can edit the file extension from .bacpac to .zip).</li><li>Extract a copy of the model.xml file from the zip archive.</li></ol><p>3.In the Modelcopy.xml file, locate all lines containing &lt;Element Type=&quot;SqlPermissionStatement&quot; Name=&quot;[Grant.KillDatabaseConnection.Database].[test].[dbo]&quot;&gt;. Replace these lines with the following changes:</p><pre>&lt;Element Type=&quot;SqlPermissionStatement&quot; Name=&quot;[Grant.Connect.Database].[test].[dbo]&quot;&gt;<br>  &lt;Property Name=&quot;Permission&quot; Value=&quot;1035&quot;/&gt;<br>  &lt;!-- This part should remain the same as the original --&gt;<br>&lt;/Element&gt;</pre><p>4.Convert the zip file back to a bacpac format.</p><p>5.Add /mfp:”Modelcopy.xmlPath” to the cmd command. This allows you to use the edited Modelcopy.xml in the bacpac instead of the original one.</p><pre>SqlPackage.exe /a:import /sf:C:\Users\buss\Downloads\uatbackup.bacpac /tsn:dev3-1 /tdn:AxDB_UAT /p:CommandTimeout=1200 /tec:True /ttsc:True /mfp:C:\Users\buss\Downloads\modelcopy.xml</pre><p>Note : Note: If a synchronization error occurs after data transfer with the following exception message:</p><p>System.Data.SqlClient.SqlException (0x80131904): There is already an object named ‘LICENSING_POPULATEROLEPRIVILEGELICENSEMAPV2’ in the database.</p><p>To resolve this error, execute the following SQL code in SQL Management Studio:</p><pre>DROP PROCEDURE IF EXISTS LICENSING_POPULATEROLEPRIVILEGELICENSEMAPV2<br>GO</pre><p>Then, restart IIS in Visual Studio and give db senk.</p><p>Should you require further assistance, don’t hesitate to ask. Sweet regards!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff9185e414da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[addQueryFilter ile Referans Group Filtreleme]]></title>
            <link>https://medium.com/@busraucnn/addqueryfilter-ile-referans-group-filtreleme-3bbe86943b0f?source=rss-7d6fd53ece8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3bbe86943b0f</guid>
            <dc:creator><![CDATA[Büşra UÇAN]]></dc:creator>
            <pubDate>Fri, 03 May 2024 16:04:06 GMT</pubDate>
            <atom:updated>2024-05-03T16:04:06.205Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*B59x9KOBGaFy9eKQ.png" /></figure><p>Bu yazıda, Dynamics 365&#39;te referans gruplarını nasıl filtreleyebileceğimizden bahsedeceğim. Referans grupları, verilerin gösterilmesi için birincil tablodan farklı bir tabloyu kullanır, bu da bazen filtreleme işlemlerini karmaşık hale getirebilir.Ancak, doğru yaklaşımları kullanarak, bu karmaşıklıkları aşabilir ve istediğimiz sonuçları elde edebiliriz.</p><p><strong>Referans Gruplar ve Filtreleme Karmaşıklıkları</strong></p><p>Örneğin, bir satıcı tablosunu ele alalım. Her satıcı bir ad ve RecId gibi temel bilgilere sahiptir. Ancak, bir satıcının bir alıcı grubu (Buyer Group) veya bir ana temsilcisi (Main Contact )varsa, bu bilgiler genellikle ayrı bir tabloda tutulur(örneğin, DirPerson).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NiCx9hA0Sjfq_ssOkviW9g.png" /><figcaption>Şekildeki gibi satıcı tablosunu filtrelerseniz filtre çalışacak ama kullanıcılar grid üzerinde filtreyi göremeyecektir.</figcaption></figure><p>Bu durumda, bir satıcı satırını filtrelerseniz, ad ve RecId gibi doğrudan satıcı tablosundan gelen bilgileri filtrelemek yerine, alıcı grubu ve ana temsilci gibi verileri içeren referans grup tablosundan filtrelemelisiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*sSARQdU7WIC9luFQadp3Ug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*hQeoLX3biEYRmBC49fp0_w.png" /><figcaption>Grid üzerinde filtre kullanıcılar tarafından görünecektir.</figcaption></figure><p>Bu örneğe has bir durumumuz var . DirPerson tablosunun Name alanına göre filtreleme yaparken DataSourceName kullandık. Bunun sebebi ise aşağıdaki gibi sorgumuzu DataSourceTable ile yaptığımızda Query’de aynı tablodan iki tane olduğu için, yanlış tabloya range uyguladığından başka bir referans grubu temsil eden bir başka field ı filtrelemesi. (Filtrelemek istediğimiz alanlar Buyer Group ve Main Contact).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*hqMgoBIVkQBL8J2AyVA9FQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*iWhzXqAlkgF7LMdRAFhsOg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*vHGEuhEW9nBEwND57dWVng.png" /></figure><blockquote>Not : Query Formun init() methodunun super() inden sonra çalışıyor olmalı.</blockquote><p>iyi şanslar !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bbe86943b0f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to add a QR code to an SSRS report in Ax 2012]]></title>
            <link>https://medium.com/@busraucnn/how-to-add-a-qr-code-to-an-ssrs-report-in-ax-2012-26583d1e1cfe?source=rss-7d6fd53ece8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/26583d1e1cfe</guid>
            <dc:creator><![CDATA[Büşra UÇAN]]></dc:creator>
            <pubDate>Tue, 07 Nov 2023 11:37:56 GMT</pubDate>
            <atom:updated>2023-11-07T12:40:55.520Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*GXSeLw6stxuFcbh0.png" /></figure><h4><strong>Step 1: Add a Container Field to the Tabl</strong>e</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*U0PYs-Zw-BsnG9gRP76m3w.png" /></figure><h4><strong>Step 2: Add a Method to the DP Class</strong></h4><p>In this step, you need to add a method to the DP (Data Provider) class. (For this example, we use the example of retrieving Item Picking Route information.)</p><pre>private container QrCode(WMSPickingRouteID _pickingRouteID)<br>{<br>    Microsoft.Dynamics.QRCode.Encoder qrCode = new Microsoft.Dynamics.QRCode.Encoder();<br>    System.Drawing.Bitmap bitmap;<br>    container imageContainer;<br>    System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();<br>    <br>    bitmap = qrCode.Encode(_pickingRouteID);<br>    bitmap.Save(memoryStream, System.Drawing.Imaging.ImageFormat::get_Png());<br>    imageContainer = Binary::constructFromMemoryStream(memoryStream).getContainer();<br>    <br>    return imageContainer;<br>}</pre><h4><strong>Step 3: Insert into the Temporary Table in the DP Class</strong></h4><p>In this step, you insert the QR code data into the temporary table within your DP class.</p><pre>tmp.clear();<br>tmp.QrCode = this.QrCode(WMSPickingRoute.pickingRouteID);<br>tmp.insert();</pre><h4><strong>Step 4: Set Up SSRS Report Design</strong></h4><p>In your SSRS report design, add an image object :</p><p>a. Choose the Database as the data source.</p><p>b. Define the related field from your temporary table where you stored the QR code.</p><p>c. Set the MIME (Multipurpose Internet Mail Extensions) type for the field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*iNzsIOrcArsyrmVX_FtSvA.png" /></figure><h4>Result</h4><p>Make sure your SSRS report is configured to use the data from your DP class, and it should display the QR code as specified in the temporary table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*_4s5F1pOoz-Wd9xQrf08xA.png" /></figure><p>This is overview of adding a QR code to an SSRS report in Ax 2012. Please adjust the code and report design to fit your specific requirements. Good luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26583d1e1cfe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dynamics 365 Dialogda Lookup veya Modified Methodunu Override Etmek]]></title>
            <link>https://medium.com/@busraucnn/dynamics-365-dialogda-lookup-veya-modified-methodunu-override-etmek-4dc2ba0762c8?source=rss-7d6fd53ece8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4dc2ba0762c8</guid>
            <dc:creator><![CDATA[Büşra UÇAN]]></dc:creator>
            <pubDate>Fri, 22 Sep 2023 10:54:33 GMT</pubDate>
            <atom:updated>2023-09-22T10:55:03.790Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*JX-dYChlr6UnJuW-.png" /></figure><p>Bir diyalogda “BookId” alanı seçildiğinde “AssetId” alanının lookup methodunu nasıl override edebiliriz adım adım anlatacağım.</p><p><strong>Gereksinimler</strong></p><p>Adımlara başlamadan önce, Dynamics 365&#39;te “BookId” ve “AssetId” alanlarını içeren class ile oluşturulmuş bir diyalogunuz olduğundan emin olun.</p><p><strong>Adım 1: Control Adını Belirleyin</strong></p><p>Dynamics 365, diyalogdaki alanlar için belirli bir adlandırma kuralları kullanır. Bu adlandırma kuralları, alanın diyalogdaki “Control adı” na dayanmaktadır. Örneğin, “fld2_1” ikinci alanı (“AssetId” alanınızın durumunda) işaret etmektedir .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*Odzm3tQWM32K-goc.png" /></figure><p><strong>Adım 2: Lookup Methodunu Override Etmek</strong></p><p>“AssetId” alanını seçilen “BookId” e göre filtrelemek için “AssetId” alanının lookup methodunu override etmek gerekiyor. İşte bu işlem için örnek bir kod parçası:</p><pre>public void fld2_1_lookup()<br>{<br>    FormStringControl control = dialog.formRun().controlCallingMethod();<br>    SysTableLookup sysTableLookUp;<br>    QueryBuildDataSource qbds;<br>    Query query = new Query();<br><br>    qbds = query.addDataSource(tableNum(Assetbook));<br><br>    sysTableLookUp = SysTableLookup::newParameters(tableNum(Assetbook), control, true);<br>    sysTableLookUp.addSelectionField(fieldNum(Assetbook, AssetId));<br>    sysTableLookUp.addLookupfield(fieldNum(Assetbook, AssetId));<br>    sysTableLookUp.addLookupMethod(tableMethodStr(Assetbook, AssetName));<br>    sysTableLookUp.addLookupfield(fieldNum(Assetbook, AssetGroup));<br><br>    qbds.addRange(fieldnum(Assetbook, BookId)).value(queryvalue(BookId));<br><br>    sysTableLookUp.parmQuery(query);<br>    sysTableLookUp.performFormLookup();<br>}</pre><p><strong>Adım 3: Seçilen BookId’i Alın</strong></p><p>“BookId” alanının (“fld1_1” durumundaki) modified methodunda, seçilen “BookId” değerini aşağıdaki gibi alabilirsiniz:</p><pre>public boolean fld1_1_modified()<br>{<br>    FormStringControl control = dialog.formRun().controlCallingMethod();<br>    boolean isFieldModified;<br><br>    isFieldModified = control.modified();<br><br>    if (isFieldModified)<br>    {<br>        BookId = control.valueStr();<br>    }<br><br>    return isFieldModified;<br>}</pre><p><strong>Adım 4: PostRun Methodunu Tamamlayın</strong></p><p>Geliştirmeyi tamamlamak için, “dialogPostRun” yöntemine aşağıdaki kodu eklemeniz gerekmektedir:</p><pre>public void dialogPostRun(DialogRunbase _dialog)<br>{<br>    super(_dialog);<br>    _dialog.dialogForm();<br>    _dialog.dialogForm().formRun().controlMethodOverload(true);<br>    _dialog.dialogForm().formRun().controlMethodOverloadObject(this);<br>    _dialog.formRun().controlMethodOverload(true);<br>    _dialog.formRun().controlMethodOverloadObject(this);<br><br>    // Add any additional code or actions required after the dialog has run.<br>}</pre><p>Bu adımlarla, Dynamics 365 diyalogunuzda “AssetId” alanının lookup yöntemini override edebilir ve istediğiniz işlevselliği elde edebilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/0*F4vwLDJ92vvuQg2n.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4dc2ba0762c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Override the Lookup or Modified Method in Dynamics 365 Dialogs]]></title>
            <link>https://medium.com/@busraucnn/how-to-override-the-lookup-or-modified-method-in-dynamics-365-dialogs-a734ea2ce845?source=rss-7d6fd53ece8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a734ea2ce845</guid>
            <dc:creator><![CDATA[Büşra UÇAN]]></dc:creator>
            <pubDate>Mon, 18 Sep 2023 11:21:32 GMT</pubDate>
            <atom:updated>2023-09-18T11:21:32.077Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*4SecIXgwuCjwn50Z.png" /></figure><p>In this guide, we will walk you through the process of overriding the lookup method for an “AssetId” field in a dialog when the “BookId” field is selected as per your scenario.</p><p><strong>Prerequisites</strong></p><p>Before we dive into the steps, ensure that you have a batch class-created dialog in Dynamics 365 with two fields: “BookId” and “AssetId” in this case</p><p><strong>Step 1: Identify the Control Name</strong></p><p>Dynamics 365 uses a specific naming convention for fields in dialogs. The naming convention is based on the “Control name” of the field in the dialog. For example, “fld2_1” refers to the second field in the dialog (in this case, “AssetId”).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6rEjZdTMFhwtbm760KFE-w.png" /></figure><p><strong>Step 2: Override the Lookup Method</strong></p><p>To filter the “AssetId” field based on the selected “BookId,” override the lookup method for the “AssetId” field. Here is a sample code snippet for this:</p><pre>public void fld2_1_lookup()<br>{<br>    FormStringControl control = dialog.formRun().controlCallingMethod();<br>    SysTableLookup sysTableLookUp;<br>    QueryBuildDataSource qbds;<br>    Query query = new Query();<br><br>    qbds = query.addDataSource(tableNum(Assetbook));<br><br>    sysTableLookUp = SysTableLookup::newParameters(tableNum(Assetbook), control, true);<br>    sysTableLookUp.addSelectionField(fieldNum(Assetbook, AssetId));<br>    sysTableLookUp.addLookupfield(fieldNum(Assetbook, AssetId));<br>    sysTableLookUp.addLookupMethod(tableMethodStr(Assetbook, AssetName));<br>    sysTableLookUp.addLookupfield(fieldNum(Assetbook, AssetGroup));<br><br>    qbds.addRange(fieldnum(Assetbook, BookId)).value(queryvalue(BookId));<br><br>    sysTableLookUp.parmQuery(query);<br>    sysTableLookUp.performFormLookup();<br>}</pre><p><strong>Step 3: Retrieve the Selected BookId</strong></p><p>In the modified method of the “BookId” field (“fld1_1” in this case), you can retrieve the selected “BookId” value as follows:</p><pre>public boolean fld1_1_modified()<br>{<br>    FormStringControl control = dialog.formRun().controlCallingMethod();<br>    boolean isFieldModified;<br><br>    isFieldModified = control.modified();<br><br>    if (isFieldModified)<br>    {<br>        BookId = control.valueStr();<br>    }<br><br>    return isFieldModified;<br>}</pre><p><strong>Step 4: Finalize the PostRun Method</strong></p><p>To complete the implementation, you need to add the following code to the dialogPostRun method:</p><pre>public void dialogPostRun(DialogRunbase _dialog)<br>{<br>    super(_dialog);<br>    _dialog.dialogForm();<br>    _dialog.dialogForm().formRun().controlMethodOverload(true);<br>    _dialog.dialogForm().formRun().controlMethodOverloadObject(this);<br>    _dialog.formRun().controlMethodOverload(true);<br>    _dialog.formRun().controlMethodOverloadObject(this);<br><br>    // Add any additional code or actions required after the dialog has run.<br>}</pre><p>With these steps, you should be able to override the lookup method for the “AssetId” field and achieve the desired functionality in your Dynamics 365 dialog.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*_0-QQbTH8kD4wdsNc755QA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a734ea2ce845" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>