Hi all,
In AX D365FO, I am trying to create separate tab in Operating Unit for Logo upload similar to company logo in legal entity. ie change and remove.
I shall have to ensure some piece of code as well to upload and remove logo from the same form, for which I tried extending form control using CoC but no luck.
[ExtensionOf(formControlStr(OMOperatingUnit, Change))]
final class ChangeLogoButton_Extension
{
public container imageContainer;
public str imageFilePathName;
public void clicked()
{
if (ReportCompanyLogo.uploadImageFile())
{
imageContainer = ImageReference::GetPackedBinaryData(imageFilePathName);
element.showImage(LogoImage);
element.insertImage(LogoImage,CompanyImageType::CompanyLogo);
}
next clicked();
}
}
Somehow I am not able to achieve it using CoC becasue I am getting an error that ReportCompanyLogo and LogoImage are not declared,
where as ReportCompanyLogo is tab which is set to AutoDeclaration yes.
Please suggest.