Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

CompanyImage table general

$
0
0

I am currently fixing a few reports. The problem is that sometimes instead of the Company Logo, some random image gets displayed.

I understand that CompanyImage was changed at some time or another. I think it worked as one image per company, which is obviously not the case anymore. (The reason for the bug in the reports I am fixing.)

I think that the table works on the following concept:

  1. A record is identified by RefRecId and RefTableId.
  2. If the Table is CompanyInfo, 3 images can be saved, provided by the enum CompanyImageType.

Is that correct?

What I do not understand:

  1. Why is there a RefCompanyId field? The table is saved per company, so how is it relevant?
  2. Why is there a HasImage field? I mean if there is no record, then there is no image. Why is it there? And from OMLegalEntity form, if one deletes an image, the record is also deleted. (I would reason that because there is a field that specifies whether there is an image, the record wouldn't be deleted, the HasImage field would just be changed to NoYes::No.)
  3. Is FormLetter::companyLogo() still relevant? It more-or-less comes down to a CompanyImage being selected where CompanyImage.RefCompanyId == curExt(). And when a Company Logo is uploaded on the OMLegalEntity form, the dataArea defaults (in my case to DAT). Thus the method doesn't work. Or what am I missing or doing wrong?

Example of RefCompanyId defaulting to DAT (I added the image on the OMLegalEntity form).

The method called by FormLetter::companyLogo(). RefDataareaId will be curext() and from the previous screenshot, it is clear that RefCompanyId was not saved as current(), but as some default (in my case DAT).


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>