How to upload File from URL using Extension in Business Central

Today we will see how we can upload picture from live URL on item card with extension.

For the above process created extension by extending item card.

Lets see how extension work to upload the picture from URL.

  1. Create new AL file with required name and by using page extension snippet extend Item card Page as below

2. Create a function to upload the file 

In the above function used HttpClient and HttpResponseMessage method to upload the file from URL.

3. Call this function on action on item card 

While passing parameter in function passed directly the URL from where I need to upload the picture on item card.

4. Compile and publish the extension and check the result.

5. Once you click on Upload file it will automatically upload the picture from URL on Item card.

This way you can upload the picture from URL rather than downloading on local drive and upload.

Isn’t it cool..

2 comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.