• Geoff D
  • NEWBIE
  • 20 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I'm new to Visualforce and APEX coding but managed to create a working cloning VF page and controller for a custom object called Internal_Conversation_log. Each record is created by an agent as a notes field when they're done speaking with an Opportunity.  I needed the ability to clone these notes because sometimes we intentially clone a secondary Opportunity off the origional for process reasons. Irrelevant to explain.

The cloning (and also moving) part works great but I'm using the URL to pass in parameters which I manually pasted in the IDs. Example: https://c.cs12.visual.force.com/apex/MoveConvLogtoNewOpp?Oldid=006V0000004AHT9&FROMname=Test2&id=006V0000003nbnY&TOname=TEST+123

What I'd like to do is create a VF page where you can search and select 2 Opportunities that will be used as TO and FROM clones. Once both are selected the user is then directed to my cloning page which shows Opp 1's records in a top table, Opp 2's records at the bottom.

I'm not even sure where to start. I searched around for anything similar but couldn't find the right code to try and break down for my purpose. Any ideas out there? I can certainly use the current opp the user is in as Opp1 and just pass in that ID. Any ideas on how to go about this would be much appreciated.

Thanks in advance.


I've been unable to push to my scratch org or even list it in gitbash / CLI since yesterday. Looks like my token has expired but after a half day of Googling I can't find a solution for how to fix it when the issue is your gitbash won't connect (all I'm finding is how to fix the code in your APIs getting the similar messages).

I'm able to log in to my scratch org through the browser, but if I try to force:auth:web:login and pop the URL that way, I get an error about localhost. Below is what I'm getting in gitbash:

sfdx force:org:push -u -sfdx-tst
ERROR running force:source:push:  Error authenticating with the refresh token due to: expired access/refresh token

sfdx force:org:display
ERROR running force:org:display:  This org appears to have a problem with its OAuth configuration. Reason: invalid_grant - expired access/refresh token
username: test-ealg1mxwqs9w@example.com,
clientId: PlatformCLI,
loginUrl: https://CS69.salesforce.com,
privateKey: <Not Specified>

Try this:
Verify the OAuth configuration for this org. For JWT:
Ensure the private key is correct and the cert associated with the connected app has not expired.
Ensure the following OAuth scopes are configured [api, refresh_token, offline_access].
Ensure the username is assigned to a profile or perm set associated with the connected app.
Ensure the connected app is configured to pre-authorize admins.
 

I'm new to Visualforce and APEX coding but managed to create a working cloning VF page and controller for a custom object called Internal_Conversation_log. Each record is created by an agent as a notes field when they're done speaking with an Opportunity.  I needed the ability to clone these notes because sometimes we intentially clone a secondary Opportunity off the origional for process reasons. Irrelevant to explain.

The cloning (and also moving) part works great but I'm using the URL to pass in parameters which I manually pasted in the IDs. Example: https://c.cs12.visual.force.com/apex/MoveConvLogtoNewOpp?Oldid=006V0000004AHT9&FROMname=Test2&id=006V0000003nbnY&TOname=TEST+123

What I'd like to do is create a VF page where you can search and select 2 Opportunities that will be used as TO and FROM clones. Once both are selected the user is then directed to my cloning page which shows Opp 1's records in a top table, Opp 2's records at the bottom.

I'm not even sure where to start. I searched around for anything similar but couldn't find the right code to try and break down for my purpose. Any ideas out there? I can certainly use the current opp the user is in as Opp1 and just pass in that ID. Any ideas on how to go about this would be much appreciated.

Thanks in advance.


Hi,

I have master detail relationship with contact and custom object BroadBandCustomers .

So, i have used a subquery to fetch few details from custom object . i would like to know how to display sub query value in visualforce page . I am getting values .... tested in workbench. 

Here is my query:

SELECT Homeroom__c ,Phone  ,Number_of_calls__c ,

(SELECT id FROM BroadBandCustomers__r ORDER BY HSI_Stage_Date__c)

 FROM Contact  ORDER BY LastName, FirstName

 

On a VF page, I have a pageBlockTable.  There are times where there are more than 1000 records in the collection to be rendered.  When this occurs, the Visualforce collection limit of 1000 is hit and the page doesn't load.  I need to figure out a creative solution for getting around this.  In the end...

 

  1. I need all records to render on the page. If I do any pagination, it'll happen client-side after the records are loaded in the HTML.  I know the first responses to this will be about whether I really need to have all those records on the page and how there is doubt about whether I need to, but for the purposes of this forum post, please work with me here.
  2. I want to keep the look and feel of a pageBlockTable if possible.

 

When not using pageBlockTables, I have used a construct similar to the following to get through a collection of more than 1000 items.

 

<apex:repeat value="{!myCollection}" var="item" rows="1000" first="0">
{!item.text}
</apex:repeat>
<apex:repeat value="{!myCollection}" var="item" rows="1000" first="1000">
{!item.text}
</apex:repeat>
<apex:repeat value="{!myCollection}" var="item" rows="1000" first="2000">
{!item.text}
</apex:repeat>

 

pageBlockTable has the rows and first parameters, but if I do that, I'd be getting a new pageBlockTable everytime.

 

The options I can think of are:

 

  • Get a creative solution from the forums to actually utilize the pageBlockTable (purpose of this post)
  • Use apex:dataTable and try to use style classes to mimix the pageBlockTable look and feel. This is a nice possibility I haven't tried yet.
  • Use apex:repeat tags and make up my own HTML styling

 

Any help is appreciated.

 

 

  • September 13, 2010
  • Like
  • 0