• Violeta Grigorova 3
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 8
    Replies
I created a VF page. packed it and deployed to a staging org. I am not able to see my VF page in the staging org. Is this supposed to be this way or I should usually be able to see it immediately?

Thank you
I created a new VisualForce page - an exact copy of the last one I developed, but with a different name and the same controller code, but with a different name. So, now I want to create a new package (due to the last one not working properly with constantly changing names of classes following a naming convention). But I cannot see my new page in the Package Manager. I could see it in the list of VF pages in Setup and I have assigned all the neccessary user permissions to it. Why am I not able to see it in the list in the Package Manager, this is strange to me, as I am following the exact same procedure and order of doing things as before. Any ideas would be appreciated.
I am trying to follow this guide:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_retrieve_unman_pack.htm

I am doing as follows:
sfdx force:project:create -n {Project Name}
cd {Project Name}
Open the sandbox org
All Setup
Package Manager
Create a package
In Salesforce DX project, create a folder for the MDAPI retrieve:
mkdir mdapipkg
Retrieve the metadata.
sfdx force:mdapi:retrieve -s -r ./mdapipkg -u <username> -p <package name>
My package name is VisualEnhancements. My username is v.g@test.com.org
sfdx force:mdapi:retrieve -s -r ./mdapipkg -u v.g@test.com.org -p VisualEnhancements

results in

No org configuration found for v.g@test.com.org

Should I create a Dev Hub account for this one? I am simply trying to retrieve metadata from sandbox. The guide doesn't mention connecting to Dev Hub (because it is only 30-day trial) or is this always necessary to connect to? I am trying to wrap my head around this 

Thank you
I created my own Unmanaged Package on a test sandbox. While installing unmanaged package on another test sandbox, I am receiving the following Error:

This app can't be installed.
There are problems that prevent this package from being installed.
Duplicate NameThe name "SBQQ__Subscription__c.DeviceId__c" is already used on component type: Custom Field Definition. Please rename existing component.
Duplicate NameThe name "SBQQ__ProductOption__c.ProductCategory__c" is already used on component type: Custom Field Definition. Please rename existing component.
Duplicate NameThe name "SBQQ__Subscription__c.Server_Status__c" is already used on component type: Custom Field Definition. Please rename existing component.
Duplicate NameThe name "Product2.ProductCategory__c" is already used on component type: Custom Field Definition. Please rename existing component.

Do you have an idea why this is happening?

This is the first time I am installing this package. I checked and I see that I have all the required objects and fields within the sandbox.

Could it be that I have mistaken while making the package itself?

Thank you
I created my own Unmanaged Package on a test sandbox. I would like to install the package on another sandbox now, but I am not able to see where to do this from. I have produced the Installation URL. I go to Setup -> Installed Packages and I can see that the only way to install packages is from the AppExchange. Is there a button or something I am missing

Thank you
I have a VF page and a Controller. I need to create an Apex Unit Test.

Here is the Controller:
 
public with sharing class ActiveSubscriptionsController {
    
    private ApexPages.StandardController stdController;
    private final Account acct;
	
   	public boolean show{get;set;}
    public boolean hide{get;set;}
   	public String DeviceId{get;set;}
    public String ContractNumber{get;set;}
    public String AccountNumber{get;set;}
    
    public ActiveSubscriptionsController(ApexPages.StandardController stdController) {
		this.stdController = stdController;
        this.acct = (Account)stdController.getRecord();
        AccountNumber = acct.AccountNumber;
        system.debug('Inside InvokeShow, AccountNumber: ' + AccountNumber);   
        show=true;
        hide=false;
    }

    public void InvokeShow(){
        show=false;
        hide=true;
		system.debug('Inside InvokeShow, DeviceId: ' + DeviceId);  
        system.debug('Inside InvokeShow, ContractNumber: ' + ContractNumber);
    }

    public void Invokehide(){
		show=true;
		hide=false;
    }
    
    public List<SBQQ__Subscription__c> getSubscriptions_front() {
        String AccountNumber = acct.AccountNumber;
        AccountNumber = AccountNumber + '%';
        String Empty = '';
        String AzureSubscription = '%Azure Subscription%';
        List<SBQQ__Subscription__c> subscriptionResults_front = 
        Database.query('SELECT Name, MasterDeviceName__c, SBQQ__ProductName__c, Location__c, DeviceId__c, SBQQ__ContractNumber__c, Server_Status__c  FROM SBQQ__Subscription__c WHERE DeviceId__c LIKE :AccountNumber AND (Location__c != :Empty OR SBQQ__ProductName__c LIKE :AzureSubscription)');
        return subscriptionResults_front;
    }
    
    public List<SBQQ__Subscription__c> getSubscriptions_filtered() {
        String Empty = '';
        List<SBQQ__Subscription__c> subscriptionResults_filtered = 
        Database.query('SELECT Name, SBQQ__ProductName__c, Location__c, DeviceId__c, SBQQ__ContractNumber__c, SBQQ__Contract__c, SBQQ__Account__c, SBQQ__RequiredByProduct__c, SBQQ__Product__c, SBQQ__ProductOption__c, SBQQ__OptionType__c, SBQQ__OrderProduct__c FROM SBQQ__Subscription__c WHERE DeviceId__c = : DeviceId AND SBQQ__ContractNumber__c  =: ContractNumber AND Location__c != :Empty');
        return subscriptionResults_filtered;
    }

    public List<SBQQ__Subscription__c> getSubscriptions_table() {
        String Empty = '';
        List<SBQQ__Subscription__c> subscriptionResults_table = 
        Database.query(
        'SELECT Name, DeviceId__c, SBQQ__ProductName__c, SBQQ__SpecialPrice__c, SBQQ__NetPrice__c, SBQQ__ProductOption__r.SBQQ__OptionalSKU__c, SBQQ__ProductOption__r.SBQQ__Selected__c, SBQQ__ProductOption__r.SBQQ__QuantityEditable__c, SBQQ__ProductOption__r.SBQQ__Quantity__c, SBQQ__ProductOption__r.SBQQ__MinQuantity__c, SBQQ__ProductOption__r.SBQQ__MaxQuantity__c, SBQQ__ProductOption__r.SBQQ__Number__c, SBQQ__ProductOption__r.ProductCategory__c,SBQQ__ProductOption__r.SBQQ__Feature__r.SBQQ__Category__c FROM SBQQ__Subscription__c WHERE DeviceId__c = : DeviceId AND SBQQ__ContractNumber__c  =: ContractNumber AND Location__c = :Empty ORDER BY SBQQ__ProductOption__r.SBQQ__Number__c');
        return subscriptionResults_table;
    }
    
    public Map<String, Map<String,List <SBQQ__Subscription__c>>> getMyMap () {
        String Empty = '';
        Map<String, Map<String,List <SBQQ__Subscription__c>>> myMap = new Map<String, Map<String,List <SBQQ__Subscription__c>>>();
        List<SBQQ__Subscription__c> subscriptionResults_4 = 
        Database.query('SELECT Name, DeviceId__c, SBQQ__ProductName__c, SBQQ__SpecialPrice__c, SBQQ__NetPrice__c, Location__c, SBQQ__ProductOption__r.SBQQ__OptionalSKU__c, SBQQ__ProductOption__r.SBQQ__Selected__c, SBQQ__ProductOption__r.SBQQ__QuantityEditable__c, SBQQ__ProductOption__r.SBQQ__Quantity__c, SBQQ__ProductOption__r.SBQQ__MinQuantity__c, SBQQ__ProductOption__r.SBQQ__MaxQuantity__c, SBQQ__ProductOption__r.SBQQ__Number__c, SBQQ__ProductOption__r.ProductCategory__c,SBQQ__ProductOption__r.SBQQ__Feature__r.SBQQ__Category__c FROM SBQQ__Subscription__c WHERE DeviceId__c = : DeviceId AND SBQQ__ContractNumber__c  =: ContractNumber AND Location__c = :Empty ORDER BY SBQQ__ProductOption__r.SBQQ__Number__c');
       
         for(SBQQ__Subscription__c sub: subscriptionResults_4){
			if(!myMap.containsKey(sub.SBQQ__ProductOption__r.SBQQ__Feature__r.SBQQ__Category__c)){
               myMap.put(sub.SBQQ__ProductOption__r.SBQQ__Feature__r.SBQQ__Category__c,new Map<String, List <SBQQ__Subscription__c>> {sub.SBQQ__ProductOption__r.ProductCategory__c => new List <SBQQ__Subscription__c>{sub}});
            }
			else {
                if(!myMap.get(sub.SBQQ__ProductOption__r.SBQQ__Feature__r.SBQQ__Category__c).containsKey(sub.SBQQ__ProductOption__r.ProductCategory__c)){
                    myMap.get(sub.SBQQ__ProductOption__r.SBQQ__Feature__r.SBQQ__Category__c).put(sub.SBQQ__ProductOption__r.ProductCategory__c,new List <SBQQ__Subscription__c>{sub});
				}
				else{
                    myMap.get(sub.SBQQ__ProductOption__r.SBQQ__Feature__r.SBQQ__Category__c).get(sub.SBQQ__ProductOption__r.ProductCategory__c).add(sub);
				}
            }
         }
         
        return myMap;
    }
}

Please let me know if you need any other information and thank you very much in advance!
I have developed a VisualForce page on one staging sandbox. I would like to make a package of it and deploy it on another staging sandbox. What would be a procedure I must follow?

Thank you
If we have a list of contracts and within a given contract we have a list of subscriptions. Can I change the product field from a VisualForce page? Could you point me to where I shoud read about doing so, if possible.

Thank you!
I created a new VisualForce page - an exact copy of the last one I developed, but with a different name and the same controller code, but with a different name. So, now I want to create a new package (due to the last one not working properly with constantly changing names of classes following a naming convention). But I cannot see my new page in the Package Manager. I could see it in the list of VF pages in Setup and I have assigned all the neccessary user permissions to it. Why am I not able to see it in the list in the Package Manager, this is strange to me, as I am following the exact same procedure and order of doing things as before. Any ideas would be appreciated.
I have a VF page and a Controller. I need to create an Apex Unit Test.

Here is the Controller:
 
public with sharing class ActiveSubscriptionsController {
    
    private ApexPages.StandardController stdController;
    private final Account acct;
	
   	public boolean show{get;set;}
    public boolean hide{get;set;}
   	public String DeviceId{get;set;}
    public String ContractNumber{get;set;}
    public String AccountNumber{get;set;}
    
    public ActiveSubscriptionsController(ApexPages.StandardController stdController) {
		this.stdController = stdController;
        this.acct = (Account)stdController.getRecord();
        AccountNumber = acct.AccountNumber;
        system.debug('Inside InvokeShow, AccountNumber: ' + AccountNumber);   
        show=true;
        hide=false;
    }

    public void InvokeShow(){
        show=false;
        hide=true;
		system.debug('Inside InvokeShow, DeviceId: ' + DeviceId);  
        system.debug('Inside InvokeShow, ContractNumber: ' + ContractNumber);
    }

    public void Invokehide(){
		show=true;
		hide=false;
    }
    
    public List<SBQQ__Subscription__c> getSubscriptions_front() {
        String AccountNumber = acct.AccountNumber;
        AccountNumber = AccountNumber + '%';
        String Empty = '';
        String AzureSubscription = '%Azure Subscription%';
        List<SBQQ__Subscription__c> subscriptionResults_front = 
        Database.query('SELECT Name, MasterDeviceName__c, SBQQ__ProductName__c, Location__c, DeviceId__c, SBQQ__ContractNumber__c, Server_Status__c  FROM SBQQ__Subscription__c WHERE DeviceId__c LIKE :AccountNumber AND (Location__c != :Empty OR SBQQ__ProductName__c LIKE :AzureSubscription)');
        return subscriptionResults_front;
    }
    
    public List<SBQQ__Subscription__c> getSubscriptions_filtered() {
        String Empty = '';
        List<SBQQ__Subscription__c> subscriptionResults_filtered = 
        Database.query('SELECT Name, SBQQ__ProductName__c, Location__c, DeviceId__c, SBQQ__ContractNumber__c, SBQQ__Contract__c, SBQQ__Account__c, SBQQ__RequiredByProduct__c, SBQQ__Product__c, SBQQ__ProductOption__c, SBQQ__OptionType__c, SBQQ__OrderProduct__c FROM SBQQ__Subscription__c WHERE DeviceId__c = : DeviceId AND SBQQ__ContractNumber__c  =: ContractNumber AND Location__c != :Empty');
        return subscriptionResults_filtered;
    }

    public List<SBQQ__Subscription__c> getSubscriptions_table() {
        String Empty = '';
        List<SBQQ__Subscription__c> subscriptionResults_table = 
        Database.query(
        'SELECT Name, DeviceId__c, SBQQ__ProductName__c, SBQQ__SpecialPrice__c, SBQQ__NetPrice__c, SBQQ__ProductOption__r.SBQQ__OptionalSKU__c, SBQQ__ProductOption__r.SBQQ__Selected__c, SBQQ__ProductOption__r.SBQQ__QuantityEditable__c, SBQQ__ProductOption__r.SBQQ__Quantity__c, SBQQ__ProductOption__r.SBQQ__MinQuantity__c, SBQQ__ProductOption__r.SBQQ__MaxQuantity__c, SBQQ__ProductOption__r.SBQQ__Number__c, SBQQ__ProductOption__r.ProductCategory__c,SBQQ__ProductOption__r.SBQQ__Feature__r.SBQQ__Category__c FROM SBQQ__Subscription__c WHERE DeviceId__c = : DeviceId AND SBQQ__ContractNumber__c  =: ContractNumber AND Location__c = :Empty ORDER BY SBQQ__ProductOption__r.SBQQ__Number__c');
        return subscriptionResults_table;
    }
    
    public Map<String, Map<String,List <SBQQ__Subscription__c>>> getMyMap () {
        String Empty = '';
        Map<String, Map<String,List <SBQQ__Subscription__c>>> myMap = new Map<String, Map<String,List <SBQQ__Subscription__c>>>();
        List<SBQQ__Subscription__c> subscriptionResults_4 = 
        Database.query('SELECT Name, DeviceId__c, SBQQ__ProductName__c, SBQQ__SpecialPrice__c, SBQQ__NetPrice__c, Location__c, SBQQ__ProductOption__r.SBQQ__OptionalSKU__c, SBQQ__ProductOption__r.SBQQ__Selected__c, SBQQ__ProductOption__r.SBQQ__QuantityEditable__c, SBQQ__ProductOption__r.SBQQ__Quantity__c, SBQQ__ProductOption__r.SBQQ__MinQuantity__c, SBQQ__ProductOption__r.SBQQ__MaxQuantity__c, SBQQ__ProductOption__r.SBQQ__Number__c, SBQQ__ProductOption__r.ProductCategory__c,SBQQ__ProductOption__r.SBQQ__Feature__r.SBQQ__Category__c FROM SBQQ__Subscription__c WHERE DeviceId__c = : DeviceId AND SBQQ__ContractNumber__c  =: ContractNumber AND Location__c = :Empty ORDER BY SBQQ__ProductOption__r.SBQQ__Number__c');
       
         for(SBQQ__Subscription__c sub: subscriptionResults_4){
			if(!myMap.containsKey(sub.SBQQ__ProductOption__r.SBQQ__Feature__r.SBQQ__Category__c)){
               myMap.put(sub.SBQQ__ProductOption__r.SBQQ__Feature__r.SBQQ__Category__c,new Map<String, List <SBQQ__Subscription__c>> {sub.SBQQ__ProductOption__r.ProductCategory__c => new List <SBQQ__Subscription__c>{sub}});
            }
			else {
                if(!myMap.get(sub.SBQQ__ProductOption__r.SBQQ__Feature__r.SBQQ__Category__c).containsKey(sub.SBQQ__ProductOption__r.ProductCategory__c)){
                    myMap.get(sub.SBQQ__ProductOption__r.SBQQ__Feature__r.SBQQ__Category__c).put(sub.SBQQ__ProductOption__r.ProductCategory__c,new List <SBQQ__Subscription__c>{sub});
				}
				else{
                    myMap.get(sub.SBQQ__ProductOption__r.SBQQ__Feature__r.SBQQ__Category__c).get(sub.SBQQ__ProductOption__r.ProductCategory__c).add(sub);
				}
            }
         }
         
        return myMap;
    }
}

Please let me know if you need any other information and thank you very much in advance!
I have developed a VisualForce page on one staging sandbox. I would like to make a package of it and deploy it on another staging sandbox. What would be a procedure I must follow?

Thank you