Galleries

THE SUPPLIED SNAPSHOTPOINT IS ON AN INCORRECT SNAPSHOT [SOLVED] – D365 FO/Visual Studio Error/Visual Studio Crash

Issue

“THE SUPPLIED SNAPSHOTPOINT IS ON AN INCORRECT SNAPSHOT” error is coming. Visual studio is also crashing during the time of code editing and development of Microsoft Dynamics 365 finance and operations

Continue reading THE SUPPLIED SNAPSHOTPOINT IS ON AN INCORRECT SNAPSHOT [SOLVED] – D365 FO/Visual Studio Error/Visual Studio Crash

Power Apps Functions – Remove & RemoveIf

There are functions available for deleting or removing records from datasource or table in Microsoft Power Apps.

Remove Function – Use the Remove function to remove & delete a specific record or records from a data source in Microsoft Power Apps.

RemoveIf Function- Use the RemoveIf function to remove & delete a record or records based on a condition or a set of conditions in Microsoft Power Apps.

Continue reading Power Apps Functions – Remove & RemoveIf

Power Apps ForAll:Copy & Insert Records from One Datasource To Another Datasource

Requirement

Copying & Inserting Records from One Datasource To Another Datasource in Microsoft Power Apps using ForALL & PATCH

Scenario

We have 2 datasources or tables. First datasource “List” is excel & second datasource is a CDS entity “Contacts”. We want to insert or copy records from “List” to CDS entity “Contacts”

Continue reading Power Apps ForAll:Copy & Insert Records from One Datasource To Another Datasource

D365 FO & PowerAPPS – Lookup From Data entities

Requirement – Connecting Microsoft Power Apps to Data Entity of Microsoft Dynamics 365 for finance and operations. Then create a lookup from Data entity.

Continue reading D365 FO & PowerAPPS – Lookup From Data entities

D365 FO:JSON Creation & SERIALIZATION Using FormJsonSerializer & X++

Requirement

SON CREATION & SERIALIZATION USING FORMJSONSERIALIZER & X++ in Microsoft Dynamics 365 for finance and operations.

Format Of Output JSON String & Message

{"itemCategory":123456,"itemClassification":"A","itemCode":"ItemXYZ","itemGroup":"ItemGroup","itemname":"ItemXYZ Name","onDate":"/Date(1597363200000)/","Optimized":"Yes","site":"SiteCode"}
Continue reading D365 FO:JSON Creation & SERIALIZATION Using FormJsonSerializer & X++

D365 FO – Generate next Number sequence in X++ using NumberSeq Class

Requirement – D365 FO – GENERATE NEXT NUMBER SEQUENCE IN X++ USING NUMBERSEQ CLASS

Continue reading D365 FO – Generate next Number sequence in X++ using NumberSeq Class

D365 FO – Closing and adjustment using X++/InventAdj

Requirement – Closing and adjustment – Revaluation for moving average using X++

Sample Code –

static void Job258(Args _args)
{
    InventDataAdjSumUp  dataAdjSumUp;
    InventDimParm       inventDimParm;
    InventClosing       inventClosing;
    InventAdj_SumUp     inventAdj_SumUp;
    TmpFormLookUp       tmpTbl;
    AcxInventRevalueTable acxInventRevalueTable;
    boolean             adjustClosing;

    tmpTbl.clear();
    tmpTbl.initValue();
    tmpTbl.itemId =  itemId;
    tmpTbl.InventDimId = InventDimId;
    tmpTbl.qty = qty;
    tmpTbl.postedValue = postedValue;
    tmpTbl.adjustNow = adjustNow;
    tmpTbl.LineNo = LineNo;
    tmpTbl.insert();
    
    dataAdjSumUp  = InventDataAdjSumUp::newFromForm(tmpTbl);

    inventAdj_SumUp = InventAdj_SumUp::newSumUp(dataAdjSumUp.pack(),inventDimParm
        , today(), false
        // <GEERU>
        ,InventTransCurrency_RU::PrimaryCur
        // </GEERU>
    );

    inventAdj_SumUp.run();
}

D365 Fin & ops – add cross company in Odata URI & Odata webservice in C#

D you want to fetch records of all the companies of Microsoft Dynamics 365 finance and operations using cross-company in your Odata service application? Here is the trick:

Add below line in your C# program which is using AddQueryOption

d365.SalesOrderHeadersV2.AddQueryOption(“cross-company”, “true”)

Entity store In Azure Data Lake – D365 FINANCE & OPERATIONS

What is Entity Store ?

In Microsoft Dynamics 365 finance and operations, Entity store is database (AxDW) which you can use in D365 FO POWER BI dashboards for realtime analytical reporting . Click here to read more about entity store.

What is Azure Data Lake ?

Microsoft Azure Data Lake is cloud based storage and analytics service . Azure Data lake allows data scientist and data engineer to store any kind of large data and performing analytics, machine learning & AI operations on it. Click here to read more about entity store.

Quick Steps Exporting Entity Store in Azure Data Lake

  • Deploy a new storage account in azure portal. Don,t forget to mention Account kind as  StorageV2. Most important, in Advance TAB Enable the Hierarchical namespaces feature else you will not be able to consume Azure Data Lake data in Power BI.
  • When the deployment is completed, go to your recently deployed storage account and navigate to Settings –> Access Keys . Note down the connection string value, it will be used in coming steps
  • Deploy a KEY VAULT resource in portal.azure.com as per your comfort.
  • After deployment of key vault , go to your Azure KEY VAULT resource and navigate to Settings — > Secrets.
  • Click on button + GENERATE/IMPORT & create a SECRET. Fill a name for the secret and not it somewhere as NAME will be used in next steps. In the VALUE Field please Enter the connection string i (connection string you obtained from previous steps inside STORAGE ACCOUNTS)
  • Secret KEY is created
  • Go to Azure portal, select Azure Active Directory, and then select App registrations. You need to register an App
  • After registering you APP, navigate to –>API permission and Configured permissions as mentioned below.
  • In your registered APP, navigate to –> Certificates & secrets. Generate a new client secret and copy it immediately somewhere.
  • Now go back to your KEY VAULT Resource and click on access polices.
  • In the Select principal field, select the name of the application that you previously registered.In the Key permissions field, select Get and List permissions.In the Secret permissions field, select Get and List permissions.
Get and List permissions
  • Now open your D365 finance and operations environment and go the SYSTEM PARAMETERS . Fill the below details
  • Application ID: Enter the application ID of the Azure AD application that you registered earlier.
  • Application Secret: Enter the application key (secret) for the Azure AD application.
  • DNS name: Enter the DNS name of Key Vault.
  • Secret name: Enter the name of the secret that you added to Key Vault together with connection string information.
  • Validate and Test AZURE KEY VAULT as well as AZURE DATA STORAGE
  • Refresh Entity Store
  • Now your entity store is available in Azure Data Lake.

References : entity-store-data-lake

Date functions snippet in D365 Finance & Operations & Microsoft Dynamics AX

  • Get maximum date : TransDate maximumDate = dateMax();
  • Get minimum date: TransDate minimumDate= datenull();
  • Get Current or today’s Date: TransDate todayDate = today();
  • Convert string to date:  TransDate transdate = str2Date(’26-06-2020′, 123);(day = 1, month = 2, year = 3)
  • Convert date to string: str dateStr = date2Str(today(), 123, DateDay::Digits2, DateSeparator::Hyphen, DateMonth::Digits2, DateSeparator::Hyphen, DateYear::Digits4, 0);
  • Convert String to datetime: utcdatetime dateTime = str2Datetime(‘26.06.2020 11:00:00 pm’, 123);
  • Get current system date time : utcdatetime currentDateTime = DateTimeUtil::getSystemDateTime();
  • Get current system date : Transdate currentDate = DateTimeUtil::getSystemDate();
  • getCompanyTimeZone = DateTimeUtil::getCompanyTimeZone();
  • getUserPreferredTimeZone = DateTimeUtil::getUserPreferredTimeZone();
  • getClientMachineTimeZone = DateTimeUtil::getClientMachineTimeZone();// get clie
  • getOriginatingTimeZone = DateTimeUtil::getOriginatingTimeZone(transDateTime); // get originating time zone
  • dateTime = DateTimeUtil::minvalue(); // get minimum value of date time
  • dateTime = DateTimeUtil::maxvalue(); // get maximum value of date time