Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / CONNECTING AZURE BLOB ...
Finance forum
Unanswered

CONNECTING AZURE BLOB TABLE WITH D365 F&O TABLE

Posted on by 53
Hi Expert,
 
I am reaching out to seek your expertise and guidance regarding establishing a connection between an AZURE BLOB TABLE and a D365 F&O table.
 
Our requirement involves daily data imports from an AZURE BLOB TABLE to a corresponding table in D365 F&O. While I have successfully established a connection with the Azure Blob container, now  I need assistance in connecting to the specific Azure Blob table.
 
I would greatly appreciate it if you could provide guidance on how to establish this connection. Specifically, I am seeking information on the necessary steps, configurations, and any code modifications that might be required to facilitate the data transfer between the Azure Blob table and the D365 F&O table.
 
Thank you in advance for your support..
  • Martin Dráb Profile Picture
    Martin Dráb 225,490 Super User on at
    CONNECTING AZURE BLOB TABLE WITH D365 F&O TABLE
    Azure Cosmos DB, Azure table storage and Azure blob storage are three different things. In either case, the answer is yes, they can be used from X++.
     
    If you want the table storage, see the link to Azure Tables client library documentation that I gave you before. The main namespace is Azure.Data.Tables.
  • CU04060706-0 Profile Picture
    CU04060706-0 53 on at
    CONNECTING AZURE BLOB TABLE WITH D365 F&O TABLE
    Hi Martin ,
     
    i Want to know by X++ code can we connect with table storage or not ? if we can what namespaces we need to use ?? except cosmo.table what else we can use.
     
    and please give me code of connecting table storage with custom table in d365. 
     
  • Martin Dráb Profile Picture
    Martin Dráb 225,490 Super User on at
    CONNECTING AZURE BLOB TABLE WITH D365 F&O TABLE
    Please be more specific. For example, if you're getting an exception, please tell us the error message, the exception type and which call is throwing it.
  • CU04060706-0 Profile Picture
    CU04060706-0 53 on at
    CONNECTING AZURE BLOB TABLE WITH D365 F&O TABLE
    HI Martin,
     
    The connection is not establishing with table storage and files are not been reading from the table into custom table in d365 f&o
     
    could you give me some code of reading files and importing table storage data into custom table.
     
    let us assume table name in azure is BankTable and custom table in D365 f&o is Bankimport. 
     
     
  • Martin Dráb Profile Picture
    Martin Dráb 225,490 Super User on at
    CONNECTING AZURE BLOB TABLE WITH D365 F&O TABLE
    Please describe the problem. Just saying that you have a problem isn't very useful, because there may be many kinds of problems and there is no universal solution for all of them.
  • CU04060706-0 Profile Picture
    CU04060706-0 53 on at
    CONNECTING AZURE BLOB TABLE WITH D365 F&O TABLE
    Hi Martin, Im unable to import the data from the tablestorage into custom table created in the d365 f&o. can you help me in this ?? Im trying x++ code to establish connection and import data from the table storage into d365 custom tableAzureTableImport.. Im having problem at the readTableValueFromMemoryStream method . could you give me some to import table data into d365 f&o table through x++ code ......
     
    using Microsoft.WindowsAzure.Storage;
    using Microsoft.WindowsAzure.Storage.Table;
    class AzureTable
    {
        //File
        #define.delimiterField(',')
        public void getValues()
        {
            CloudTableClient cloudTableClient;
            CloudTable table;
            AzureTable azure  = new AzureTable();
            cloudTableClient = azure.connectToAzureTable();
            table = cloudTableClient.GetTableReference("Table Name ");
            if (table!= null)
            {
                info(strFmt("Connected to Table A successfully"));
            }
            else
            {
                error(strFmt("Failed to connect to Table Name"));
            }
            azure.readTableValueFromMemoryStream(table);
        }
        public CloudTableClient connectToAzureTable()
        {
            CloudStorageAccount cloudStorageAccount;
            cloudStorageAccount =
                CloudStorageAccount::Parse("Connection string value");
            CloudTableClient cloudTableClient = cloudStorageAccount.CreateCloudTableClient();
            //info(strFmt("Table Client Name: %1",cloudTableClient.Name));
            return cloudTableClient;
        }
     
     
        public void readTableValueFromMemoryStream(CloudTable table)
        {
            TableQuery tableQuery = new TableQuery();
            tableQuery.FilterString = "PartitionKey eq 'DefaultPartitionKey'";
            tableQuery.Take(1); // Retrieve only one entity
            AzureTableImport azureTableImport;
            TableRequestOptions tableRequestOptions = new TableRequestOptions();
            OperationContext operationContext = new OperationContext();
            System.Collections.ArrayList tableData = new System.Collections.ArrayList();
            DynamicTableEntity entity;
            Map map = new Map(Type::String, Type::String);
            map = entity.Properties;
            Iterator iterator = map.getIterator();
            while (iterator.moveNext())
            {
                str key = iterator.getKey();
                str value = iterator.getValue();
                if (key == "A0")
                {
                    if (propertyValue != null)
                    {
                        AzureTableImport.Description = propertyValue.StringValue;
                    }
                }
            }
            try
            {
                AzureTableImport.insert();
            }
            catch (Exception::DuplicateKeyException)
            {
                //clears the last infolog message, which is created by trying to insert a duplicate
                infolog.clear(Global::infologLine() - 1);
            }
        }
        
    }
  • Martin Dráb Profile Picture
    Martin Dráb 225,490 Super User on at
    CONNECTING AZURE BLOB TABLE WITH D365 F&O TABLE
    I'm sorry, but I have my own work. I'm not available to get hired by your company and analyze and develop the whole thing for you in next a few days. We can agree on something next month, if you want.
     
    Otherwise you can explain what you did and what's the challenge you're dealing with. The the community members, including myself, could give you some advise.
  • CU04060706-0 Profile Picture
    CU04060706-0 53 on at
    CONNECTING AZURE BLOB TABLE WITH D365 F&O TABLE
    Hi Martin,
     
    I want to express my gratitude for the documentation and code snippet you provided earlier. I attempted to incorporate the changes into my existing code based on the snippet you shared, but I encountered some challenges.
     
    Considering the urgency of the situation and the client's requirement for code-based solutions rather than Logic Apps, I kindly request your assistance in providing the actual real-time code that will successfully connect Table Storage to D365 F&O.
     
    Time is of the essence, and our client is eager to see tangible progress.
     
    Therefore, I am reaching out to you with the hope that you can provide the complete code that will enable us to establish a seamless connection between Table Storage and D365 F&O. This will allow us to import the required data efficiently and fulfill our project objectives.
     
     
  • Martin Dráb Profile Picture
    Martin Dráb 225,490 Super User on at
    CONNECTING AZURE BLOB TABLE WITH D365 F&O TABLE
    You can see code snippets in the documentation linked in my previous reply. Have you looked at them?
     
    Note that you don't even have to rewrite it to X++. You can create a C# library, deal with the Azure API there and use just your library from X++ via .NET Interop.
     
    If time is a problem and you don't know how to write the code, consider utilizing the connectors in flow/Logic Apps. Then you don't have to write this code for communication with Azure storage at all.
  • CU04060706-0 Profile Picture
    CU04060706-0 53 on at
    CONNECTING AZURE BLOB TABLE WITH D365 F&O TABLE
    Hi Martin,
     
    I am reaching out to you regarding a specific requirement for importing data from Table Storage into D365 F&O. I understand that you have expertise in this area and I am hoping you can assist me with the actual code needed to accomplish this task.
     
    I apologize for the directness of my request, but the timeliness of this matter is crucial for our project. If possible, could you please provide me with the actual code or code snippets that will enable us to import data from Table Storage into D365 F&O
     
    I kindly request your assistance in this matter as soon as possible.
     
    Thank you in advance for your support, Martin.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans