Batch parallelism/multithreading in Dynamics 365 FO
Tuesday, December 19, 2023
Monday, December 18, 2023
Friday, December 15, 2023
How to pass Arguments/records in RDP Report through form or how to open report from the Form using controller class X++ in Dynamics 365 FO
Pass arguments in RDP Report through form in D365 FO on Dynamicscommunity101
Selection changed and active method in Dynamics 365 FO
1. Selection Changed Method:
- This method is triggered when the selection of a record in a grid or a form changes.
- It is commonly used to handle scenarios where actions need to be taken based on the user's selection of a record. For example, enabling or disabling buttons, displaying additional details of the selected record in another form part, or refreshing data based on the new selection.
- The Selection Changed method is associated with the form's data source and is typically overridden in the form's data source class.
2. Active Method:
- The Active method is called whenever a record in a form is activated or when the focus is set on a record.
- It's used to perform actions every time a record becomes active, which might not necessarily be due to a change in selection. For example, it can be used to display additional details of the record or to execute some logic related to the active record.
- This method is also associated with the form's data source and can be overridden to provide custom logic whenever a record becomes active in the form.
In essence, while the "Selection Changed" method is specifically about the change in the selection of records, the "Active" method is more about a record gaining focus or becoming the currently active record, regardless of whether it was selected previously or not. Both are important in managing the behavior and interaction of forms in Dynamics 365 F&O.
Dynamics 365 FO code to generate access token and parse the JSON response using contract class to get the access token
1. Class LSGenerateToken :
using System.Net.Http;
using System.Text;
internal final class LSGenerateToken
{
public static void main(Args _args)
{
str responseJson;
HttpClient httpClient = new HttpClient();
str requestUrl = 'https://login.microsoftonline.com/TENANTID/oauth2/token';
str body = strFmt("grant_type=client_credentials&client_id=%1&client_secret=%2",
'XXXXXXXXXXXXXXXXX','YYYYYYYYYYYYYYYYYYYYY');
// Send the request and get the response
HttpResponseMessage response = httpClient.PostAsync(requestUrl, new StringContent(body, Encoding::UTF8, "application/x-www-form-urlencoded")).Result;
str responseBodyStr;
if (response.IsSuccessStatusCode)
{
// Parse the response body
var responseBody = response.Content.ReadAsStringAsync().Result;
responseBodyStr = responseBody;
}
else
{
// Handle error
throw error(strFmt("Failed to get access token. Status code: %1", response.StatusCode));
}
LSAccessTokenContract _Contract = FormJsonSerializer::deserializeObject(classNum(LSAccessTokenContract), responseBodyStr);
info(strfmt("Access token = %1",_Contract.parmaccess_token()));
}
}
2. LSAccessTokenContract :
[DataContract]
class LSAccessTokenContract
{
str token_type;
str expires_in;
str ext_expires_in;
str expires_on;
str not_before;
str resource;
str access_token;
[DataMember("token_type")]
public str parmtoken_type(str _token_type = token_type)
{
token_type = _token_type;
return token_type;
}
[DataMember("expires_in")]
public str parmexpires_in(str _expires_in = expires_in)
{
expires_in = _expires_in;
return expires_in;
}
[DataMember("ext_expires_in")]
public str parmext_expires_in(str _ext_expires_in = ext_expires_in)
{
ext_expires_in = _ext_expires_in;
return ext_expires_in;
}
[DataMember("expires_on")]
public str parmexpires_on(str _expires_on = expires_on)
{
expires_on = _expires_on;
return expires_on;
}
[DataMember("not_before")]
public str parmnot_before(str _not_before = not_before)
{
not_before = _not_before;
return not_before;
}
[DataMember("resource")]
public str parmresource(str _resource = resource)
{
resource = _resource;
return resource;
}
[DataMember("access_token")]
public str parmaccess_token(str _access_token = access_token)
{
access_token = _access_token;
return access_token;
}
}
Thursday, December 14, 2023
Mastering Transaction Control in Dynamics 365 FO Understanding ttsBegin ttsCommit and ttsAbort
Thursday, December 7, 2023
Relationship type property while creating relation in Dynamics 365 FO
In Dynamics 365 Finance and Operations (F&O), the following are the types of relationships between entities:
Association: An association is a relationship between two or more entities where they are linked together based on some common attribute or characteristic. For example, When a customer places an order, there is an association between the customer entity and the order entity, linked by a unique customer ID.
Composition: Composition is a type of association where the entities are dependent on each other, and the child entity cannot exist without the parent entity. For example, A customer profile may be composed of multiple sub-entities like billing addresses, shipping addresses, and payment methods. These sub-entities cannot exist without the customer profile.
Link: A link is a type of association that defines a connection between two entities but does not imply any dependency or ownership. For example, The customer entity could be linked to a loyalty program entity, indicating that this customer is a part of a specific loyalty program but not dependent on it.
Specialization: Specialization is a relationship between entities where one entity is a more specific version of another entity. For example, Customers can be specialized into different types such as "retail customer," "wholesale customer," or "online customer."
Aggregation: Aggregation is a relationship between entities where one entity is composed of or made up of other entities. For example, A household may aggregate multiple individual customer accounts under one umbrella, like a family account.
If you've made it this far, please leave a kind word. Your encouragement fuels my desire to produce and share even more valuable content.
Wednesday, December 6, 2023
Maps and MapEnumerator in Dynamics 365 FO
Saturday, November 18, 2023
Different Tier in D365
Difference between Tier 1 and Tier 2 environment Dynamics 365 FO
Tier-1 Environment:
Single-box environment
All components are installed on the same server. These components include the Application Object Server (AOS), the database, Dynamics 365 Commerce, and the Management Reporter.
Microsoft SQL Server is used.
The architecture differs from the architecture of the production environment to maximize the efficiency and cost of the development team.
The environment can be cloud-hosted, or it can be deployed as an environment image (VHD).
The environment isn't suitable for UAT or performance testing.
Tier-2 Environment:
Multi-box environment
Components are installed on multiple servers.
Azure SQL Database is used.
The architecture is the same as the architecture of the production environment, even though this type of environment has a different sizing and isn't enabled for disaster recovery.
The environment can be deployed only as a standard environment or an add-on environment. It can't be cloud-hosted.
The environment is suitable for UAT and performance testing.
Microsoft Reference:
Change tracking in Data Entities - DMF in Dynamics 365 FO
Wednesday, November 15, 2023
Terminology used in PPAC as compared to LCS
Exploring the unified vision of Microsoft's One Dynamics One Platform with a focus on LCS and PPAC terminologies in Dynamics 365 F&O.
If you've made it this far, please leave a kind word. Your encouragement fuels my desire to produce and share even more valuable content.
Monday, November 13, 2023
Difference between Owner and contributor in azure role
Friday, November 10, 2023
How to enable notifications for each and every check-in in Azure DevOps ADO
Go to Azure DevOps: ADO
Go to the project setting
Now go to notifications
Now click on the new subscription
a new pop-up will come, now click on Code(TFVC), select code is checked in
click next
In the Deliver To select Custom email address
now in the address field, enter your email id
now in the filter criteria, field select server item
now in the operator select Under
now in value select your Repos path
TaDa !!!
If you've made it this far, please leave a kind word. Your encouragement fuels my desire to produce and share even more valuable content.
Wednesday, November 8, 2023
LCS Service request support issue is getting replaced by Power platform admin center help and support
Difference between "Subscription" and "Premier" support plans in Microsoft Dynamics Lifecycle Services (LCS), support issues
In the context of Microsoft Dynamics Lifecycle Services (LCS), support issues can be managed at different levels, typically categorized under "Subscription" and "Premier" support plans. Here's a general overview of the differences:
Subscription Support:
This is the standard support that comes with your Dynamics 365 subscription.
It includes access to self-help resources, Microsoft's knowledge base, and community forums.
You can submit support tickets for technical issues.
The response times can be longer compared to Premier support.
It's suited for less critical issues that don't require immediate attention.
Premier Support:
Premier support is a higher level of support service that Microsoft offers for an additional fee.
It provides everything in the Subscription support, plus a range of additional benefits.
These benefits often include 24/7 support for critical issues, faster response times, and direct access to Microsoft's top engineers.
You might also have an assigned support account manager who understands your business and technology environment.
This plan is tailored for organizations that need immediate assistance with critical issues or who want a more proactive support experience.
Enterprises choose Premier support when they require a more dedicated and immediate support experience, especially for mission-critical operations where downtime can be very costly. Subscription support may suffice for more routine issues and for businesses with less critical reliance on immediate issue resolution.
If you've made it this far, please leave a kind word. Your encouragement fuels my desire to produce and share even more valuable content.
Monday, October 23, 2023
Outlining in Visual studio
Hide Selection (Ctrl+M, Ctrl+H): If you want to hide a part of your code, like a specific section within an 'if' statement, you can use this. To show it again, you can use "Stop Hiding Current."
Toggle Outlining Expansion (Ctrl+M, Ctrl+M): If a part of your code is hidden, this will show it. If it's already showing, this will hide it. It's like a switch to hide and show the innermost code section where your cursor is.
Toggle All Outlining (Ctrl+M, Ctrl+L): This command allows you to either hide or show all the hidden parts in your code at once. If some are hidden and some are showing, it makes everything show.
Stop Outlining (Ctrl+M, Ctrl+P): This removes all the hidden parts in your entire document. To turn hiding back on, you would follow the menu path in the original description.
Stop Hiding Current (Ctrl+M, Ctrl+U): If you have hidden a specific part of the code that you defined yourself, you can show it again with this.
Collapse to Definitions (Ctrl+M, Ctrl+O): This hides everything except the titles or definitions of functions, classes, etc., to give you a clean view of what's in your code.
Collapse Block (C++): If your cursor is inside a particular section of code like a loop, you can hide just that section with this command.
Collapse All in (for specific structures): This is a general command that lets you collapse certain logical parts of the code, like functions or loops, depending on what you choose.
These commands are useful in coding environments to help you manage how you view your code, making it easier to work with large files.
If you've made it this far, please leave a kind word. Your encouragement fuels my desire to produce and share even more valuable content.
Friday, October 20, 2023
Turn on navigation path
How to turn on the navigation path in Dynamics 365 fo
Select System Administration > Setup > Client performance options >
Toggle “Yes” to Enable legacy navigation bar
Tada!!!
Wednesday, October 11, 2023
RecordInsertList in Dynamics 365 FO
In this blog of Dynamics Community 101 we will learn RecordInsertList in Microsoft Dynamics 365 F&O
In Dynamics 365 Finance & Operations (F&O), the RecordInsertList class is a helpful mechanism for efficiently inserting multiple records into a database table. It's more efficient than using a standard insert in a loop as it batches the inserts, reducing the number of database operations.
Here's a simple example that involves the CustTable, which stores customer information.
Declare a variable of RecordInsertList type - Declare a variable that references a RecordInsertList object. Specify the table you're working with; in this case, the CustTable.
Create the records - Use the new keyword to create a CustTable buffer, and then assign the fields' values.
Add the records to the RecordInsertList - Use the add method on your RecordInsertList object to add each record to the list.
Insert the records - Call the insertDatabase method to insert all the records in the list into the database.
Here's a code snippet to illustrate these steps:
static void InsertCustTableExample(Args _args)
{
CustTable custTable;
RecordInsertList recordInsertList = new RecordInsertList(tableNum(CustTable));
// Loop to create records
for (int i = 1; i <= 10; i++)
{
custTable.AccountNum = strFmt("CUST%d", i);
custTable.Name = strFmt("Customer %d", i);
// Add the record to the RecordInsertList
recordInsertList.add(custTable);
}
// Insert the records into the database
recordInsertList.insertDatabase();
info("Records inserted successfully.");
}
Monday, October 9, 2023
Dynamics 365 fo types of functions and classes and special classes
In this blog of Dynamics Community 101 we will learn about types of functions and classes and special classes in Microsoft Dynamics 365 F&O
Functions:
Thursday, October 5, 2023
Optimizing Disk Space Managing MSSQL Logs on Dynamics 365 (Drive H)
In the displayed screenshot, it's evident that logs partition is nearing its capacity. This has hindered the import of an additional database, as SQL Server notifies me of insufficient disk space.
Tuesday, August 22, 2023
Create access token from c sharp code and get it in dynamics 365 FO
Friday, August 11, 2023
Aggregate dimensions and aggregate measurements in Dynamics 365 FO
Aggregate dimensions and aggregate measurements in Dynamics 365 Finance and Operations (F&O) are components used within reporting and analytics.
Aggregate Dimensions: These are attributes or characteristics that allow data to be categorized and grouped. They are typically used to filter or slice data within reports. For example, an aggregate dimension might be a product category, region, or salesperson. By using these dimensions, you can summarize and analyze data in a way that makes sense for your organization.
Aggregate Measurements: These refer to the actual data values that are being summarized and analyzed. Aggregate measurements include things like total sales, quantity sold, or profit margins. They are typically used in conjunction with aggregate dimensions to provide a comprehensive view of the data. Aggregate measurements can be viewed in various summaries such as sums, averages, counts, etc.
Youtube video : Link
Entity store : Link
BYOD : Link
CloudFronts : Link
Efficient Data Reporting and Analysis : Link
Wednesday, August 9, 2023
Enqueue and Dequeue in Dynamics 365 FO
Enqueue:
Dequeue:
Sending data from Dynamics 365 F&O to another system. After the data has been processed within Dynamics 365 F&O, it can be removed from the queue (dequeued) and sent to another system as needed.
So in summary:
Enqueue is related to receiving data into Dynamics 365 F&O.
Dequeue is related to sending data from Dynamics 365 F&O to another system.
Tuesday, August 8, 2023
How to create a logic app in azure to move files in SFP from one folder to another
Go to Azure portal : Azure
You will see window like below
Click on "Create a resource"
Enter the resource group, logic app name, select the region, select the plan type as consumption