I am doing automation on package installation, now I am able to install the package from apex using metadata service class by passing package namespace and version number,
but i need to pass the installation url and install the package from apex. How to get the package details from the packaging org by using the installation url?
there is a packaging version id in the url how to tackle that id and get the packaging details. what will be sObject for package information.
Can any one please give me some leads how i can proceed here..
Below is the method to install/upgrade the package. i am check on 1G packages as of now.
public static void upsertPackages(String password, String versionNumber, String fullName)
{
MetadataService.InstalledPackage installedPackageA = new MetadataService.InstalledPackage();
installedPackageA.password = password;
installedPackageA.versionNumber = versionNumber;
installedPackageA.fullName = fullName;
MetadataService.MetadataPort service = createService();
List<MetadataService.UpsertResult> results =
service.upsertMetadata(
new MetadataService.Metadata[] { installedPackageA});
handleUpsertResult(results[0]);
}