Skip to main content

I am encountering a warning message with the following content. Could you please assist us in resolving this issue?


 PX1076
"Warning"
This code calls Acumatica internal API marked with PXInternalUseOnlyAttribute which is not intended for public use.

  CustomerSchemaDetails details = SalesPersons.Search<CustomerSchemaDetails.sourceField>(SchemaConstants.LocationID);
   if (details?.IsActive == false)
     {
          details.IsActive = true; // am getting warning in this line number
          SalesPersons.Cache.Update(details);
     }
     
Thank you in advance.
 
 

Hi Sruthi,

We got the same warning and got the below response from the Acumatica ISV team,

In the code, some Acumatica entities are used that make with PXInternalUseAttribute. This is left by the developers, to denote.

that those entities should not be reused by ISV solutions and customizations. So we cannot validate those matters in an automated way and one of the Technical Account Managers will review this part manually. At this point, nothing is required from our side about those items.


At this moment, a fix is not available for this warning message.

In the development of ISV products, there are often instances where methods or interfaces marked as PXInternalUseOnly need to be utilized.

For example, the IReportLoaderService interface could be used to generate .pdf files from Acumatica reports.

In my opinion, until fix became available, to bypass this warning, a comment with proper justification should be added.


Hi @sruthic25 , the Acuminator team is here.

Usually, the platform team attempts to keep internal APIs marked as `internal` in C# sense. However, that is not always possible and for various reasons some APIs are declared as `public`. Still, the platform team would like to preserve the ability to change them and marks them with the special `PXInternalUseAttribute` as “internal”. Such mark means that a breaking changes could be introduced to the marked API even in minor releases. The whole API behavior may change, or API may be even deleted. Unlike the public API, which can be modified only in the next major release, there are no guarantees.

This is why It is discouraged to use the API marked as internal. The PX1076 diagnostic was created to simplify the check for usages of such APIs. It is impossible to make some automatic fix of its warnings, since it requires from you to stop using some API completely. Such fix typically involves significant rework of the code.

Nothing is perfect in life. If you absolutely have to use some internal API, and there is no simple enough alternative, then you probably can discuss your case with the ISV team. If they approve, then you can suppress the warning in this particular case.

However, in such case I would strongly recommend to discuss with the Acumatica support (or with the ISV team) the possibility to make the required API publicly available and remove `PXInternalUseAttribute` from it.


Reply