Built-In Workflow Approval - error when referencing page from extension
We have an extension that works with the built-in Workflow approval. When an approval request exists, the approval list looks up the caption of the page to review the record. Since Object is not aware of the extension tables, the code below in table 454 - Approval Entry cannot find the page caption. I changed the code as shown in a test environment to get around the problem temporarily.
RecordCaption() : Text IF NOT RecRef.GET("Record ID to Approve") THEN EXIT; PageNo := PageManagement.GetPageID(RecRef); IF PageNo = 0 THEN EXIT; //Changed to work with Extension objects //Object.GET(Object.Type::Page,'',PageNo); //Object.CALCFIELDS(Caption); //EXIT(STRSUBSTNO('%1 %2',Object.Caption,"Document No."));
AllObject.GET(AllObject."Object Type"::Page, PageNo); EXIT(STRSUBSTNO('%1 %2',AllObject."Object Caption","Document No."));
Thank you for reporting this issue. I actually think, this issue should be resolved in the platform, rather than in the app. Just like the AllObj table contains extension objects, so should the Object table. I have created a bug for the platform team and will await their feedback.
I received reply from the platform team and the behavior is "By Design" as the Object table is available to multiple tenants and it hence can't disclose which extensions are installed on given tenants. I will hence go though our application code and identify all places, where we need to change this. Most places should have been fixed, but it would appear we've missed at least one spot. Thanks again for reporting!
Thank you for your suggestion. I had a little problem finding which table you were referring to, but I assume it's record 2000000058 - "AllObjWithCaption", which does the trick nicely. I will fix the code as you suggest. Thanks again!