Argument 1 cannot be null error received in LMA
|Knowledge Article Number||000170899|
|Description||Users may encounter the following error when attempting to modify a license in your LMO org:
Argument 1 cannot be null
|Resolution||Normally this is because 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.com 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.com Support login access to your LMO.
Any manually created records in the LMO are useless and they should be deleted.