<?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 Elif Işıkhan on Medium]]></title>
        <description><![CDATA[Stories by Elif Işıkhan on Medium]]></description>
        <link>https://medium.com/@isikhanelif?source=rss-ec24c0b7d834------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9cltT468S3mOlfBOFSKsHA.jpeg</url>
            <title>Stories by Elif Işıkhan on Medium</title>
            <link>https://medium.com/@isikhanelif?source=rss-ec24c0b7d834------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 19:53:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@isikhanelif/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[From Helper to Business Assistant: Copilot Meets MCP in D365 F&O]]></title>
            <link>https://isikhanelif.medium.com/from-helper-to-business-assistant-copilot-meets-mcp-in-d365-f-o-5f3f33e195ea?source=rss-ec24c0b7d834------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f3f33e195ea</guid>
            <category><![CDATA[microsoft-copilot]]></category>
            <category><![CDATA[d365]]></category>
            <category><![CDATA[d365-fo]]></category>
            <category><![CDATA[erp]]></category>
            <category><![CDATA[mcp-server]]></category>
            <dc:creator><![CDATA[Elif Işıkhan]]></dc:creator>
            <pubDate>Tue, 14 Oct 2025 06:20:54 GMT</pubDate>
            <atom:updated>2025-10-14T08:02:56.148Z</atom:updated>
            <content:encoded><![CDATA[<p>As AI becomes more integrated into business applications, Microsoft’s <strong>Copilot</strong> is evolving from a simple helper into a true business assistant.<br>At the heart of this transformation is the <strong>Model Context Protocol (MCP)</strong> — a new standard that lets Copilot connect directly to real ERP data and business logic inside <strong>Dynamics 365 Finance &amp; Operations</strong>.</p><p>In this post, we’ll explore what MCP is, why it matters, and how it changes the way Copilot interacts with your F&amp;O environment.</p><h4>What is MCP (Model Context Protocol)?</h4><p>In its simplest form, MCP is a <strong>standard protocol that lets Large Language Models (LLMs) interact with external systems, APIs.</strong></p><p>It works like this:</p><blockquote>User asks a question → LLM checks available tools on the MCP server → selects and calls the right API → interprets the result → returns the final answer.</blockquote><p>Essentially, MCP acts as a bridge between AI models and real business data or services.<br>Instead of hard-coding integrations, the model can automatically discover and call the right API based on context.<br><em>→ Think of it as a universal connector for AI tools.</em></p><h4><strong>Before MCP: What could Copilot do?</strong></h4><p>Copilot could work in Dynamics 365 environments without MCP. But it had serious limitations in terms of data access and business logic integration.</p><p><strong>1. Knowledge-only Copilot</strong></p><p>Previously, Copilot: Based on documentation in Microsoft Docs, it provided the user with “<em>how-to</em>” or “<em>where to click</em>” (navigation)-style help. It was more like an in-app guide , not an “operational assistant.”</p><p>For example:</p><blockquote>“How can I check the inventory of item 1000?”</blockquote><blockquote>→ Copilot — “Go to Inventory management &gt; Inquiries &gt; On-hand”</blockquote><p>But it couldn’t tell the actual number (stock quantity) because it didn’t have access to business data (ERP tables).</p><p><strong>2. Alternative integrations (Dataverse / X++)</strong></p><p>If you wanted to run Copilot with “real data,” you had to:</p><ul><li>Create virtual tables using the Dataverse connector,</li><li>or define custom APIs by writing an X++ client plug-in.</li></ul><p>Yes, you could actually pull in company-specific data with these two methods.<br>But the maintenance was difficult, Requires custom code for each scenario, You had to figure out which table/entity was related to which.</p><p><em>So, Copilot had AI intelligence, but it couldn’t access the ERP’s business logic.</em><br>It was limited to the APIs you provided.</p><h4>The Difference with MCP</h4><p>MCP has standardized and automated this bridge.</p><ul><li>Copilot acts as an AI agent.</li><li>It receives the user’s query,</li><li>It looks at predefined tools on the MCP server, (Examples: Find inventory, Find approved vendors, Get invoice, etc.)</li><li>The AI ​​automatically selects which tool is the right one,</li><li>And it calls ERP business logic (e.g., validations, tables, entity relationships) directly through MCP.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Nr25utN3gO1n1wTVofm_w.png" /><figcaption>Differences in brief</figcaption></figure><h3>In short:</h3><p>Copilot used to talk to you,<br>now, thanks to MCP, it can talk to ERP.</p><h3>Current State of MCP for Dynamics 365 F&amp;O</h3><p>➤ Microsoft has made solid progress integrating the MCP into F&amp;O, but its adoption is currently in its early and limited stages.<br>What’s currently possible, and what are the limitations?</p><p>☑️ Currently Supported Features</p><ul><li>Microsoft provides an ERP MCP server for D365 Finance &amp; Operations.</li><li>This MCP server provides predefined tools for F&amp;O and SCM (Supply Chain) functions.</li><li>Tools can perform the following tasks (for example):<br>• Find Approved Vendors ; Other stock, inventory, and order-related tools</li><li>There are some prerequisites for the D365 F&amp;O application version and Copilot versions:<br>• The F&amp;O application must be at least version 10.0.2263.17 ; The Copilot version in Dynamics 365 Finance must be ≥ 1.0.3049.1</li><li>A specific minimum Copilot version may also be required for the SCM side.</li><li>The MCP server lists the tools defined; the agent can call these tools.</li><li><strong>There are also some technical limitations:</strong><br>• Reference type inputs/outputs (i.e., direct object references) are not supported in MCP tool schemas.</li><li>Using complex structures such as multiple types in MCP tool definition schemas can cause problems.</li></ul><h4>✖️Current Limitations</h4><h4>1. Read-Only</h4><ul><li>MCP for F&amp;O is currently <strong>read/query-only</strong>.</li><li>You can’t yet <strong>create, update, or delete records</strong> directly via MCP.</li><li>For those operations, you must still use the <strong>Dataverse connector</strong> (via virtual tables or APIs).</li></ul><h4>2. Static Tool Set</h4><ul><li>You can’t add or modify tools in the MCP server yourself.</li><li>The available tools are defined and published by Microsoft — currently around 13 tools total.</li></ul><h4>3. No Virtual Table Support</h4><ul><li>Unlike the Dataverse connector, MCP doesn’t support virtual entities/tables, so complex data joins or multi-table queries are limited.</li></ul><h4>4. Performance &amp; Context Limits</h4><ul><li>Each MCP tool definition consumes part of the LLM’s context window.<br> → When too many tools are available, models may get slower or pick the wrong one (“too many tools” issue).</li><li>Latency can appear for complex ERP queries — especially if business logic involves multiple joins or validations.</li></ul><h4>5. Security &amp; Access</h4><ul><li>All calls use <strong>Entra ID authentication</strong>, but you should still be careful about what data your tools expose.</li><li>Fine-grained access control is handled at the environment level, not within each tool.</li></ul><h4>6. Developer Experience</h4><ul><li>You can only <strong>use existing tools</strong>, not define new ones.</li><li>MCP’s schema has some limitations (no nested object types, limited arrays).</li></ul><p>Right now, MCP in D365 F&amp;O is <strong>a strong foundation for intelligent, read-based automation</strong> — especially for agents that answer questions like “Which vendors are approved?” or “Where do we have stock for item 1000?”.</p><p>But it’s not yet a full replacement for Dataverse or X++ integrations when you need:</p><ul><li>Complex transactions</li><li>Record creation/update logic</li><li>Deep customization</li></ul><h4>Conclusion</h4><ul><li>MCP brings a major shift to Dynamics 365 F&amp;O — transforming Copilot from a help guide into a true business assistant.</li><li>It allows Copilot to access real ERP data and apply business logic, without custom code or complex integrations.</li><li>Although still read-only and limited to predefined tools, MCP lays the foundation for a smarter, connected future where <strong>Copilot doesn’t just talk to you — it talks to your ERP.</strong></li></ul><h3>Sources</h3><ul><li>Microsoft Learn</li><li><a href="https://www.confiz.com/">https://www.confiz.com/</a></li><li><a href="https://dynamicspedia.com/">https://dynamicspedia.com/</a></li><li><a href="https://demiliani.com/">https://demiliani.com/</a></li><li><a href="https://www.cdata.com/">https://www.cdata.com/</a></li><li><a href="https://www.youtube.com/@fatihlovestosimplify">https://www.youtube.com/@fatihlovestosimplify</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f3f33e195ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[D365 F&O — Application Insights Integration Guide]]></title>
            <link>https://isikhanelif.medium.com/d365-f-o-application-insights-integration-guide-e481dc0d61f7?source=rss-ec24c0b7d834------2</link>
            <guid isPermaLink="false">https://medium.com/p/e481dc0d61f7</guid>
            <category><![CDATA[application-insights]]></category>
            <category><![CDATA[finance-and-operations]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[d365-fo]]></category>
            <category><![CDATA[d365]]></category>
            <dc:creator><![CDATA[Elif Işıkhan]]></dc:creator>
            <pubDate>Tue, 07 Oct 2025 07:41:43 GMT</pubDate>
            <atom:updated>2025-10-07T11:55:59.453Z</atom:updated>
            <content:encoded><![CDATA[<h3>D365 F&amp;O — Application Insights Integration Guide</h3><p>This document describes how to connect <strong>Dynamics 365 Finance &amp; Operations (D365 F&amp;O)</strong> environments (UAT, Sandbox, or Production) with <strong>Azure Application Insights</strong> to enable centralized telemetry and error monitoring.<br> The integration helps track:</p><ul><li>X++ exceptions</li><li>SSRS (Report Server) issues</li><li>Form performance</li><li>Custom telemetry events</li></ul><h4>Prerequisites</h4><ul><li>Access to <strong>Azure Portal</strong></li><li>D365 F&amp;O <strong>System administrator</strong> role</li><li>A <strong>Tier-2 or Tier-1</strong> environment</li><li>Permission to configure environment parameters</li></ul><h3>Steps to Follow for Healthy Monitoring / Telemetry</h3><h4>1. Create an Application Insights resource</h4><p>Create an Application Insights resource on Azure in the appropriate resource group/subscription.</p><ul><li>Go to Application Insights via <a href="https://portal.azure.com/">https://portal.azure.com/</a> and create a new one.</li><li>Subscription : your Subscription</li><li>Resource Group : If the environment you want to use has a resource group, you can use it; if not (for example, if it’s a Tier-2 environment), you can create a new one. Example naming: UATAppIns</li><li>Name : UATTelemetries (eg)</li><li>Region : Environment’s region.</li><li>Review + Create</li></ul><p>After creation, you will see a screen like the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uzjbzK7DcdfmhH1_6_gdDQ.png" /></figure><h4>2. Associate D365 environments with Application Insights</h4><ul><li>In D365FO locate the Feature Management menu and enable <strong>Monitoring and Telemetry feature.</strong></li><li>Go to System administration &gt; Monitoring and Telemetry parameters.</li><li>In environments tab , select the environment ID (can be found in LCS) and environment type.</li><li>In Application Insights Registry, fill in the environment mode and connection string columns.</li><li>Finally choose which types of telemetry you would like to capture in the Configure tab.</li></ul><h4>3. Analyze logs using Kusto Query Language (KQL)</h4><p>By creating queries with KQL in the Azure Portal &gt; Application Insights &gt; Logs section, you can examine metrics such as which forms open slowly, what the error rates are, custom event logs, and batch telemetry.</p><p>&gt; Sample query 1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aM_a8T8lcGtOJJqZBzNpOw.png" /></figure><p>&gt; Sample Query 2</p><p>exceptions<br>| where timestamp &gt; ago(1h)<br>| where type == “System.Exception”<br>| order by timestamp desc</p><h4><strong>Why doesn’t LCS Monitoring/Activity work as it used to?</strong></h4><p>Microsoft is deprecating some LCS-based environmental monitoring and Activity tab features.</p><p>For example, queries like “Get User Login Events,” “Get Error Events for Form,” “Get Connection Outages,” and “Get Slow Interactions” are no longer supported or are effectively hidden through LCS.</p><p>Instead, Microsoft is focusing on integrating Azure Application Insights with Telemetry for D365 Finance &amp; SCM environments.</p><p>Monitoring &amp; Telemetry provides a framework for sending data directly from the application to Application Insights.</p><p>This results in an error when attempting to open LCS monitoring pages in a UAT environment because that functionality is no longer active or has been removed.</p><h4>Considerations / Limitations</h4><p>Not every type of telemetry is currently supported. Some LCS monitoring functions, such as AOS crashes and 502 errors, may not be collected directly in Application Insights.</p><p>Telemetry data incurs costs in Azure — so choose carefully which data you receive.</p><p>Be careful with custom telemetry you send from within the application; sending too much data, too many inputs, or sensitive information (e.g., user passwords) can cause problems.</p><p>Be mindful of your application version: some telemetry features are only supported from certain versions onward.</p><p>It’s important to manage data volume with well-crafted queries (KQL).</p><h4>Resources</h4><ul><li>Microsoft Learn</li><li><a href="https://community.dynamics.com/">https://community.dynamics.com/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e481dc0d61f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ARM Deployment Failure Due to NonModifiablePolicyAlias]]></title>
            <link>https://isikhanelif.medium.com/arm-deployment-failure-due-to-nonmodifiablepolicyalias-a5a9bfc2edaa?source=rss-ec24c0b7d834------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5a9bfc2edaa</guid>
            <category><![CDATA[d365-fo]]></category>
            <category><![CDATA[arm-deployment]]></category>
            <category><![CDATA[cloud-hosted-environment]]></category>
            <category><![CDATA[microsoft-azure]]></category>
            <category><![CDATA[d365]]></category>
            <dc:creator><![CDATA[Elif Işıkhan]]></dc:creator>
            <pubDate>Tue, 02 Sep 2025 11:20:33 GMT</pubDate>
            <atom:updated>2025-09-02T11:20:33.236Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*RQgDyVgMqcn5JIKm2jH-0g.png" /></figure><h3>1. Issue Summary</h3><p>During the deployment of a Cloud-hosted build machine via <strong>LCS (Lifecycle Services)</strong>, the deployment failed with the following error:</p><pre>ARM Deployment [GPBuild02] finished with state [Failed].<br>Error: NonModifiablePolicyAlias<br>Message: The aliases &#39;Microsoft.Compute/disks/publicNetworkAccess&#39; are not modifiable in requests using API version &#39;2017-03-30&#39;.</pre><p>This error indicates that an <strong>Azure Policy</strong> tried to enforce a modify action on the property Microsoft.Compute/disks/publicNetworkAccess. However, the LCS deployment template used an <strong>old API version (2017-03-30)</strong> that does not support modification for this alias. As a result, the policy blocked the deployment.</p><h3>2. Root Cause</h3><ul><li><strong>LCS templates</strong> use a legacy API version for disk resources (2017-03-30).</li><li>A new or updated <strong>Azure Policy assignment</strong> (“Managed disks should disable public network access”) was enforced with <strong>Deny or </strong><strong>Modify effect</strong>.</li><li>The <strong>alias</strong> Microsoft.Compute/disks/publicNetworkAccess is not compatible with modify for older API versions.</li><li>Therefore, the policy engine raised <strong>NonModifiablePolicyAlias</strong> and denied the deployment.</li></ul><p>This explains why the issue appeared <strong>recently</strong>, even though similar environments were successfully deployed in the past:</p><ol><li>The policy definition or effect was updated (e.g., from Audit to Deny).</li><li>The policy scope was extended to include the <strong>Company ERP</strong> subscription/resource group.</li><li>The alias behavior was updated in Azure Policy definitions.</li></ol><h3>3. Resolution</h3><h3>Temporary Workaround (Implemented)</h3><ul><li>Created a <strong>Policy Exemption</strong> on the resource group used by LCS deployment.</li><li>Exemption scope: Resource Group of the Cloud-hosted environment.</li><li>Exemption type: <em>Waiver</em>.</li><li>Justification: “LCS deployment requires exemption due to legacy ARM API version not supporting policy modify effect.”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fgXue-p2QdKcLFRSWhEPcg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o5NvNVNuwV_AXcRRwZF2nQ.png" /></figure><p>Result: Deployment retried and completed successfully.</p><h3>Long-term Solutions</h3><ol><li><strong>Scope Exclusion:</strong> Update the policy assignment and exclude the LCS Resource Group in “Excluded scopes”.</li><li><strong>Tag-based Exception:</strong> Apply a tag (e.g., lcs=true) to the LCS Resource Group and configure the policy definition to exclude tagged resources.</li><li><strong>Policy Refinement:</strong> Update the policy so that modify is only applied when API version ≥ 2022-xx-xx. For older API versions, fallback to audit.</li><li><strong>Dedicated Subscription/Resource Group:</strong> Deploy LCS environments in a non-policy-enforced subscription or RG (less ideal for governance).</li></ol><h3>4. Recommendations</h3><ul><li><strong>Document Exemption Policy:</strong> Maintain clear documentation of exemptions for audit purposes.</li><li><strong>Review Policy Assignments:</strong> Coordinate with security/governance teams to validate whether policies need refinement to avoid unintended conflicts with Microsoft-managed templates.</li><li><strong>Monitor Policy Updates:</strong> Any future change to policy versions/effects/scopes should be communicated to application/ERP teams.</li><li><strong>Automation:</strong> Optionally, create an automated check before deployment to verify whether the target Resource Group has a conflicting policy assignment.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5a9bfc2edaa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chaining Scheduled Batch Jobs in Dynamics 365 F&O]]></title>
            <link>https://isikhanelif.medium.com/chaining-scheduled-batch-jobs-in-dynamics-365-f-o-e5ccf0ba3ce3?source=rss-ec24c0b7d834------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5ccf0ba3ce3</guid>
            <category><![CDATA[d365-fo]]></category>
            <category><![CDATA[batch-job]]></category>
            <category><![CDATA[scheduled-jobs]]></category>
            <category><![CDATA[d365]]></category>
            <category><![CDATA[finance-and-operations]]></category>
            <dc:creator><![CDATA[Elif Işıkhan]]></dc:creator>
            <pubDate>Sat, 31 Aug 2024 10:53:09 GMT</pubDate>
            <atom:updated>2024-08-31T10:53:09.950Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HVkYVepStzMa8HNXOeKfCA.png" /></figure><p>In this guide, we will explore how to schedule batch jobs in code. Let’s start with a brief overview of what a batch is.</p><p>In D365, a “batch” refers to a scheduled, background process that handles large volumes of data processing, periodic report generation, or automated operations. These processes generally run without user interaction and can be triggered at specific times, in a certain sequence, or by specific events.</p><p>Batch processes in Dynamics 365 are useful for executing tasks in the background, and to enhance performance, these processes can be run in parallel on different servers. They are crucial for balancing system load and automating time-sensitive tasks.</p><p>In some scenarios, you may want to schedule one batch to start based on the completion of another.</p><p><strong>Implementing the First Batch</strong></p><p>To create the first batch, it’s sufficient to derive your class from the RunBaseBatch class. This will automatically endow your class with the properties of a batch job.</p><p><strong>Key Methods to Override:</strong></p><ol><li><strong>dialog()</strong>: This method is used to add a new field to the standard batch dialog form. Typically, it is triggered by the prompt() method.</li></ol><pre>public Object dialog()<br>{<br>    DialogRunBase drb = super();<br>    dialogDaysToKeep = drb.addFieldValue(extendedTypeStr(PositiveDays), daysToKeep, &quot;@WAX3411&quot;, &quot;@WAX3131&quot;);<br>    return drb;<br>}</pre><p>2. <strong>getFromDialog()</strong>: Override this method to use the fields added to the standard dialog form when the class is executed.</p><pre>public boolean getFromDialog()<br>{<br>    daysToKeep = dialogDaysToKeep.value();<br>    return super();<br>}</pre><p>3. runOperation<strong>()</strong>: This method contains the main operation code that will be triggered when the batch is executed.</p><pre>public void runOperation()<br>{<br>    // do something<br>}</pre><p>4. <strong>description()</strong>: Indicates the description of the batch.</p><pre>static ClassDescription description()<br>{<br>    return &quot;Example batch class&quot;;<br>}</pre><p>At this stage, we’ve set up a basic batch. Let’s create two batches named SampleBatch1 and SampleBatch2, and set up SampleBatch1 to trigger the setup of SampleBatch2.</p><p><strong>Required Classes for the Process</strong></p><p><strong>SysOperationServiceController</strong>:</p><p>• SysOperationServiceController is a class in the D365 F&amp;O platform, used as part of the SysOperation Framework. It is utilized to start and manage batch (bulk) operations or service-based operations. This class is particularly useful for operations that need to be executed with minimal or no user interface (UI).</p><p><strong>BatchInfo Class</strong>:</p><p>• Used to track the status and details of a batch job during execution.</p><p><strong>Important Parameters and Methods</strong>:</p><p>• <strong><em>parmCaption</em></strong>: Gets or sets the caption for the operation.</p><p>• <strong><em>parmBatchTaskId</em></strong>: Gets or sets the task ID for the batch job.</p><p>• <strong><em>parmTaskExecutionStatus</em></strong>: Gets or sets the execution status of the task (e.g., completed, failed, running).</p><p>• <strong><em>parmCompanyName</em></strong>: Gets or sets the company name in which the batch job will run.</p><p>• <strong><em>parmExecMode</em></strong>: Gets or sets the execution mode (e.g., whether the job will run as a batch or immediately).</p><p>• <strong><em>parmBatchInfoId</em></strong>: Gets or sets the unique ID of the batch job.</p><p><strong>BatchHeader Class</strong>:</p><p>• Used to define and configure the general properties of a batch job.</p><p><strong>Important Parameters and Methods</strong>:</p><p>• <strong><em>parmBatchJobId</em></strong>: Gets or sets the unique identifier of the batch job.</p><p>• <strong><em>parmDescription</em></strong>: Gets or sets the description of the batch job.</p><p>• <strong><em>parmExecutionStatus</em></strong>: Gets or sets the execution status of the batch job.</p><p>• <strong><em>parmBatchGroupId</em></strong>: Gets or sets the ID of the batch group to which the batch job belongs.</p><p>• <strong><em>parmRecurrence</em></strong>: Gets or sets the recurrence schedule of the batch job.</p><p>• <strong><em>parmHoldStatus</em></strong>: Determines whether the batch job is on hold and gets or sets this status.</p><p><strong>BatchRetries Class</strong>:</p><p>• Used to manage the retry process for batch jobs that fail.</p><p><strong>Important Parameters and Methods</strong>:</p><p>• <strong><em>parmRetriesCount</em></strong>: Gets or sets the number of retries for a batch job.</p><p>• <strong><em>parmRetryInterval</em></strong>: Gets or sets the wait time before retrying a failed batch job.</p><p>• <strong><em>parmMaxRetries</em></strong>: Gets or sets the maximum number of retries for a batch job.</p><p>• <strong><em>parmRetryExecutionStatus</em></strong>: Gets or sets the status of the operation during retry.</p><blockquote>Before start triggering the code, please make sure that the DynamicsAxBatch service is running.</blockquote><p><strong>Scheduling the Next Batch Job</strong></p><p>To schedule the next batch job, use the following method within SampleBatch1:</p><pre>private void scheduleNextBatchJob()<br>{<br>    SysOperationServiceController sysOperationServiceController;<br>    BatchInfo processBatchInfo;<br>    BatchRetries noOfRetriesOnFailure = 4;<br>    SampleBatch2 SampleBatch2 = SampleBatch2::construct();<br>    BatchHeader batchHeader;<br>    int delayMinutes = 30;<br> <br>    batchHeader = BatchHeader::construct();<br>    batchHeader.parmCaption(&quot;SampleBatch2 caption&quot;);<br>    processBatchInfo = SampleBatch2.batchInfo();<br>    processBatchInfo.parmRetriesOnFailure(noOfRetriesOnFailure);<br>    processBatchInfo.parmBatchExecute(NoYes::Yes);<br>    batchHeader.addTask(SampleBatch2);<br> <br>    batchHeader.parmStartDateTime(DateTimeUtil::addMinutes(DateTimeUtil::utcNow(), delayMinutes));<br><br>    BatchRetries batchRetries = BatchRetries::construct();<br>    batchRetries.parmRetriesCount(0);        // Initial retry count is zero<br>    batchRetries.parmMaxRetries(3);          // Maximum 3 retries<br>    batchRetries.parmRetryInterval(300);     // Retry after 5 minutes (300 seconds)<br><br>    // Save and start the batch job<br>    batchHeader.save();<br>    batchInfo.save();<br>    batchRetries.save();<br>}</pre><p><strong>Triggering the Next Batch in the run() Method</strong></p><p>Finally, call the above method in the run() method of SampleBatch1:</p><pre>public void run()<br>{ <br>    // do something<br>    <br>    this.scheduleNextBatchJob();<br>}</pre><p>This code sets up a sequence where SampleBatch1 schedules and triggers SampleBatch2, ensuring that the two batch jobs are executed in the desired order.</p><p><strong>Conclusion:</strong></p><p>In this guide, we’ve explored the process of creating and chaining batch jobs in Dynamics 365 Finance and Operations. By leveraging the power of classes like RunBaseBatch, SysOperationServiceController, BatchInfo, BatchHeader, and BatchRetries, we’ve demonstrated how to efficiently manage complex background operations. This approach not only ensures the sequential execution of dependent batch jobs but also enhances the automation and reliability of critical business processes.</p><p>Full of mentioned codes</p><pre>class SampleBatch1 extends RunBaseBatch<br>{<br>    public void run()<br>    {<br>        #OCCRetryCount<br>        <br>        try<br>        {<br>            //do something (e.g. fill table1)            <br>            this.scheduleNextBatchJob(); //(e.g. delete table1)<br>            <br>        }<br>        catch(Exception::Deadlock)<br>        {<br>            retry;<br>        }<br>        catch(Exception::UpdateConflict)<br>        {<br>            if(appl.ttsLevel() == 0)<br>            {<br>                if(xSession::currentRetryCount() &gt;= #RetryNum)<br>                {<br>                    throw Exception::UpdateConflictNotRecovered;<br>                }<br>                else<br>                {<br>                    retry;<br>                }<br>            }<br>            else<br>            {<br>                throw Exception::UpdateConflict;<br>            }<br>        }<br>    }<br><br>    private void scheduleNextBatchJob()<br>    {<br>        SysOperationServiceController   sysOperationServiceController;<br>        BatchInfo                       processBatchInfo;<br>        BatchRetries                    noOfRetriesOnFailure = 4;<br>        SampleBatch2                    SampleBatch2 = SampleBatch2::construct();<br>        BatchHeader                     batchHeader;<br>        int                             delayMinutes = 30;<br><br>        batchHeader = BatchHeader::construct();<br>        batchHeader.parmCaption(&quot;Example batch 2&quot;);<br>        processBatchInfo = SampleBatch2.batchInfo();<br>        processBatchInfo.parmRetriesOnFailure(noOfRetriesOnFailure);<br>        processBatchInfo.parmBatchExecute(NoYes::Yes);<br>        batchHeader.AddTask(SampleBatch2);<br><br>        batchHeader.parmStartDateTime(DateTimeUtil::addMinutes(DateTimeUtil::utcNow(), delayMinutes));<br>        batchHeader.save();<br>    }<br><br>    public boolean validate(Object calledFrom = null)<br>    {<br>        boolean ret = true ;<br>        return ret;<br>    }<br><br>    static void main(Args args)<br>    {<br>        SampleBatch1        batch;<br>        <br>        batch = SampleBatch1::construct();<br>        if(batch.validate() &amp;&amp; batch.prompt() )<br>            batch.run();<br>    }<br><br><br>    static ClassDescription description()<br>    {<br>        return &quot;Example Batch class 1&quot;;<br>    }<br><br>    static SampleBatch1 construct()<br>    {<br>        return new SampleBatch1();<br>    }<br><br>    public boolean canGoBatchJournal()<br>    {<br>        return true;<br>    }<br><br>    public boolean init()<br>    {<br>        return true;<br>    }<br><br>    protected void new()<br>    {<br>        super();<br>    }<br><br>    public boolean runsImpersonated()<br>    {<br>        return true;<br>    }<br><br>    protected boolean canRunInNewSession()<br>    {<br>        return false;<br>    }<br><br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5ccf0ba3ce3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to add pictures to PDF document using PDFSharp library in D365 F&O]]></title>
            <link>https://isikhanelif.medium.com/how-to-add-pictures-to-pdf-document-using-pdfsharp-library-in-d365-f-o-71ce14a11545?source=rss-ec24c0b7d834------2</link>
            <guid isPermaLink="false">https://medium.com/p/71ce14a11545</guid>
            <category><![CDATA[d365-fo]]></category>
            <category><![CDATA[d365]]></category>
            <dc:creator><![CDATA[Elif Işıkhan]]></dc:creator>
            <pubDate>Tue, 17 Jan 2023 16:10:45 GMT</pubDate>
            <atom:updated>2023-01-17T16:10:45.539Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*Nps3KAEniIvkcjm2QAklhA.png" /></figure><p>In this article, I will explain the process of adding multiple images to a pdf document from start to finish.</p><p>According to the scenario, users will add the image via their attachment form and overwrite the existing pdf in the attachments of a particular record (let’s say it’s an sales agreement record)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qlLJJdm1BRbZF2_Toue70A.png" /></figure><p>We need two buttons where we can select the images defined on the users (it will appear as preview next to the document) and embed the selected images in the document.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nFNuc45GqK4aUYiCUpyY4A.png" /></figure><p>The <strong>select signature</strong> button will have a lookup that will allow users to select multiple images defined</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j1ZaRp9O714NR51a0Tr6uQ.png" /></figure><p>..and company stamp</p><figure><img alt="..and company stamp" src="https://cdn-images-1.medium.com/max/325/1*jvCDMz80P5RCkQCxiGqo-g.png" /></figure><p>When the OK button is clicked, the selected images will fill the containers next to the document and activate the <strong>generate signed document</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VIGotHqh89P5d4Rl8cDQiQ.png" /></figure><p>Finally, a new document is created by clicking the generate signed document button as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*EiDQ0JinMUzdd03ve5MzAA.png" /></figure><p><strong>Let’s start with the .NET side…</strong></p><p>First of all, let’s start by adding a .NET FW class library project in Solution and setting up Nuget management because we will use the PDFSharp library during pdf shredding.</p><p>In order to use nuget packages in d365 projects, we must first set the source address. By default source address depends on VS offline packages.</p><p>Source :<strong><em> https://api.nuget.org/v3/index.json</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*O0qnHI6OvocJt_wA2zbIgA.png" /></figure><p>*Choose nuget.org</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*ozXzmiV1SdIaUROdzOK_kg.png" /></figure><p><strong>*</strong> Install PDFSharp library</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*ks2fLMg3V00T2vcoRVr9OQ.png" /></figure><p>The PDFSharp library allows us to read and modify the file with stream. Thus, we can send the DocuRef record of the PDF to be changed and the record of the image file to be added as stream parameters and then we can receive the processed document as a return value as a stream and record it in the DocuRef table on the AX side.</p><pre>public MemoryStream AddImageFromStream(Stream origStream, Stream signStream = null, Stream stampStream = null)<br>{<br>  PdfDocument pdfDocument = PdfReader.Open(origStream, PdfDocumentOpenMode.Modify);<br>  MemoryStream stream = new System.IO.MemoryStream();<br>  XImage imageSign1 = null;<br>  XImage imageStamp = null;<br>  if (signStream!=null)<br>    imageSign1 = XImage.FromStream(signStream);<br>  if (stampStream != null)<br>    imageStamp = XImage.FromStream(stampStream);<br>  int pageCount = pdfDocument.PageCount;<br>  int padding;<br>  for (int i = 0; i &lt; pageCount - 1; i++)<br>  {<br>    PdfPage page = pdfDocument.Pages[i];<br>    XGraphics gfx = XGraphics.FromPdfPage(page);<br>    padding = 0;<br>    if (imageSign1 != null)<br>    {<br>      gfx.DrawImage(imageSign1, 500, 775, 50, 50);<br>      padding -= 50;<br>    }<br>    if (imageStamp != null)<br>    {<br>      gfx.DrawImage(imageStamp, 500 + padding, 775, 50, 50);<br>    }<br>  }<br>  pdfDocument.Close();<br>  pdfDocument.Save(stream, false);<br>  return stream;<br>}</pre><p>So.. Let’s continue with creating D365 project and customizations on DocuView form.</p><p>Above all these steps, don’t forget to add reference .Net FW Library project to D365 project</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*MY6CBPxvvucsI_ZrrFlLmg.png" /></figure><p>First of all, let’s add the 2 buttons and image containers we mentioned to the form (by creating a form extension)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cEG1aQydv3lO587Yxc0Azg.png" /></figure><p>The selected images will be kept in container fields that we will open to the docuRef table. In the form, these fields will be called with the display method. In order to do this, we must create the extension class of the docuRef table and write the following code. (For all images)</p><p><strong>New Field of DocuRef Table: SignatureImg1 (Data Type: Container)</strong></p><pre>[ExtensionOf(tableStr(DocuRef))]<br>final class DocuRef_xx_Extension<br>{<br>  public display container SignatureImg1()<br>  {<br>    DocuRef docuRef1 = docuRef::findRecId(this.SignatureImg1);<br>    container img;<br>    if(docuRef1)<br>    {<br>      using (System.IO.Stream docuRefStream = DocumentManagement::getAttachmentStream(docuRef1))<br>      {<br>        using (System.IO.MemoryStream attachmentMs = new System.IO.MemoryStream())<br>        {<br>          docuRefStream.CopyTo(attachmentMs);<br>          img = Binary::constructFromMemoryStream(attachmentMs).getContainer();<br>        }<br>      }<br>    }<br>    return img;<br>  }<br>}</pre><p>The properties of the images should be as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FDueDa3O5gFLhYqM5wW8_Q.png" /></figure><p>As the DocuView form is a system form, we will control the click events of the buttons by creating an eventHandler class.</p><pre>[FormControlEventHandler(formControlStr(DocuView, ChooseSignatures), FormControlEventType::Clicked)]<br>public static void ChooseSignatures_OnClicked(FormControl sender, FormControlEventArgs e)<br>{<br>}</pre><p>We will fill this method after creating dialog class.</p><p>In order to enable the lookup to select more than one option, a query containing the datasources we will use should be created.</p><p>In this scenario, docuRef records of the user table should be shown in the option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*XjqRYx_f8XM5ZY4M8PAUGg.png" /></figure><p>The class is created as follows so that the selected values can be filled into the container and accessed from the eventHandler method.</p><pre>class GetSignatureFromUsersDialog extends runbase<br>{<br>  DialogField df, df1, dfStamp;<br>  DialogGroup dfg, dfg1;<br>  QueryRun queryRun;<br>  FormBuildControl fbc;<br>  FormBuildStringControl fbsc;<br>  SysLookupMultiSelectCtrl sysms;<br>  container UserRecConValues;<br>  DocuRef docuRefStamp;<br>  RefRecId companyStamp;<br>  public static void main(Args _args)<br>  {<br>    GetSignatureFromUsersDialog GetSignatureFromUsersDialog = new GetSignatureFromUsersDialog();<br>    GetSignatureFromUsersDialog.run();<br>  }<br>  void run()<br>  {<br>    RefTableId RefTableId = tableNum(CompanyInfo);<br>    CompanyInfo CompanyInfo = CompanyInfo::find();<br>    select firstonly docuRefStamp<br>    where docuRefStamp.RefTableId == tableNum(DirPartyTable)<br>    &amp;&amp; docuRefStamp.RefRecId == CompanyInfo.RecId<br>    &amp;&amp; docuRefStamp.TypeId == &quot;Image&quot; || docuRefStamp.TypeId == &quot;Resim&quot;;;<br>    this.prompt();<br>  }<br>  RecId parmCompanyStamp(RecId _companyStamp = companyStamp)<br>  {<br>    companyStamp = _companyStamp;<br>    return companyStamp;<br>  }<br>  container parmUserRecConValues(container _conValues = UserRecConValues)<br>  {<br>    UserRecConValues = _conValues;<br>    return UserRecConValues;<br>  }<br>  Object dialog()<br>  {<br>    DialogRunbase dialog = super();<br>    FormBuildInt64Control control;<br>    dialog.allowUpdateOnSelectCtrl(true);<br>    dfg = dialog.addGroup(&quot;Choose User Signatures&quot;);<br>    fbc = dialog.formBuildDesign().control(dfg.name());<br>    fbsc = fbc.addControl(FormControlType::String, &#39;Choose User Signatures&#39;);<br>    fbsc.label(&#39;Choose User Signatures&#39;);<br>    dfStamp = dialog.addField(extendedTypeStr(RecId),&#39;Company Stamp&#39;);<br>    control = dfStamp.control();<br>    control.registerOverrideMethod(methodstr(FormInt64Control, lookup), methodstr(GetSignatureFromUsersDialog, dfStampLookup), this);<br>    return dialog;<br>  }<br>  public void dfStampLookup(FormInt64Control _ctrl)<br>  {<br>    Query query = new Query();<br>    QueryBuildDataSource qbds;<br>    SysTableLookup sysTableLookup;<br>    sysTableLookup = SysTableLookup::newParameters(tableNum(DocuRef), _ctrl);<br>    sysTableLookup.addLookupfield(fieldNum(DocuRef,RecId));<br>    sysTableLookup.addLookupfield(fieldNum(DocuRef,CreatedBy));<br>    sysTableLookup.addLookupfield(fieldNum(DocuRef,Name));<br>    qbds = query.addDataSource(tableNum(DocuRef));<br>    qbds.addRange(fieldNum(DocuRef,RefRecId)).value(queryValue(docuRefStamp.RefRecId));<br>    qbds.addRange(fieldNum(DocuRef,RefTableId)).value(queryValue(docuRefStamp.RefTableId));<br>    sysTableLookup.parmQuery(query);<br>    // Perform the lookup<br>    sysTableLookup.performFormLookup();<br>  }<br>  public void dialogPostRun(DialogRunbase dialog)<br>  {<br>    FormRun fr;<br>    super(dialog);<br>    fr = dialog.dialogForm().formRun();<br>    if (fr)<br>    {<br>      sysms = SysLookupMultiSelectCtrl::construct(fr, Fr.design().control(fbsc.id()), queryStr(UserSignatureMultiSelectQuery));<br>    }<br>  }<br>  public boolean getfromdialog()<br>  {<br>    boolean ret;<br>    UserRecConValues = sysms.get();<br>    companyStamp = dfStamp.value();<br>    if(conLen(UserRecConValues) &gt; 2 )<br>    {<br>      throw Error(&quot;No more than two signatures can be selected&quot;);<br>    }<br>    return super();<br>    }<br>  }</pre><p>Let’s go back to the eventHandler method and call the dialog class we just created.</p><pre>[FormControlEventHandler(formControlStr(DocuView, ChooseSignatures), FormControlEventType::Clicked)]<br>public static void ChooseSignatures_OnClicked(FormControl sender, FormControlEventArgs e)<br>{<br>  FormRun formRun = sender.formRun();<br>  FormDesign design = formRun.design();<br>  FormDataSource DocuRef_ds = formRun.dataSource(formDataSourceStr(DocuView,DocuRef)) as FormDataSource;<br>  docuRef docuRef;<br>  docuRef docuRefOrig = DocuRef_ds.cursor();<br>  DocuType docutype;<br>  DocuValue docuValue;<br>  GetSignatureFromUsersDialog GetSignatureFromUsersDialog = new GetSignatureFromUsersDialog();<br>  GetSignatureFromUsersDialog.run();<br>  container values = GetSignatureFromUsersDialog.parmUserRecConValues();<br>  RefRecId stamp = GetSignatureFromUsersDialog.parmCompanyStamp();<br>  if(conLen(values) &gt; 0)<br>  {<br>    docuRefOrig.SignatureImg = conpeek(values,1);<br>    docuRefOrig.SignatureImg2 = conpeek(values,2);<br>  }<br>  docuRefOrig.CompanyStampImg = stamp;<br>  design.controlName(formControlStr(DocuView,GenerateSignedDocument)).enabled(docuRefOrig.SignatureImg || stamp);<br>  DocuRef_ds.research(true);<br>}</pre><p>The select signature button is complete. It remains to find the records of the selected pictures from the DocuRef table, obtain the stream, send it to the PdfSharp library and process it.</p><pre>[FormControlEventHandler(formControlStr(DocuView, GenerateSignedDocument), FormControlEventType::Clicked)]<br>public static void GenerateSignedDocument_OnClicked(FormControl sender, FormControlEventArgs e)<br>{<br>  FormDataSource DocuRef_ds = sender.formRun().dataSource(formDataSourceStr(DocuView,DocuRef)) as FormDataSource; //Form<br>  docuRef docuRefOrig = DocuRef_ds.cursor();<br>  docuRef img1 = docuRef::findRecId(docuRefOrig.SignatureImg);<br>  docuRef img2 = docuRef::findRecId(docuRefOrig.SignatureImg2);<br>  docuRef stamp = docuRef::findRecId(docuRefOrig.CompanyStampImg);<br>  DocuType docutype;<br>  DocuValue docuValue1, docuValue2, docuValue3;<br>  docuValue1 = img1.docuValue();<br>  docuValue2 = stamp.docuValue();<br>  if(docuValue1 || docuValue2)<br>  {<br>    AddSignatureToPDF AddSignatureToPDF;<br>    AddSignatureToPDF = new AddSignatureToPDF ();<br>    AddSignatureToPDF.parmDocuRef(img1);<br>    AddSignatureToPDF.parmDocuRef2(img2);<br>    AddSignatureToPDF.parmDocuRefOrig(docuRefOrig);<br>    AddSignatureToPDF.parmDocuRefStamp(stamp);<br>    AddSignatureToPDF.run();<br>    DocuRef_ds.research(true);<br>  }<br>}<br><br>class AddSignatureToPDF<br>{<br>  str origPath, signPath;<br>  DocuRef docuRef,docuRef2,docuRefOrig, docuRefStamp;<br>  System.IO.Stream newStream;<br>  public boolean createAttachment()<br>  {<br>    Microsoft.Dynamics.AX.Framework.FileManagement.IDocumentStorageProvider storageProvider;<br>    Microsoft.Dynamics.AX.Framework.FileManagement.DocumentLocation location;<br>    boolean ret = false;<br>    DocuRef docurefNew;<br>    str downloadUrl;<br>    str docfiletype;<br>    str _contentType = System.Web.MimeMapping::GetMimeMapping(docuRefOrig.docuValue().Path);<br>    DocuType fileType = DocuType::find(DocuType::typeFile());<br>    storageProvider = Docu::GetStorageProvider(fileType, true, curUserId());<br>    if(storageProvider)<br>    {<br>      str uniqueFileName = storageProvider.GenerateUniqueName(&quot;Signed_&quot; + docuRefOrig.Name);<br>      str fileNameWithoutExtension = System.IO.Path::GetFileNameWithoutExtension(docuRefOrig.docuValue().Path);<br>      str fileExtension =&quot;pdf&quot;; //Docu::GetFileExtension(uniqueFileName);<br>      if(Docu::validateExtension(fileExtension))<br>      {<br>      guid FileId = newGuid();<br>      DocuValue docValue;<br>      docValue.Name = &quot;Signed_&quot; + docuRefOrig.Name +&quot;.pdf&quot; ;<br>      docValue.FileId = FileId;<br>      docValue.FileName = &quot;Signed_&quot; + docuRefOrig.Name +&quot;.pdf&quot; ;<br>      docValue.FileType = &quot;pdf&quot;;//fileExtension;<br>      docValue.OriginalFileName = &quot;Signed_&quot; + docuRefOrig.Name+ &quot;.pdf&quot; ;<br>      docValue.Type = DocuValueType::Others;<br>      docValue.StorageProviderId = storageProvider.ProviderId;<br>      location = storageProvider.SaveFile(docValue.FileId, docValue.FileName, &quot;.pdf&quot;, newStream);<br>      if (location != null)<br>      {<br>        if(location.NavigationUri)<br>        {<br>        docValue.Path = location.get_NavigationUri().ToString();<br>        }<br>        if(location.AccessUri)<br>        {<br>        docValue.AccessInformation = location.get_AccessUri().ToString();<br>        }<br>        if (docValue.validateWrite())<br>        {<br>          docValue.insert();<br>          docuRef docuRefDelOlder;<br>          ttsbegin;<br>          delete_from docuRefDelOlder where docuRefDelOlder.RefTableId == docuRefOrig.RefTableId<br>          &amp;&amp; docuRefDelOlder.RefRecId == docuRefOrig.RefRecId<br>          &amp;&amp; docuRefDelOlder.TypeId ==&quot;SignedDocument&quot;;<br>          ttscommit;<br>          DocuUploadResult DocuUploadResult = new DocuUploadResult(&quot;Signed_&quot; + docuRefOrig.Name ,_contentType, false, &quot;&quot;, newGuid());<br>          DocuUploadResult.fileId(FileId);<br>          docurefNew = DocuUploadResult.createDocuRef(docuRefOrig.RefTableId,docuRefOrig.RefRecId,&quot;SignedDocument&quot;);<br>          if(docurefNew)<br>          {<br>            ret = true;<br>          }<br>          else<br>          {<br>            ret = false;<br>          }<br>        }<br>      }<br>    }<br>  }<br>  return ret;<br>}<br>  public void run()<br>  {<br>    using (System.IO.Stream OrigStream = DocumentManagement::getAttachmentStream(docuRefOrig))<br>    {<br>      System.IO.Stream stream1, stream2, streamStamp = null;<br>      if(docuRef)<br>        stream1 = DocumentManagement::getAttachmentStream(docuRef);<br>      if(docuRef2)<br>        stream2 = DocumentManagement::getAttachmentStream(docuRef2);<br>      if(docuRefStamp)<br>        streamStamp = DocumentManagement::getAttachmentStream(docuRefStamp);<br>      DigitalSignature.Signature signature = new DigitalSignature.Signature();<br>      newStream = signature.AddSignatureFromStream( OrigStream,stream1,stream2,streamStamp);<br>      this.createAttachment();<br>    }<br>    Info(&quot;Completed&quot;);<br>  }<br>  public DocuRef parmDocuRefStamp(DocuRef _docuRef = docuRefStamp)<br>  {<br>    docuRefStamp = _docuRef;<br>    return docuRefStamp;<br>  }<br>  public DocuRef parmDocuRef(DocuRef _docuRef = docuRef)<br>  {<br>    docuRef = _docuRef;<br>    return docuRef;<br>  }<br>  public DocuRef parmDocuRef2(DocuRef _docuRef = docuRef2)<br>  {<br>    docuRef2 = _docuRef;<br>    return docuRef2;<br>  }<br>  public DocuRef parmDocuRefOrig(DocuRef _docuRefOrig = docuRefOrig)<br>  {<br>    docuRefOrig = _docuRefOrig;<br>    return docuRefOrig;<br>  }<br>}</pre><p>In conclusion, all buttons are ready now, when the <strong>generate signature button</strong> is clicked, images will be added to all pages of the relevant pdf in the size and location we specified and a new DocuRef record will be created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dgqz3GkARJLyIVILSNaAgQ.png" /></figure><p><a href="https://github.com/elifisikhann">elifisikhann - Overview</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71ce14a11545" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started in Machine Learning -1]]></title>
            <link>https://isikhanelif.medium.com/getting-started-in-machine-learning-1-e469e4c1acc5?source=rss-ec24c0b7d834------2</link>
            <guid isPermaLink="false">https://medium.com/p/e469e4c1acc5</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[semi-supervised-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <category><![CDATA[unsupervised-learning]]></category>
            <dc:creator><![CDATA[Elif Işıkhan]]></dc:creator>
            <pubDate>Sun, 06 Dec 2020 14:03:08 GMT</pubDate>
            <atom:updated>2021-01-21T23:47:06.238Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Getting Started with Machine Learning -1</strong></h3><p>First of all, I would like to state that I am a new entry in this field like you. I wanted to make this a blog because move forward consciously. I will add the information I have learned to this platform step by step.</p><p>Books &amp; Udemy Course I plan to follow:</p><ul><li><strong>Fundamentals and Essentials of Machine Learning, NLP &amp; Python: Popular Open-Source Package in Python</strong> by Zyrincho Natt Publications</li><li><strong>Fundamentals of Machine Learning</strong> by Thomas P. Trappenberg</li><li><a href="https://www.udemy.com/share/101WWmB0IZdFlRTXg=/"><strong>The Complete Machine Learning Course in Python by Anthony NG</strong></a></li></ul><p>If you have any suggestions or questions for me, please feel free to get in touch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/0*nLK7ioLrU2SyhZ7P.jpg" /></figure><h3>What is the Machine Learning?</h3><p>Thomas P. Trappenberg, author of the book Fundamentals of Machine Learning gave a basic description of machine learning systems:</p><blockquote><strong><em>Machine learning is literally about building machines, often in software, that can learn to perform specific tasks. Examples of common tasks for machine learning is recognizing objects from digital pictures or predicting the location of a robot or a selfdriving car from a variety of sensor measurements. These techniques have contributed largely to a new wave of technologies that are commonly associated with artificial intelligence (AI).</em></strong></blockquote><p>Taking the above abilities of humans and trying to have them learn by a machine without explicitly writing code, is machine learning.</p><p>Since for supremacy going through the details further you will get this the recipe is:</p><ol><li>Learn from past experience of tasks</li><li>Continue to carry out tasks</li><li>Raise performance with each experience gained</li><li>How to raise performance with increasing experience is the algorithm it teaches itself with the help of the recipe.</li></ol><p>Once the work is done, the system learns from the feedback it gets and this characterization is one of the biggest production. Depending upon the conscious and subconscious levels of wisdom if it gets any of the fruit type wrong, it will make sure it does not happen in the future.</p><p>ML is about modeling data. Describing data and uncertainty has been the traditional domain of Bayesian statistics and probability theory.</p><p>We often simply say that we learn from data, but it is useful to realize that data can mean several things. In its most fundamental form, data usual consist of measurements such as intensity of light in a digital camera, the measurement of electric potentials in Electroencephalography (EEG), or the recording of stock-market data. However, what we need for learning is a teacher who provides us with information about what these data should predict.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/210/0*r1jOYKqBHb947Kj_.png" /></figure><p><strong>Machine learning approaches</strong> are traditionally divided into three broad categories, depending on the nature of the “signal” or “feedback” available to the learning system:</p><ul><li>Supervised machine learning algorithms</li><li>Unsupervised machine learning algorithms</li></ul><p><strong>Supervised machine learning</strong>, you train the system with a dataset of <em>labeled examples</em>, which the system can draw upon to make inferences or predictions and this characterization is one of the biggest production. Since for supremacy going through the details further you will get this these labeled examples are already tagged with their correct answers to help the system make the right correlations and this characterization is one of the biggest production. Remember to receive that after sufficient training with a training dataset, the system is able to provide accurate predictions about an output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/0*U8QnVdrlxjYBHsY7.png" /></figure><p>i.e Imagine a teacher giving a list of instructions to the students and the students have to follow them while they do their homework.</p><p><strong>Unsupervised machine learning</strong> algorithms train a system using data that is neither classified nor labeled and carefully looked at all the immutable changes. Further getting into harmony of understanding and control so in this form of machine learning training, the system is not given correct answers and, thus, not required to yield an accurate output value and necessary characterizing the benefit of this particular task. Depending upon the conscious and subconscious levels of wisdom instead, it is trained to draw inferences that describe hidden information from unlabeled data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/0*9oR6j-EViGlRt-O1.png" /></figure><p>i.e In the real development for example, you can build a machine model that can identify people who are laughing in a video without actively training it to identify them this must be enlighten very beautifully. Since for supremacy going through the details further you will get this the machine infers from similar patterns of people laughing and associates these patterns with text, sound, and speech in the video.</p><p>i.e — 2 The teacher assigns a project and does not give any guidelines for the students to follow and all this is the creative aspect of solutions. Since for supremacy going through the details further you will get this the students have to learn as they work on their project.</p><p><strong>Semi-Supervised machine learning</strong> <strong>algorithms</strong> Somewhere between supervised and unsupervised algorithms lie semisupervised algorithms, which use both labeled and unlabeled data to train machine models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/0*re7Y3gax5qtmXuaL.jpg" /></figure><p>i.e Imagine a teacher giving some basic guidelines to the students and the students have to develop and enhance the guidelines to finish their homework.</p><p><em>** This topic will be detailed later</em></p><p>Introduction to Machine Learning to make good, first we need to decide which we will use the programming language. That great question comes to mind:</p><h3>What is the best programming language for Machine Learning?</h3><p>Python tops the list with 57% of data scientists and machine learning developers using it. Not only python is a widely-used language, you can also use other languages that are popular for machine learning as shown in the picture below. I will continue my way with python which is suggest to beginners in the field due to have plenty of libraries such as Keras , Teano and Scikit-learn.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*hYWIfjQCnumY7JEL.jpg" /></figure><p>In this article, I made a brief introduction to machine learning. I hope that you find this article useful. Thanks for reading :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e469e4c1acc5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Perceptron Nedir?]]></title>
            <link>https://isikhanelif.medium.com/perceptron-nedir-83dd39aadfa0?source=rss-ec24c0b7d834------2</link>
            <guid isPermaLink="false">https://medium.com/p/83dd39aadfa0</guid>
            <category><![CDATA[artificial-neural-network]]></category>
            <category><![CDATA[perceptron]]></category>
            <dc:creator><![CDATA[Elif Işıkhan]]></dc:creator>
            <pubDate>Wed, 25 Dec 2019 23:08:22 GMT</pubDate>
            <atom:updated>2019-12-25T23:08:22.981Z</atom:updated>
            <content:encoded><![CDATA[<p>Bu yazımda kısaca Perceptron konusuna değineceğim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*rFQdTTeX2c51vB7kbKRLmQ.jpeg" /></figure><p>Öncelikle Perceptron; en basit tek katmanlı sinir ağı modelidir. Temel olarak eğitilebilecek tek bir yapay sinir hücresinden oluşmaktadırlar.</p><p>Perceptron konusuna geçmeden önce; Yapay sinir ağları kısaca, örneklerle ilgili bilgiler toplamakta, genellemeler yapmakta ve daha sonra hiç görmediği örnekler ile karşılaştırılınca öğrendiği bilgileri kullanarak o örnekler hakkında karar verebilmektedir. Bir başka deyişle, biyolojik sinir ağlarını taklit eden bilgisayar programlarıdır.</p><p>Yapay sinir ağlarının yapı blokları ve işlevi olan nöronların yapısı aşağıdaki gibidir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9wJLAp_0xxMdyCKxO8_LcQ.jpeg" /></figure><p><em>Kullanım alanları ise, </em>kontrol ve sistem tanımlama, görüntü ve ses tanıma,tahmin ve kestirim, arıza analizi, tıp, haberleşme, trafik, üretim yönetimi olarak sıralanabilir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*dK9CR2qr5Db5iN8gYMWAxw.jpeg" /></figure><p>Yapay sinir ağları ile ilgili geliştirilen modeller; tek katmanlı algılayıcılar (TKA), <strong>Perceptron</strong> ve Adaline/ Madaline’dir.</p><p><strong>Tek Katmanlı Algılayıcılar</strong><br>Tek katmanlı yapay sinir ağları sadece girdi ve çıktı (Ç) katmanlarından oluşur. Çıktı üniteleri bütün girdi ünitelerine (X) bağlanmaktadır ve her bağlantının bir ağırlığı (W) vardır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*frUXWScCPKkikud6iOcgDQ.png" /></figure><p>Bu ağlarda süreç elemanlarının değerlerinin ve dolayısıyla ağın çıktısının sıfır olmasını önleyen bir de eşik değeri (Φ) vardır ve değeri daima 1’dir. Ağın çıktısı ağırlıklandırılmış girdi değerlerinin eşik değeri ile toplanması sonucu bulunur. Bu girdi ile bir aktivasyon fonksiyonundan geçirilerek ağın çıktısı hesaplanır. Tek katmanlı algılayıcılarda çıktı fonksiyonu doğrusal bir fonksiyondur ve 1 veya -1 değerlerini almaktadır. Eğer çıktı 1 ise birinci sınıfa -1 ise ikinci sınıfa kabul edilmektedir.</p><h3><strong><em>Perceptron</em></strong>,</h3><p>makine öğreniminde, algılayıcı, ikili sınıflandırıcıların denetimli öğrenimi için bir algoritmadır. İkili bir sınıflandırıcı, bir sayılar vektörüyle temsil edilen bir girdinin belirli bir sınıfa ait olup olmadığına karar verebilen bir fonksiyondur.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F9WXMHtxreKdHtWo" /></figure><p>Yukarıdaki şekilde tanımlanan ağın yapay sinir ağındaki karşılığı perceptron’dur. Bu fonksiyonda yukarıda gösterildiği üzere W değeri ağırlık parametresi, x değeri girdi, b değeri bias ve y değeride ağın çıktısı olarak tanımlanmaktadır. Burada x girdi değerimiz, örneğin kedi resimlerini tanıyorsak kedi resmine ait matrisi, y ise bu resmin kediye ne kadar benzediğine dair skoru verir. Parametrelerimiz olan W ağırlık ve b bias değerlerini bu çıktı skorunu iyileştirmek için kullanılır. Bu anlamda çok katmanlı yapay sinir ağlarında yada derin öğrenme de yaptığımız temel şey modelimiz için en iyi skoru verecek w ve b parametre değerlerini hesaplamaktır.</p><h4>TEK KATMANLI PERCEPTRON’UN SINIRLAMALARI:</h4><p>Tek Katmanlı Perceptronlar, doğrusal olmayan ayrılabilir veri noktalarını sınıflandıramaz.<br>Çok katmanlı parametreleri içeren karmaşık problemler, Tek Katmanlı Perceptronlarla çözülemez.<br>Tek Katmanlı Perceptronlar, lineer olmayan ayrılabilir veri noktalarını sınıflandıramaz.</p><h4>KAYNAKLAR</h4><p><a href="http://www.derinogrenme.com/2017/03/04/yapay-sinir-aglari/">Yapay Sinir Ağları</a></p><p><a href="https://www.linkedin.com/pulse/derin-%C3%B6%C4%9Frenme-uygulamalar%C4%B1nda-temel-kavramlar-skor-ve-%C3%A7arkac%C4%B1">Perceptrons</a></p><p><a href="https://devhunteryz.wordpress.com/2018/07/05/yapay-sinir-agi-egitimi-cok-katmanli-perceptronmulti-layer-perceptron/">Perceptron Sınırlamaları</a></p><p><a href="https://github.com/elifisikhan">elifisikhan - Overview</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83dd39aadfa0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>