Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8384641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:27:18+00:00 2026-06-09T17:27:18+00:00

Hello , I have a issue at the moment and I am not able

  • 0

Hello,
I have a issue at the moment and I am not able to solve it.

Problem: I have 2 classes at the moment for example class A and Class B. Inside class A I have a for loop running on Accounts.

Class A{
    for(Account t: listAccounts){
         String abc = t.Name;
         String URL = 'http://testURL.com/test?q1='+t.id+'&q2='+t.Name.......till q50';
    }
}

So everytime this for loop runs on an account, it generates a new URL. I want a way to pass this URL from the for loop to another class which displays it on a VF page. So, the class B is the controller of the VF page.

The URL is going to be more than 500 characters long so its not possible to pass it as a custom setting and retrive it on the other controller.

Class B{
       public String getURL(){
         //Somehow fetch that URL everytime the loop runs 
         return URL;
       }
}

Now, the VF page will call this controller class B to retrieve the URL and display it as a output link.

What I have tried: I have tried to use getters and setters but it did not work. Why? because the VF page strictly calls a getURL() method with no parameters.

I also tried to save it in a custom setting but since the length is so long it would not be possible!

Please help. Any kinds of helps will be much appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:27:20+00:00Added an answer on June 9, 2026 at 5:27 pm

    Thanks guys for the help but the only way out I could find is saving it on a custom object which has a look up on Account and then doing a SOQL to get it in the Class B.

    Thanks for the help guys!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello friends I have an issue adding a special class to a couple of
hello i have a silly issue, my link isn't shown. i use the same
hello fellow java developers. I'm having a bit of an issue here. I have
Hello I have like this 2 tables class User public int UserId{get;set;} { ....
Hello I have an issue deploying my silverlight project to an existing website (normal
Hello i have the this problem, i need your help to figure out what
Possible Duplicate: NSNumber retain count issue Hello, I have the following code: NSNumber *number
Hello I have this code I am trying to fix, the issue is that
Hello have following strange issue, can vertical center the menu text if it's one
Hello and good day to all. I have an issue on coding, i have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.