Seamlessly Importing Images via URLs in Bulk into Business Central - CloudFronts

Seamlessly Importing Images via URLs in Bulk into Business Central

Whether you’re adding product catalogs or updating images for an extensive inventory, having an efficient way to bulk import images can save time and effort.

In this blog post, we will walk you through the steps to import images in bulk into Business Central, providing you with a seamless method to enhance your product data.

In today’s fast-paced business environment, efficiency and accuracy in managing product data are crucial for maintaining a competitive edge. Microsoft Dynamics 365 Business Central (BC) is a comprehensive enterprise resource planning (ERP) system that integrates all business functions into one platform. One of the most time-consuming tasks for businesses, especially those with large inventories, is managing and uploading product images.

1. Create a Codeunit or Processing Report:

   Since Business Central doesn’t have a built-in feature for bulk image import, you can create a custom codeunit or processing report to handle this task. In this example, we’ll use a codeunit.

2. Add a New Field for Image URL: 

   Create an Item Table Extension and add a new field called “Product Image URL” to the Item table. This field will hold the URL or path for each product image.

3. Set the Image URLs Using a Configuration Package: 

   Use a config package to set the image URLs in the “Product Image URL” field for each item. This is where you will provide the path or URL for the image associated with each product.

4. Run the Codeunit to Update Items:

   After populating the image URLs via the configuration package, run the codeunit in the foreground. The codeunit will process each item and update the products that have a valid URL set, linking them to the corresponding images.

Below is the logic which will use the url which is set in Item master table and update all the data in bulk

codeunit 50112 SetImageUrl

{

    Permissions = tabledata Item = rimd;

    Description = ‘Set Image URL’;

    trigger OnRun()

    var

        RecItem: Record Item;

        Rec_Item1: Record Item;

        ItemPage: page “Item Card”;

        PictureURLDialog: Page “Picture URL Dialog”;

    begin

        Clear(RecItem);

        RecItem.Reset();

        RecItem.SetFilter(“Product Image URL”, ‘<>%1’, ”);

        if RecItem.FindSet() then

            repeat

                Rec_Item1.SetRange(“No.”, RecItem.”No.”);

                if Rec_Item1.FindFirst() then begin

                    PictureURLDialog.SetItemInfo(Rec_Item1.”No.”, Rec_Item1.Description, Rec_Item1.”Product Image URL”);

                    PictureURLDialog.ImportItemPictureFromURL();

                end;

            until RecItem.Next() = 0;

    end;

}

This approach allows you to automate the bulk import of product images into Business Central efficiently.

Conclusion

Importing images in bulk into Business Central can significantly enhance your operational efficiency and ensure your product records are complete and accurate. By following the steps outlined in this blog, you can easily upload and manage product images, creating a more professional and visually appealing online presence, as well as improving internal processes.

Whether you’re dealing with thousands of items or just a few, these steps will guide you through the bulk image import process, saving time, reducing errors, and providing a better user experience for both your team and customers.

If you need further assistance or have specific questions about your Business Central setup, feel free to reach out for personalized guidance. Happy importing!

We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.




Share Story :

SEARCH BLOGS :

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange