Loading
Salesforce now sends email only from verified domains. Read More

Error 'Argument 1 cannot be null' when you attempt to modify a license in LMA

Publish Date: Oct 13, 2022
Description

Users may encounter the following error when attempting to modify a license in your LMO:

"Argument 1 cannot be null"

 

Resolution


This error typically occurs if the license record is not valid. 

Check the 'Created By' Id to see if it may have been manually created by a user or the LMA.


A correct license's created by field's syntax should be:

Created By: License Management App, Date/Time stamp


An invalid license could be:

Created By: User Name, Date/Time stamp

 

 

How LMA works:
 

The LMA code creates license records and "links" the record in the Subscriber Org with the License in the LMO upon installation of a Managed Package. If you didn't have an LMO setup when the package was installed, the appropriate "link" was never created. Manually creating license records won't resolve this.

 

Workaround:
 

Upload a new version of the package and register it on Appexchange (so that it has the LMO). Ask those Subscriber Orgs to upgrade to this newer version of the Package. You don't have to include anything different in the newer version, it can be exact the same as the older version. You just need a new version number. Upon upgrade to this new version, the system should generate new Licenses Records for these orgs.


 

Resolution:
 

Partners may Refresh Licenses Using the LMA​If you're unable to use the available tool there are circumstances where Salesforce Support may be able to use a specialized tool to refresh the license. If successful, this tool will automatically create a new license record with the appropriate "Created By" value.
 

Please log a case in Help & Training for assistance with this issue and include the following:

 

  1. Org Id of your LMO.
  2. Subscriber Org Id (found on the license record).
  3. All Package Id for your package.
  4. Link or name of the affected license record.
  5. Please also grant Salesforce Support login access to your LMO.

 

Note: Any manually created records in the LMO will not function as expected and should be deleted.

 

Knowledge Article Number

000385756

 
Loading
Salesforce Help | Article