Posts

Showing posts from April, 2022

CREATE OR UPDATE (UPSERT) RECORDS USING ALTERNATE KEYS IN DYNAMICS 365 SDK

In another post, we saw how to retrieve a record based on alternate key in Dynamics 365 using the SDK In this post, we will see how to create or update (upsert) a record based on alternate key in Dynamics 365 using the SDK . The below sample code can be used to achieve the UpdateRequest. For the sake of this post, the alternate key is set up on the Account Name (name) field of the account entity. public void UpsertRecordByKey() { KeyAttributeCollection keys = new KeyAttributeCollection { { Account.Fields.Name, "cak account" } }; Account objAccount = new Account(); objAccount.Name = "cak account"; Upse

RETRIEVE RECORDS USING ALTERNATE KEYS IN DYNAMICS 365 SDK

Image
With Dynamics 365 SDK, you can retrieve a single record by its GUID using the Retrieve method, but, what if you don't have the GUID of the record ? Another approach is to retrieve the record by its alternative keys. However, you cannot use the Retrieve method to do this because it does not have any option to pass the alternate key value. This approach will need the RetrieveRequest to be done. In another post, we saw how to create or update (upsert) a record based on alternate key in Dynamics 365 using the SDK Below, is a sample code on how to retrieve a record based on alternate key in Dynamics 365 using the SDK . For the sake of this post, the alternate key is set up on the Account Name (name) field of the account entity. public void RetrieveRecordB

CONVERT QUERYEXPRESSION TO FETCHXML AND VICE-VERSA IN DYNAMICS 365

Image
In this quick post, we will see how to convert Query Expression to FetchXML and how to convert FetchXML to Query Expression in Dynamics 365 . QUERY EXPRESSION TO FECTH XML The below function can be used to convert a Query Expression into Fetch Xml query public void ConvertQueryExpressionToFetchXml() { List<Account> lstAccounts = new List<Account>(); QueryExpression qeQuery = new QueryExpression(Account.EntityLogicalName) { ColumnSet = new ColumnSet(Account.Fields.Id), Criteria = new FilterExpression() { FilterOperator = LogicalOperator.And, Conditions = { new ConditionExpression(Account.Fields.StateCod

DYNAMICS 365 POWER PANE BROWSER EXTENSION

Image
In another series of posts ( Part 1 , Part 2 , Part 3 ), we saw a list of advanced actions that can be performed by the users using the browser extension Level up for Dynamics 365/Power Apps . In this post, we will see another browser extension which is the Dynamics 365 Power Pane and what actions can be done with it. GENERAL USER INFO This option will show some info about the current user such as User Name, what roles the user has, etc...