Dynamic Expense Entry Submission with Receipt Attachments in Power Apps: A Practical Implementation for a Texas-Based Operational Technology Security Organization
Blogger CloudFrontsbloggerEdit Profile
Summary
Expense management processes in enterprise project environments often require strict documentation controls to ensure financial accuracy and compliance. One common requirement is the mandatory attachment of receipts when submitting expense entries, especially for specific expense categories such as airfare, accommodation, or high-value reimbursements.
My blog describes how a project-driven organization streamlined its expense submission workflow using Canvas Apps integrated with Dynamics 365 Project Operations.
The solution I had implemented automates the validation and submission process for expense entries while ensuring that receipt files are attached before submission. By combining form validation logic in the Canvas App with backend automation using Power Automate, the organization eliminated the manual process of attaching receipts and creating notes in the system.
The result was a seamless, user-friendly expense submission experience that enforces compliance while significantly improving operational efficiency.
Table of Contents
- 1. Customer Scenario
- 2. Solution Overview
- 3. Understanding the Expense Data Structure
- 4. Canvas App Validation Logic
- 5. Expense Creation and Submission Process
- 6. Automating Receipt Handling with Power Automate
- 7. Enforcing Mandatory Receipts for Specific Categories
- 8. Business Impact
- 9. Solution Walkthrough
- 10. Final Thoughts
1. Customer Scenario
A Texas based Cyber Security organization managing multiple client engagements relied on Dynamics 365 Project Operations to track project expenses incurred by consultants and field staff.
While the system allowed users to create draft expense entries, the process of submitting those expenses required additional manual steps.
To submit an expense, users had to:
- Create the expense entry in draft mode.
- Upload the supporting receipt manually.
- Navigate to the expense record.
- Create an associated Expense Receipt record.
- Attach the receipt file under Notes (Annotations).
- Convert the file into the required document format stored in the system.
- Update the expense status to Submitted.
This workflow introduced several challenges:
- Users frequently forgot to attach receipts.
- Manual creation of Notes records was error-prone.
- Finance teams had to follow up for missing documentation.
- Expense approvals were delayed due to incomplete submissions.
- Employees found the process unnecessarily complex.
The organization needed a simpler, controlled way to ensure receipts were always attached when expenses were submitted, without requiring users to understand the underlying system structure.
2. Solution Overview
To address these challenges, a custom expense submission experience was built using Canvas Apps integrated working in conjunction with D365 Project Operations.
The solution introduced a dynamic expense entry submission interface where users can:
- Create expense entries
- Upload receipt files
- Submit expenses directly from the app
Figure: Canvas App interface enabling dynamic expense entry submission with receipt attachment.
Figure: Canvas App interface enabling dynamic expense entry submission with receipt attachment.
Behind the scenes, the application automatically:
- Creates the expense entry in Dataverse
- Generates the related Expense Receipt record
- Uploads the receipt file to Notes (Annotations) as a document
- Updates the expense status to Submitted
Figure: A Submitted Expense Entry Record.
Figure: The Expense Receipt Record + Receipt PDF Annotation associated with the Expense, without which Submission won’t have been possible.
This automation completely overrides the manual procedure of attaching receipts and creating notes, ensuring the process is both compliant and seamless for users.
3. Understanding the Expense Data Structure
Within Dynamics 365 Project Operations, expense documentation follows a structured relationship model.
The hierarchy looks like this:
Expense ↓ Expense Receipt ↓ Notes (Annotation) ↓ Blob/Base64 File Storage of Expense Receipt.
Figure: Implementation of the Expense Entry -> Expense Receipt -> Annotation -> Receipt File Workflow.
In this structure:
- The Expense record stores the financial transaction.
- The Expense Receipt record acts as a container for receipt documentation.
- The Notes (Annotation) entity stores the actual file.
- The receipt file is stored as Base64 binary data (blob).
While this structure is technically sound, it requires multiple manual steps when performed directly by users.
The custom Canvas App abstracts this complexity and handles it automatically.
4. Canvas App Validation Logic
To ensure all required data is captured before submission, the Canvas App includes dynamic validation logic.
The application checks whether essential fields are populated before allowing the expense to be saved or submitted.
These validations include fields such as:
- Transaction Date
- Project
- Expense Category
- Reimbursable Indicator
- External Comments
- Unit
- Quantity
- Unit Price
If any required field is missing, the user receives an immediate notification explaining what needs to be completed.
Example logic used in the application:
If(
Or(
IsBlank(DatePicker2_5.SelectedDate),
IsBlank(Project_Combobox_5.Selected),
IsBlank(ExpenseCategory_Combobox.Selected),
IsBlank(Dropdown1.Selected.Value),
IsBlank(External_Input_7.Text),
IsBlank(Project_Combobox_6.Selected),
IsBlank(NumberInput2.Value),
IsBlank(NumberInput2_1.Value)
),
Notify("Required fields are missing.", NotificationType.Error)
)
This validation ensures data completeness before the expense record is created.
5. Expense Creation and Submission Process
Once validation passes, the Canvas App uses a Dataverse Patch operation to create or update the expense record.
The logic dynamically calculates financial values such as the subtotal based on quantity and unit price.
Example logic:
Set(
varSavedExpense,
Patch(
Expenses,
Defaults(Expenses),
{
'Transaction Date': DatePicker.SelectedDate,
Project: Project_Combobox.Selected,
'Expense Category': ExpenseCategory_Combobox.Selected,
Quantity: Value(NumberInputQuantity.Value),
'Unit Price': Value(NumberInputPrice.Value),
Subtotal:
Value(NumberInputQuantity.Value) *
Value(NumberInputPrice.Value)
}
)
);
'SubmitExpense(CanvasApp)'.Run(
varSavedExpense.Expense,
First(fileupload.Attachments).Name,
First(fileupload.Attachments).Value
);
Notify(
"Expense submitted successfully.",
NotificationType.Success
)
This creates the draft expense entry in the system.
6. Automating Receipt Handling with Power Automate
After the expense entry is saved, the Canvas App triggers a Power Automate flow.
The flow receives:
- Expense record ID
- File name
- Receipt file content
The flow then performs the following steps automatically.
Step 1: Create Expense Receipt Record
A new Expense Receipt record is created and linked to the expense entry.
Step 2: Upload Receipt as Note
The receipt file is stored as a Note (Annotation) associated with the expense receipt.
This note contains:
- File Name
- Document Type
- Base64 encoded file content
- MIME type
Step 3: Update Expense Status
Finally, the expense record status is updated from Draft to Submitted.
This ensures the expense becomes available for approval workflows and financial processing.
7. Enforcing Mandatory Receipts for Specific Categories
An important requirement D365 PO is ensuring that certain expense categories cannot be submitted without receipts.
Examples include:
- Airline tickets
- Travel expenses
- Accommodation
- High-value reimbursements
The Canvas App logic ensures that a receipt file must be attached before submission is triggered.
If the file upload control does not contain an attachment, the submission process is blocked and the user is notified.
This enforcement guarantees that the finance team always receives complete documentation for compliance and auditing purposes.
8. Business Impact
1] Simplified User Experience
Employees can now create and submit expenses from a single interface, without navigating complex system structures.
2] Automatic Receipt Management
The system automatically:
- Creates receipt records
- Generates notes
- Uploads documents
- Links files to the correct records
Users no longer need to understand how attachments are stored in the backend.
3] Compliance Enforcement
Mandatory receipt rules ensure that required documentation is always included for critical expense categories.
This reduces approval delays and improves financial transparency.
4] Elimination of Manual Processes
The solution completely removes the manual procedure of attaching receipts and creating notes on expense records.
All document handling is automated through the integrated workflow.
5] Faster Expense Processing
By reducing manual steps and ensuring complete submissions, finance teams can process expenses more quickly and with greater confidence in the supporting documentation.
9. Solution Walkthrough
To better illustrate how the solution works in practice, the following demonstration shows the Canvas App interface used to create and submit expense entries with receipts.
The video highlights how users can:
- Enter expense details through a simplified interface
- Upload receipt documents directly during submission
- Trigger backend automation that creates receipt records and notes
- Automatically update the expense status for processing
This implementation ensures that expense entries are submitted with the required documentation in a single streamlined workflow, eliminating the need for manual attachment of receipts or manual note creation within the system.
Video: Demonstration of dynamic expense entry submission and automated receipt handling in the Canvas App.
10. Final Thoughts
Expense management systems must balance ease of use for employees with strict compliance requirements for financial teams.
By combining Canvas Apps, Dynamics 365 Project Operations, and Power Automate, this solution transformed a complex manual process into a streamlined digital experience.
Users now submit expenses with receipts in a single guided workflow, while the system automatically manages the underlying data relationships and document storage.
The result is a more efficient, compliant, and scalable expense submission process that supports both operational productivity and financial governance.
If your Dynamics 365 Project Operations environment requires smarter automation for expense management, receipts, or document-driven workflows, reach out to CloudFronts at transform@cloudfronts.com. Our specialists build scalable Power Platform and Dynamics 365 solutions that reduce manual effort, improve compliance, and accelerate financial processes.
Shashank Keny
Associate Consultant · CloudFronts
Shashank Keny is an Associate Consultant at CloudFronts with 1.5+ years of experience in cloud, data, and business applications. He specializes in building scalable, API-driven architectures and integrating enterprise systems across the Microsoft ecosystem.
He is a Certified Databricks Data Engineer with hands-on experience in Dynamics 365 Project Operations and Dynamics 365 Sales, along with delivering business intelligence solutions using Power BI.
His expertise also extends to modern AI solutions, including building custom copilots and implementing intelligent applications using Azure AI Foundry.
Passionate about solving real-world business challenges through data and AI, he focuses on delivering efficient, scalable, and production-ready solutions.
- Experience: 1.5+ years
- Certification: Databricks Certified Data Engineer
- Specialization: Dynamics 365 Project Operations, Power BI, Azure Integrations, AI Solutions
