Dear all,
I have a strange issue going on. When our sales user prints a SalesInvoice report for a particular customer it doesn't display the invoicing address: only the customer's name.
What I have found is that when printing the same invoice with Administrator role, the invoicing address is displayed correctly.
When executing in the user's role context, in the SalesInvoiceDPBase::init method, the following:
cachedInvoicingAddress = _custInvoiceJour.invoicingAddress();
assigns an empty string to the variable, and that's because in the invoicingAddress method
//BP deviation documented
display LogisticsAddressing invoicingAddress()
{
return DirUtility::replaceAddressTokenLanguage(LogisticsPostalAddress::findRecId(this.InvoicePostalAddress), this.languageId);
}
the LogisticsPostalAddress::findRecId returns no record (without errors even in Windows Event Viewer).
No need to say that the given RecId (the one in the this.InvoicePostalAddress field) does exist since it works when using Administrator role (anyway I also double checked by directly querying the SQL Server).
If I give table permission for LogisticsPostalAddress to the user, nothing changes and the record is not correctly retrieved.
Do you have any suggestion about this case?
Thank you in advance