Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Gets the URL for an image resource specified in the control add-in manifest. Business Central stores the resource in the database as part of the control add-in's .zip file. The method returns a URL that the control add-in script can use to retrieve the resource.
Learn more about control add-ins in Control add-in object.
Method signature
string Microsoft.Dynamics.NAV.GetImageResource(resourceName)
Parameters
| Parameter | Description |
|---|---|
resourceName |
Type: StringThe name of the image resource as declared in the control add-in manifest. |
Return value
Type: String
Returns a URL for the specified image resource.
Example
The following example assigns the returned URL to an image element with the ID pushpinImage.
var imageUrl = Microsoft.Dynamics.NAV.GetImageResource('PushpinImage.png');
document.getElementById('pushpinImage').src = imageUrl;
Related information
AL method reference
GetEnvironment method
InvokeExtensibilityMethod method
OpenWindow method