• StephenCrane
  • NEWBIE
  • 30 Points
  • Member since 2016
  • Salesforce Admin

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 1
    Replies
Hey there,

We've launched a community that is essentially support.companyname.com. When you go to it though it's not secured, and so you get the warning.

"This server could not prove that it is support.companyname.com; its security certificate is from *.na134.force.com. This may be caused by a misconfiguration or an attacker intercepting your connection."

Where do we set this up in Salesforce? I've copied our email to SF support who said this was a developer issue.

"We've enabled support.companyname.com and are pointing to the .force.com unique identifier with our CNAME. I've chosen to use the Salesforce CDN and SSL to serve the domain over HTTPS, but we're getting a "This site is not secure" warning and the SSL certificate doesn't reference our subdomain at all."

Thanks!

User-added image
Hey there, I got some help for this issue here (https://success.salesforce.com/answers?id=9063A000000tCRxQAM)- but still, don't fully understand how to do this. But I have the below code for a button that grabs parts of the Onboarding record to create another Onboarding record (of a specific record type).
<apex:page standardController="Onboarding__c" > <flow:interview name="Create_Billing_Onboarding" finishLocation="/{!Onboarding__c.Id}"> <apex:param name="AccountID" value="{!Onboarding__c.Account__c}" /> <apex:param name="AccountName" value="{!Onboarding__c.Account__r.Name}" /> <apex:param name="PricingTier" value="{!Onboarding__c.Opportunity__r.Pricing_Tier__c}" /> <apex:param name="OpportunityID" value="{!Onboarding__c.Opportunity__c}" /> <apex:param name="DateOfSale" value="{!Onboarding__c.Opportunity__r.CloseDate}" /> <apex:param name="ChildrenOnSubsidy" value="{!Onboarding__c.Children_on_subsidy__c}" /> <apex:param name="HowDoTheyCurrentlyBill" value="{!Onboarding__c.How_Do_They_Currently_Bill_Parents__c}" /> <apex:param name="HowAreTuitionFeesCalculated" value="{!Onboarding__c.How_are_tuition_fees_calculated__c}" /> <apex:param name="HowFrequentlyAreParentsBilled" value="{!Onboarding__c.How_frequently_are_parents_billed__c}" /> <apex:param name="HowManyChildrenOnSubsidy" value="{!Onboarding__c.How_many_children_on_subsidy__c}" /> <apex:param name="IfNoWhy" value="{!Onboarding__c.If_No_Why__c}" /> <apex:param name="InterestedInInvoicing" value="{!Onboarding__c.Interested_in_invoicing_through_Himama__c}" /> <apex:param name="WillRecordSubsidyOutsideHiMama" value="{!Onboarding__c.Will_they_record_subsidy_outside_Himama__c}" /> <apex:param name="BillingNotes" value="{!Onboarding__c.Billing_Notes__c}" /> </flow:interview> </apex:page>

And then triggers a flow. We want a validation rule that if some of the parts are bull then they get a message/pop up whatever to say it needs to be filled - like a Validation Rule.

I tried adding this piece of code to it and various tinkerings but no such luck.
<apex:pagemessages>
    if ( Onboarding__c.Interested_in_invoicing_through_Himama__c == False) {
       Onboarding__c.Interested_in_invoicing_through_Himama__c.addError( 'You must enter a value');

}
  </apex:pagemessages>

There are about 6 fields that we need to have to be required for clicking this button. Thanks!

 
Hey there, I'm new to development and APEX classes, so apologies if this is easy. But basically we have Zuora package (for billing) and I'm updating one of the classes for default values when creating a quote. Most of the code works, except when I add in a reference to Billing Country on the Account it says it doesn't exist. My code for that particular part is below, and full code below that.

Error: 
Error: Compile Error: Variable does not exist: billingcountry at line 23 column 20
// Retrieve the account ID from the quote
      Id accountId = (Id) record.get('zqu__Account__c');
      
      List<Account>accounts = [SELECT Id, BillingCountry FROM Account WHERE Account.ID = :accountID];
      
      if (accounts.billingcountry == 'Canada')
      {
      record.put('zqu__PaymentGateway__c', 'Standard');
      } else {
      record.put('zqu__PaymentGateway__c', 'USD2');
      }
Full code:
global class ZuoraDefaultValues extends zqu.CreateQuoteController.PopulateDefaultFieldValuePlugin{  
   global override void populateDefaultFieldValue
(SObject record, zqu.PropertyComponentController.ParentController pcc)
   {    
      super.populateDefaultFieldValue(record, pcc);  
      
      //Populate default values in the quote header  
      Id OpptId = (Id) record.get('zqu__Opportunity__c');    
      List<Opportunity> Opportunity= [SELECT Id, Name FROM Opportunity WHERE Opportunity.Id = :OpptId ]; 
       
      record.put('Name', 'Quote For ' + Opportunity[0].Name + ' ' + Date.today().format());
      record.put('zqu__InitialTerm__c', 12);    
      record.put('zqu__RenewalTerm__c', 12);    
      record.put('zqu__ValidUntil__c', Date.today().addDays(30));    
      record.put('zqu__StartDate__c', Date.today());
      record.put('zqu__PaymentMethod__c', 'Credit Card');  
      
      // Retrieve the account ID from the quote
      Id accountId = (Id) record.get('zqu__Account__c');
      
      List<Account>accounts = [SELECT Id, BillingCountry FROM Account WHERE Account.ID = :accountID];
      
      if (accounts.billingcountry == 'Canada')
      {
      record.put('zqu__PaymentGateway__c', 'Standard');
      } else {
      record.put('zqu__PaymentGateway__c', 'USD2');
      }
    

      // Find the contacts associated with the account         
      List<Contact>contacts = [SELECT Id, Name FROM Contact WHERE Account.Id = :accountId];
      
      // Assuming the contacts are present set the billTo and soldTo to the first contact
      if  (contacts.size() > 0) {
         // System.debug('mp: about to add ' + contacts[0].Id + ' as a contact ID');
         record.put('zqu__BillToContact__c', contacts[0].Id);
         record.put('zqu__SoldToContact__c', contacts[0].Id);

         // Beforeretrieving  the lookup  options, needs to populate the map first
         super.setLookupOptions(pcc);
      
         // Now retrieve the lookup component options
         zqu.LookupComponentOptions billToOptions = super.getLookupOption('zqu__BillToContact__c');
         billToOptions.targetId = contacts[0].Id;
         billToOptions.targetName = contacts[0].Name;
         zqu.LookupComponentOptions soldToOptions  = super.getLookupOption('zqu__SoldToContact__c');
         soldToOptions.targetId = contacts[0].Id;
         soldToOptions.targetName = contacts[0].Name;
      }
   }
}

 
Hey there,

Lately I've been getting an error involving the Declaritive Rollup Helper, and it involves Zuora (which is our billing platform). I'm not sure how to troubleshoot this or where to begin. To my knowledge we didn't have any deployments (but we're having trouble deploying one now and I'm not sure if this is related).

Apex script unhandled trigger exception by user/organization: 0050a00000GdeoJ/00Dj0000001u8FQ

dlrs_Zuora_CustomerAccountTrigger: execution of AfterUpdate

caused by: System.NoAccessException: Entity is not api accessible

Class.dlrs.fflib_SObjectSelector: line 36, column 1
Class.dlrs.RollupSummariesSelector.CustomObjectSelector.<init>: line 102, column 1
Class.dlrs.RollupSummariesSelector.<init>: line 43, column 1
Class.dlrs.RollupService.describeRollups: line 992, column 1
Class.dlrs.RollupService.handleRollups: line 673, column 1
Class.dlrs.RollupService.triggerHandler: line 307, column 1
Trigger.dlrs_Zuora_CustomerAccountTrigger: line 7, column 1
We've recently moved to Salesforce Service Cloud (lightning) from Zendesk, and one of the useful things in ZenDesk is you can see if someone else is viewing a ticket (attached screenshot). I don't see anything like that in Salesforce, is there something that can be built that shows users viewing a case?

User-added image
Hey there,

I'm super new to developing with Salesforce - so it's entirely possible I missed something easy. But with this code as reference: https://help.salesforce.com/articleView?id=entitlements_auto_add.htm&language=en_US&type=0 - I put it in my sandbox as a Case Trigger. It saved correctly (I had to make some bracket changes), and says code coverage 0%.  However when I email for email-to-case, the active entitlement is not applied to the case. Code below...help? :)
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
trigger defaultEntitlement on Case (Before Insert, Before Update) {
   /*
   If the Entitlement Name is not set then, check to see if the Contact on the Case has an active Entitlement
    and select the first one.  If not then check to see if the Account on the Case has an active Entitlement.
   */
   List<Id> contactIds = new List<Id>();
   List<Id> acctIds = new List<Id>();
   for (Case c : Trigger.new){
      if (c.EntitlementId == null && c.ContactId!= null && c.AccountId != null){
         contactIds.add(c.ContactId);
         acctIds.add(c.AccountId);
      }
   }
   if(contactIds.isEmpty()==false || acctIds.isEmpty()==false){
      /* Added check for active entitlement */
      List <EntitlementContact> entlContacts = [Select e.EntitlementId,e.ContactId,e.Entitlement.AssetId From EntitlementContact e
                                                Where e.ContactId in :contactIds
                                                And e.Entitlement.EndDate >= Today And e.Entitlement.StartDate <= Today];
      if(entlContacts.isEmpty()==false){
         for(Case c : Trigger.new){
            if(c.EntitlementId == null && c.ContactId != null){
               for(EntitlementContact ec:entlContacts){
                  if(ec.ContactId==c.ContactId){
                     c.EntitlementId = ec.EntitlementId;
                     if(c.AssetId==null && ec.Entitlement.AssetId!=null)
                        c.AssetId=ec.Entitlement.AssetId;
                     break;
                  }
               } // end for
            }
         } // end for
      } else{
         List <Entitlement> entls = [Select e.StartDate, e.Id, e.EndDate, e.AccountId, e.AssetId
                                     From Entitlement e
                                     Where e.AccountId in :acctIds And e.EndDate >= Today And e.StartDate <= Today];
         if(entls.isEmpty()==false){
            for(Case c : Trigger.new){
               if(c.EntitlementId == null && c.AccountId != null){
                  for(Entitlement e:entls){
                     if(e.AccountId==c.AccountId){
                        c.EntitlementId = e.Id;
                        if(c.AssetId==null && e.AssetId!=null)
                           c.AssetId=e.AssetId;
                        break;
                     }
                  } // end for
               }
            } // end for
         }
      }
   } // end if(contactIds.isEmpty()==false)
}

 
Hey there,

We have the standard field "Name" for an object, and then a custom picklist Type field. We want to auto-populate the standard name with whatever the user picksf or the picklist, and then be able to change it if needed.

I can't create a new custom formula field because the Name is standard and cannot be removed, and it wouldn't be editable, any other thoughts?
We've recently moved to Salesforce Service Cloud (lightning) from Zendesk, and one of the useful things in ZenDesk is you can see if someone else is viewing a ticket (attached screenshot). I don't see anything like that in Salesforce, is there something that can be built that shows users viewing a case?

User-added image
Hey there, I got some help for this issue here (https://success.salesforce.com/answers?id=9063A000000tCRxQAM)- but still, don't fully understand how to do this. But I have the below code for a button that grabs parts of the Onboarding record to create another Onboarding record (of a specific record type).
<apex:page standardController="Onboarding__c" > <flow:interview name="Create_Billing_Onboarding" finishLocation="/{!Onboarding__c.Id}"> <apex:param name="AccountID" value="{!Onboarding__c.Account__c}" /> <apex:param name="AccountName" value="{!Onboarding__c.Account__r.Name}" /> <apex:param name="PricingTier" value="{!Onboarding__c.Opportunity__r.Pricing_Tier__c}" /> <apex:param name="OpportunityID" value="{!Onboarding__c.Opportunity__c}" /> <apex:param name="DateOfSale" value="{!Onboarding__c.Opportunity__r.CloseDate}" /> <apex:param name="ChildrenOnSubsidy" value="{!Onboarding__c.Children_on_subsidy__c}" /> <apex:param name="HowDoTheyCurrentlyBill" value="{!Onboarding__c.How_Do_They_Currently_Bill_Parents__c}" /> <apex:param name="HowAreTuitionFeesCalculated" value="{!Onboarding__c.How_are_tuition_fees_calculated__c}" /> <apex:param name="HowFrequentlyAreParentsBilled" value="{!Onboarding__c.How_frequently_are_parents_billed__c}" /> <apex:param name="HowManyChildrenOnSubsidy" value="{!Onboarding__c.How_many_children_on_subsidy__c}" /> <apex:param name="IfNoWhy" value="{!Onboarding__c.If_No_Why__c}" /> <apex:param name="InterestedInInvoicing" value="{!Onboarding__c.Interested_in_invoicing_through_Himama__c}" /> <apex:param name="WillRecordSubsidyOutsideHiMama" value="{!Onboarding__c.Will_they_record_subsidy_outside_Himama__c}" /> <apex:param name="BillingNotes" value="{!Onboarding__c.Billing_Notes__c}" /> </flow:interview> </apex:page>

And then triggers a flow. We want a validation rule that if some of the parts are bull then they get a message/pop up whatever to say it needs to be filled - like a Validation Rule.

I tried adding this piece of code to it and various tinkerings but no such luck.
<apex:pagemessages>
    if ( Onboarding__c.Interested_in_invoicing_through_Himama__c == False) {
       Onboarding__c.Interested_in_invoicing_through_Himama__c.addError( 'You must enter a value');

}
  </apex:pagemessages>

There are about 6 fields that we need to have to be required for clicking this button. Thanks!

 
Hey there, I'm new to development and APEX classes, so apologies if this is easy. But basically we have Zuora package (for billing) and I'm updating one of the classes for default values when creating a quote. Most of the code works, except when I add in a reference to Billing Country on the Account it says it doesn't exist. My code for that particular part is below, and full code below that.

Error: 
Error: Compile Error: Variable does not exist: billingcountry at line 23 column 20
// Retrieve the account ID from the quote
      Id accountId = (Id) record.get('zqu__Account__c');
      
      List<Account>accounts = [SELECT Id, BillingCountry FROM Account WHERE Account.ID = :accountID];
      
      if (accounts.billingcountry == 'Canada')
      {
      record.put('zqu__PaymentGateway__c', 'Standard');
      } else {
      record.put('zqu__PaymentGateway__c', 'USD2');
      }
Full code:
global class ZuoraDefaultValues extends zqu.CreateQuoteController.PopulateDefaultFieldValuePlugin{  
   global override void populateDefaultFieldValue
(SObject record, zqu.PropertyComponentController.ParentController pcc)
   {    
      super.populateDefaultFieldValue(record, pcc);  
      
      //Populate default values in the quote header  
      Id OpptId = (Id) record.get('zqu__Opportunity__c');    
      List<Opportunity> Opportunity= [SELECT Id, Name FROM Opportunity WHERE Opportunity.Id = :OpptId ]; 
       
      record.put('Name', 'Quote For ' + Opportunity[0].Name + ' ' + Date.today().format());
      record.put('zqu__InitialTerm__c', 12);    
      record.put('zqu__RenewalTerm__c', 12);    
      record.put('zqu__ValidUntil__c', Date.today().addDays(30));    
      record.put('zqu__StartDate__c', Date.today());
      record.put('zqu__PaymentMethod__c', 'Credit Card');  
      
      // Retrieve the account ID from the quote
      Id accountId = (Id) record.get('zqu__Account__c');
      
      List<Account>accounts = [SELECT Id, BillingCountry FROM Account WHERE Account.ID = :accountID];
      
      if (accounts.billingcountry == 'Canada')
      {
      record.put('zqu__PaymentGateway__c', 'Standard');
      } else {
      record.put('zqu__PaymentGateway__c', 'USD2');
      }
    

      // Find the contacts associated with the account         
      List<Contact>contacts = [SELECT Id, Name FROM Contact WHERE Account.Id = :accountId];
      
      // Assuming the contacts are present set the billTo and soldTo to the first contact
      if  (contacts.size() > 0) {
         // System.debug('mp: about to add ' + contacts[0].Id + ' as a contact ID');
         record.put('zqu__BillToContact__c', contacts[0].Id);
         record.put('zqu__SoldToContact__c', contacts[0].Id);

         // Beforeretrieving  the lookup  options, needs to populate the map first
         super.setLookupOptions(pcc);
      
         // Now retrieve the lookup component options
         zqu.LookupComponentOptions billToOptions = super.getLookupOption('zqu__BillToContact__c');
         billToOptions.targetId = contacts[0].Id;
         billToOptions.targetName = contacts[0].Name;
         zqu.LookupComponentOptions soldToOptions  = super.getLookupOption('zqu__SoldToContact__c');
         soldToOptions.targetId = contacts[0].Id;
         soldToOptions.targetName = contacts[0].Name;
      }
   }
}