• Rabbani Basha 1
  • NEWBIE
  • -1 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
uninstall package salesforce how we can remove dependency components dynamically
Hello, I got a question for retriving data. For example, if I use code like this: <apex:outputtext value="{!Case.Owner.Name}" /> and I can get a text show on my web page. But how can I know where does each value after dot come from, is that simply (object name) . (field name) . (data wanna retrive). But how can I know the exact name of data that I wanna retrive?  The example I showed is a bad example, cuz I assume that the name of data I wanna retrive maybe call Name, yet I dont know where to find it.     Thanks for helping.
Hello,

I am neew to Apex coding and am struggling with the tresting.  I created a class to filter accounts by record type that returns the results correctly.  I have written a test class, but I am receiving an error message  that reads "Constructor not defined: [ApexPages.StandardSetController].()".  I am not able to figure out or find the solution to fix this error.  Below is the code from the test class:

@isTest
public class TestFilterAccountSummary {
 static testMethod void myAccountFilterTest() {

    Account acc = new Account(Name='Test Account');
    insert acc;
   
     Test.StartTest();
      ApexPages.StandardSetController sOC = new ApexPages.StandardSetController();
        sOC.setSelected(new List<Account>{acc});
        FilterAccountSummary fAS = new FilterAccountSummary(sOC);

     Test.StopTest();
   
    }
}

The error is in line 9 which I have ubderlined in the code above.

I have also posted the code for the Apex class that I am testing below: (This code is working as expected, but thought it may be helpful)

public class FilterAccountSummary {
    public ApexPages.StandardSetController Acc {
        get {
            if (Acc == null){
                Acc = new
                    ApexPages.StandardSetController(Database.getQueryLocator(
                        [Select
                        Id,
                        Name,
                        RecordType.Name,
                        Industry
                        From Account
                        Where RecordType.Name In ('Standard BDAP')]));
            }
            return Acc;
        }
        set;
    }
    public List <Account> getAccounts(){
        Return (List<Account>) Acc.getRecords();
    }

}

Thank you in advance for your help,
Jim

Trying to standardize our greeting in all of our Email Templates used in responses, and we want to simply have a custom function that when added to an email template will look like:

 

Hi,

Thank you for contacting us.

 The challenge with using the BR() tag is that it actually inserts as:

 

Hi,<br>Thank you for contacting us.<br>

 Which obviously won't render properly in a text email.

 

I've tried adding in \r\n, \n, just adding a carriage return in my formula, but can't seem to get any of that to work. Also tried the following, but no luck.

("Hi," & '\n' & "Thank you for contacting us." & '\n')

 

Any thoughts?

 

 

 

 

I have a text formula to which I would like to add a carriage return/line break.  I tried concatenating chr(13) and chr(10), but the validation didn't like it.  Is this possible?