Showing posts with label AI_Assisted. Show all posts
Showing posts with label AI_Assisted. Show all posts

November 20, 2026

Financial Dimension OR Financial Tag, and Why?

Hello, 

Ever since financial tags were introduced, you have probably heard a requirement like this:

“We need to capture one more piece of information on the transaction. Can we add another financial dimension?”

Technically, the answer might be yes. But architecturally, there is a better question:

Does this information really need to be a financial dimension, or should it be a Financial Tag?

With Microsoft's continued investment in Financial Tags, including support across more transactions and additional validation options, this is a design decision worth revisiting.


Here's the practical way I look at it.  Start with the purpose, not the technology. A financial dimension should generally represent part of your organization's financial classification.

Think:

  • Cost Center
  • Department
  • Business Unit
  • Project

Dimensions participate in the financial dimension framework and account structures. Account structures can determine which dimensions are required and which combinations of dimension values are valid for particular main accounts.

While a Financial Tag, on the other hand, is useful when you want additional information attached to the accounting entry without making that information part of your formal ledger account structure.

Think:

  • Payment Reference
  • External System Reference
  • Invoice Reference
  • Purchase Order Reference
  • Serial Number
  • Other transaction-specific identifiers

Microsoft specifically identifies information such as document numbers, payment references and external transaction references as scenarios for Financial Tags.

So now think of question like: Does this value describe how I account for the transaction, or does it provide additional context about the transaction?

If it describes the accounting classification, think Dimension. AND If it provides additional context, think Tag.

A practical example can be, Suppose the business asks to capture these values against an expense transaction:

Requirement

My starting choice

Why

Cost Center

Dimension

Part of financial classification/reporting

Department

Dimension

Part of organizational financial reporting

Business Unit

Dimension

Likely to influence reporting and accounting structure

Payment Reference

Tag

Transaction-specific reference

External System ID

Tag

Useful for tracing/reconciliation, not financial classification

Invoice Reference

Tag

Additional transaction context

 This distinction sounds simple, but it can have a significant impact on solution design.

Financial dimensions are structured. They can participate in account structures, validity rules, required dimension rules and defaulting. Financial Tags aren't part of the account structure.

That is precisely why not every reporting attribute should automatically become a financial dimension. 

So, next time the requirement is “Can we add another financial dimension?”, don't start with the configuration. Start with the purpose.

If the value tells us how to financially classify the transaction, think Dimension. If it tells us something more about the transaction, think Tag.

It is a small design decision, but making it early can keep the financial structure cleaner, reduce unnecessary complexity, and ensure we use the right Dynamics 365 Finance capability for the right purpose.


-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

June 30, 2026

Friend Packages in D365FO

Hi Folks,

In this post let’s learn about Friend packages in D365FO, which are part of the development model and are configured via Visual Studio. 

A friend package allows one model/package to access internal members (classes/methods) of another package. Normally, only public elements are accessible across models, but this feature extends controlled visibility. They should be used carefully as part of a well-governed architecture strategy.

 This feature allows controlled access between models/packages, specifically enabling access to internal elements without exposing them as public APIs. 

For instance, A core framework model contains internal helper classes for integration. Instead of making them public, you declare integration models as friend packages so they can reuse internal logic safely

Without Friend Package: - Only public elements are accessible 

With Friend Package: - Both public and internal elements are accessible (controlled) 

Why Use Friend Packages?

•       Maintain proper encapsulation

•       Avoid making everything public

•       Enable controlled reuse of logic

•       Improve architectural cleanliness

How to Configure

•       Open Visual Studio

•       Navigate to Extension menu →  Dynamics 365 → Model Management → Update model parameters

•       Select model

•       Proceed to ‘Select friend packages’ step

•       Add required package

•       Finish and rebuild

Benefits

•       Better encapsulation

•       Controlled reuse

•       Cleaner architecture

•       Reduced duplication

Limitations

•       Not a replacement for APIs

•       Can introduce tight coupling if misused

•       Requires governance


-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

January 26, 2026

Practical Ways to Use GitHub Copilot for X++ Development (Tips, Tricks, Hidden Gems & What to Avoid)

Hi Folks, 

In my last post about GitHub Copilot we covered what GitHub Copilot is, how to enable it, and the licensing options, let’s move into the part everyone actually cares about — Practical Ways to Use GitHub Copilot for X++ Development

Copilot isn’t magic, but when used well, it feels pretty close. Below are practical examples, prompt ideas, best practices, and a few “don’ts” that will save you time and frustration.

1. X++ Boilerplate Generation (Your New Time Saver)

X++ is full of repetitive patterns — table methods, service classes, form event handlers, data entities, and more. Copilot can generate 60–80% of this instantly.

Try prompts like:

  • “Create a validateWrite method for this table following best practices.”
  • “Generate a runnable class that updates sales orders with status ‘Open’.”
  • “Create a SysOperation framework class with contract, controller, and service.”

You still review and refine — but the heavy lifting is done. (I would still recommend this to do every single time)

2. Documentation & XML Comments (The Most Underrated Feature)

Copilot is brilliant at generating XML documentation for methods, classes, and services.

Prompt idea:

  • “Add XML documentation to this method explaining parameters and return values.”

Why it matters

  • Better readability
  • Faster onboarding for new developers
  • Cleaner code reviews

3. OData & Integration Summaries

When working with integrations, Copilot can help you quickly draft:

  • OData endpoint descriptions
  • Request/response examples
  • Error-handling notes
  • API documentation

Prompt idea:

  • “Explain how this data entity will behave when called via OData.”

This is especially useful when writing technical design documents.

4. Best Practice Suggestions on Selected Code

This is where Copilot becomes a mini code reviewer.

Highlight a block of X++ code → open Inline Chat (Alt + /) → ask:

  • “Suggest best practices for this code.”
  • “Is there any performance issue here?”
  • “Rewrite this using recommended patterns.”

Example: Summarize Sales Order

Your example:

public void summarizeSalesOrder(str salesOrderId)

{

    SalesTable salesTable = SalesTable::find(salesOrderId);

    info(strFmt("Sales Order %1 for customer %2 has total amount %3",

        salesTable.SalesId, salesTable.CustAccount, salesTable.TotalAmount));

}

Copilot might suggest:

  • Add null checks
  • Use ttsbegin/ttscommit if modifying data
  • Avoid info() in production code
  • Consider using SalesTotals class for accurate totals

This is where Copilot shines — it nudges you toward better patterns.

5. Plugin Development with Copilot Studio

If you’re building Copilot plugins for D365FO, Copilot can help with:

  • API schema generation
  • JSON payload examples
  • C# wrapper classes
  • Error-handling templates

This is still evolving, but it’s already a huge productivity boost.

6. Hidden Gems Most Developers Miss

  •       Use #filename to give Copilot context

Example:

#SalesTable Explain how validateWrite works for this table.

  • ü      Use /intent to guide Copilot

Example:

/refactor Rewrite this method to improve readability.

  • ü  Keep related files open

Copilot reads open tabs to understand your project structure.

  • ü  Use natural language

You don’t need to be formal.
“Make this faster” works surprisingly well.

7. What NOT to Do with Copilot (Important!)

Copilot is powerful, but not perfect. Avoid:

❌ Blindly accepting code

Always review for:

  • Security issues
  • Performance problems
  • Deprecated APIs

❌ Using Copilot for business logic decisions

Copilot doesn’t know your customer’s requirements.

❌ Expecting Copilot to understand custom frameworks

It learns from your codebase over time — but not instantly.

❌ Using vague prompts

“Fix this” → not helpful
“Optimize this query to reduce DB calls” → much better

While all this working magically, GitHub Copilot won’t replace your X++ expertise — but it will absolutely amplify it. So don't afraid of using it, make this your companion. The more you use it, the better it understands your patterns, naming conventions, and coding style.


-Harry 
 Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta