• michaellee.ampf
  • NEWBIE
  • 25 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 18
    Replies

Hi.

 

I've got a kind of cross-scripting exercise that I'd like to see if I can fix.

 

I've got an authenticated site that collects information from Salesforce, and then submits to another site.  As part of that form submission, there's the URL that it returns to.  However, when it returns to the authenticated site, we lose track of all of the session information.  Is there a way to keep a hold of that session ID even though it goes through another page?

 

(Obviously some thought to security at a time like this would be good as well, but there's very little data that's visible in these accounts..)

 

Any ideas?


Thanks,

Michael

Hi,

 

We've noticed that there's a difference in the styling between a section on a standard page layout page and an apex:pageBlockSection on a Visualforce page.  Does anyone know if there's a way (probably using CSS) for the apex:pageBlockSection to have the same style as on a standard page layout page?

 

Thanks,

Michael





Hi,

 

I've got this working on Chrome, but it isn't working on Internet Explorer yet so I want to see what I can do.

 

I've got a custom VisualForce page that has an <apex:tabPanel>.  I'd like one of the <apex:tab> that are a part of that redirect to the standard contact page for a particular contact.  (I've got the ID.)  

 

I've got a controller function that returns a PageReference to the standard page;

 

public PageReference goToStandard() {
PageReference contactPage = new ApexPages.StandardController(con).view();
contactPage.setRedirect(true);
return contactPage;
}

 

Does anone have any suggestions ?

 

Right now my VisualForce page has the following code fragment, which appears to work in Google:

 

<apex:form >
<apex:actionFunction name="redirect" action="{!goToStandard}"
immediate="true" status="Loading" />
</apex:form>

<apex:tabPanel switchType="server" selectedTab="{!startingTab}"
id="ContactTabPanel" tabClass="activeTab"
inactiveTabClass="inactiveTab" value="{!startingTab}">
<apex:tab label="Contact" name="ConLink" id="tabLink"
onTabEnter="redirect();"
immediate="true"
></apex:tab>

...

</apex:TabPanel>

 

Does anyone have any suggestions on how this might work with Internet Explorer?  Note -- I can try a completely different approach if it accomplishes the goal, which is that clicking on a tab redirects to a standard page..

 

Michael

I'm struggling a little to find the necessary documentation to get started using the Authenticated Website profile & user licenses type.  How do I create new users?  Is the only way to do that is to create the user using Apex?  We don't need (or want) self-registeration in our use case -- we really want the bare minimum "user get username and password & is able to login..."

 

Ideally this is probably just a simple recipe and I'd be ready to go -- but I'm struggling figuring that out, even though I think it should be easy over all.

 

Michael

Hi,

 

We'd like to be able to capture the role of the owner on a custom object when the record is originally created.  (Since the owner role may change over time, even if the OWNER stays the same.)  

 

I'm looking, and I don't believe that I can do this through a workflow rule -- though I'd rather not have to get into a trigger if it isn't actually necessary.  (But I would believe that it might be.)

 

Thanks,

Michael

Hi,

 

i'm working on a visualforce page that will help mass-update opportunities.  For the sake of this discussion, you can assume that all of the opportunities are in a pageblock table, with the stage and expected closed date being editable.

 

I've got it so there's a button that will update all of the opportunities, but it will go ahead and update *all* of the opportunities -- including ones that didn't have any values changed.

 

How would you recommend building something so only the opportunities that are actually changed get updated?  I don't want to do some sort of very specific wrapper, because I'm taking advantage of the date picker that comes with <apex:inputField /> on an sObject field.

 

Thanks!

Michael Lee

Certified Salesforce Developer, Administrator

 

 

Hey,

 

This feels like a real 101 SOQL question to me, but I couldn't immediately figure out the best answer.

 

I'd like to be able to bring back all of the opportunities related to a specific contact using the contact role.  Obviously Salesforce does this all the time -- but I'm not sure what the best query to get that result would be.

 

I've got the basic query:

 

SELECT Description, Name, IsClosed, (SELECT OpportunityId,IsPrimary,ContactId FROM OpportunityContactRoles) FROM Opportunity

 

but I'm trying to figure out how to build a good WHERE clause so we only get the Opportunities for a specific set of Contacts.

 

I'm missing something obvious here, I'm sure.  Does anyone have any suggestions?

Hey,

 

I'm wondering if anyone has ever built a VF page that has somethign like two different list views, side by side.

 

The general idea is that we would like to have both a list of opportunities and a list of a custom object that keeps sales, and then build a tool that can help connect the two up. 

 

Thanks,

Michael

Hi,

 

I'm wondering if there is a way to do this in a way that doesn't pass the parameters on the query string.

 

I've got a StandardSetController filled with objects of one type.   I'd like to pass control over to another page, where it's based off of a StandardSetController of a different, but related type.  I've got the list of object IDs of that related type, so I can pass that list over.  I'd rather *not* pass that list through the query string, because then I'm limited by the number of object IDs I can pass on the query string.

 

Any thoughts? Anyone done anything like this?

 

Thanks,

Michael

Hi,

 

I've got a VisualForce page that currently is built around a CustomControllerExtention to create a PDF worksheet based on one Contact.

 

I highly recommend Quinton Wall's article -- http://wiki.developerforce.com/index.php/Creating_Professional_PDF_Documents_with_CSS_and_Visualforce -- and I used that as a strong reference in my own work.

 

This has been pretty successful, and I've now had a request to make it "bulk" -- so instead of just being a PDF for one Contact, they can generate the worksheets for several contacts in one PDF file.  Or to use Quinton's example, instead of generating a separate PDF for one Quote, be able to generate one PDF that contains several quotes. 

 

Imagine a button in a list view, where you select several quotes and then there is a list view button called "generate PDF" that will go through and generate a PDF with all of the selected quotes.

 

Obviously I'm going to have to refactor & rebuild the controller to make it support the bulk PDFs, but I'm wondering if people have suggestions about what the best approach is -- do I want to build another class that collects all of the data for multiple contacts?  Do I need to move from an extension to a distinct custom controller?  Or am I missing something obvious?

 

Thanks,

Michael

Hi,

 

I've got a VisualForce PDF page that I'd like to add some sort of audit trail on when the page is generated.

 

I've got an object created to store the data, and the code to insert the data I want to capture into the object, but it turns out that I'm not able to run DML within (say) the constructor of the controller to log that is being used.  Has anyone done this sort of audit trail before? If so, how did you do it? 

 

Thanks,

Michael

Hi,


I'm building an integration between salesforce and another, external, web based system. 

 

The general pattern is that Salesforce passes to the external system a URL, and then the external system calls on that URL to grab the information from within Salesforce.  I've got reasonable security in place, and everything works as it should.

 

However, right now I've got the record IDs passed in the URL.  That doesn't scale large enough, so I'd like to find some way to stash all of the IDs and be able to grab them when they come back.

 

Right now my plan would be to create a new custom object that can store all of the IDs so when the callback happens they can all be grabbed by a single ID.  That seems relatively straight forward, but I wanted to see if there were any other suggestions or recommendations. 

 

Hope the description is clear.

 

Thanks!

Michael

 

Has anyone been able to do watermarks with VisualForce PDF files using CSS?

 

I've got some, using a background image, but then if I have any tables with backrounds colors over it, the watermark is covered up.  I've tried to use the opacity in CSS, but that hasn't been working for me. 

 

 

Hi,

 

I know that I'm able to set page orientation for a VisualForce PDF document by having either

 

@page {
  size:portrait;

}

 

@page {
  size:landscape;

}

 

in the CSS file.  Now, what I'm wondering is if there is any way for me to have the first page of a PDF document in portrait, and the second page in landscape.  Is that possible?  Is it possible to set the style for a particular page?

 

Thanks,

Michael

I'd like to be able to use the ActivityHistories object to get the last five closed activities on a contact.  However, I'd like to be able to filter those, if possible, by the record types of the underlying Task and Event.  Is this possible through the ActivityHistories object, or am I going to have to query the Task and Event objects separately, and then combine it all together?

 

I've been playing around to see if I can get something in Force.com Explorer & playing around with SOQL, but no luck so far.

 

Does anyone have suggestions?

 

Thanks,
Michael

Hi,

 

I'm wondering if it is possible to do write SOQL that allows me to group by the year of a date-time value within an object.

 

I've simplified it for my posting here, but basically I've got a custom object Sale__c with two fields

 

Number(10,2)  AmountOfSale__c

DateTime         DateOfSale__c

 

I'd love to be able to do a SOQL query like the following:

 

[Select Year(DateOfSale__c) YearOfSale,

              SUM(AmountOfSale__c) TotalAmountOfSale

 from Sale__c s

 group by Year(DateOfSale__c)]

 

Something like this wouldn't work directly.  So then I thought about adding a formula field to the object that tried to get the year of the date of sale, but that didn't work either.  (As I get an error message that the formula field can't be grouped on. 

 

Obviously if I need to I can have the totalling done within Apex, and not the SOQL query, but I'd much rather have it done by SOQL instead so I wanted to see if anyone has any guidence or suggestions here.

 

Thanks,

Michael

 

 

Hi.

 

I've got a kind of cross-scripting exercise that I'd like to see if I can fix.

 

I've got an authenticated site that collects information from Salesforce, and then submits to another site.  As part of that form submission, there's the URL that it returns to.  However, when it returns to the authenticated site, we lose track of all of the session information.  Is there a way to keep a hold of that session ID even though it goes through another page?

 

(Obviously some thought to security at a time like this would be good as well, but there's very little data that's visible in these accounts..)

 

Any ideas?


Thanks,

Michael

Hi,

 

We've noticed that there's a difference in the styling between a section on a standard page layout page and an apex:pageBlockSection on a Visualforce page.  Does anyone know if there's a way (probably using CSS) for the apex:pageBlockSection to have the same style as on a standard page layout page?

 

Thanks,

Michael





Hi,

 

I've got this working on Chrome, but it isn't working on Internet Explorer yet so I want to see what I can do.

 

I've got a custom VisualForce page that has an <apex:tabPanel>.  I'd like one of the <apex:tab> that are a part of that redirect to the standard contact page for a particular contact.  (I've got the ID.)  

 

I've got a controller function that returns a PageReference to the standard page;

 

public PageReference goToStandard() {
PageReference contactPage = new ApexPages.StandardController(con).view();
contactPage.setRedirect(true);
return contactPage;
}

 

Does anone have any suggestions ?

 

Right now my VisualForce page has the following code fragment, which appears to work in Google:

 

<apex:form >
<apex:actionFunction name="redirect" action="{!goToStandard}"
immediate="true" status="Loading" />
</apex:form>

<apex:tabPanel switchType="server" selectedTab="{!startingTab}"
id="ContactTabPanel" tabClass="activeTab"
inactiveTabClass="inactiveTab" value="{!startingTab}">
<apex:tab label="Contact" name="ConLink" id="tabLink"
onTabEnter="redirect();"
immediate="true"
></apex:tab>

...

</apex:TabPanel>

 

Does anyone have any suggestions on how this might work with Internet Explorer?  Note -- I can try a completely different approach if it accomplishes the goal, which is that clicking on a tab redirects to a standard page..

 

Michael

I'm struggling a little to find the necessary documentation to get started using the Authenticated Website profile & user licenses type.  How do I create new users?  Is the only way to do that is to create the user using Apex?  We don't need (or want) self-registeration in our use case -- we really want the bare minimum "user get username and password & is able to login..."

 

Ideally this is probably just a simple recipe and I'd be ready to go -- but I'm struggling figuring that out, even though I think it should be easy over all.

 

Michael

Hi,

 

We'd like to be able to capture the role of the owner on a custom object when the record is originally created.  (Since the owner role may change over time, even if the OWNER stays the same.)  

 

I'm looking, and I don't believe that I can do this through a workflow rule -- though I'd rather not have to get into a trigger if it isn't actually necessary.  (But I would believe that it might be.)

 

Thanks,

Michael

Hey,

 

This feels like a real 101 SOQL question to me, but I couldn't immediately figure out the best answer.

 

I'd like to be able to bring back all of the opportunities related to a specific contact using the contact role.  Obviously Salesforce does this all the time -- but I'm not sure what the best query to get that result would be.

 

I've got the basic query:

 

SELECT Description, Name, IsClosed, (SELECT OpportunityId,IsPrimary,ContactId FROM OpportunityContactRoles) FROM Opportunity

 

but I'm trying to figure out how to build a good WHERE clause so we only get the Opportunities for a specific set of Contacts.

 

I'm missing something obvious here, I'm sure.  Does anyone have any suggestions?

I have setup the salesforce CTI demo adaptor and I see the phone icon next to phone fields on standard page layout. If I use inputfield tag on vf pages I don't see the phone icon for click to dial. Is there an option or setting for that to show up on vf pages. Please advise.

 

Thanks.

PK

Hi,

 

I'm wondering if there is a way to do this in a way that doesn't pass the parameters on the query string.

 

I've got a StandardSetController filled with objects of one type.   I'd like to pass control over to another page, where it's based off of a StandardSetController of a different, but related type.  I've got the list of object IDs of that related type, so I can pass that list over.  I'd rather *not* pass that list through the query string, because then I'm limited by the number of object IDs I can pass on the query string.

 

Any thoughts? Anyone done anything like this?

 

Thanks,

Michael

Hi,

 

I've got a VisualForce PDF page that I'd like to add some sort of audit trail on when the page is generated.

 

I've got an object created to store the data, and the code to insert the data I want to capture into the object, but it turns out that I'm not able to run DML within (say) the constructor of the controller to log that is being used.  Has anyone done this sort of audit trail before? If so, how did you do it? 

 

Thanks,

Michael

Hi,


I'm building an integration between salesforce and another, external, web based system. 

 

The general pattern is that Salesforce passes to the external system a URL, and then the external system calls on that URL to grab the information from within Salesforce.  I've got reasonable security in place, and everything works as it should.

 

However, right now I've got the record IDs passed in the URL.  That doesn't scale large enough, so I'd like to find some way to stash all of the IDs and be able to grab them when they come back.

 

Right now my plan would be to create a new custom object that can store all of the IDs so when the callback happens they can all be grabbed by a single ID.  That seems relatively straight forward, but I wanted to see if there were any other suggestions or recommendations. 

 

Hope the description is clear.

 

Thanks!

Michael

 

Hi,

 

I know that I'm able to set page orientation for a VisualForce PDF document by having either

 

@page {
  size:portrait;

}

 

@page {
  size:landscape;

}

 

in the CSS file.  Now, what I'm wondering is if there is any way for me to have the first page of a PDF document in portrait, and the second page in landscape.  Is that possible?  Is it possible to set the style for a particular page?

 

Thanks,

Michael

I'd like to be able to use the ActivityHistories object to get the last five closed activities on a contact.  However, I'd like to be able to filter those, if possible, by the record types of the underlying Task and Event.  Is this possible through the ActivityHistories object, or am I going to have to query the Task and Event objects separately, and then combine it all together?

 

I've been playing around to see if I can get something in Force.com Explorer & playing around with SOQL, but no luck so far.

 

Does anyone have suggestions?

 

Thanks,
Michael

Hi,

 

I'm wondering if it is possible to do write SOQL that allows me to group by the year of a date-time value within an object.

 

I've simplified it for my posting here, but basically I've got a custom object Sale__c with two fields

 

Number(10,2)  AmountOfSale__c

DateTime         DateOfSale__c

 

I'd love to be able to do a SOQL query like the following:

 

[Select Year(DateOfSale__c) YearOfSale,

              SUM(AmountOfSale__c) TotalAmountOfSale

 from Sale__c s

 group by Year(DateOfSale__c)]

 

Something like this wouldn't work directly.  So then I thought about adding a formula field to the object that tried to get the year of the date of sale, but that didn't work either.  (As I get an error message that the formula field can't be grouped on. 

 

Obviously if I need to I can have the totalling done within Apex, and not the SOQL query, but I'd much rather have it done by SOQL instead so I wanted to see if anyone has any guidence or suggestions here.

 

Thanks,

Michael

 

 

We have overidden our new and edit buttons for Cases to go to a custom visualforce page.  This was fine until now we want to utilize Record Types.  Now, regardless of the record type chosen, new cases go to the custom visualforce page instead of the page layout for the record type.  I am thinking that I need another VF page to act as a proxy to route the user to the correct page.  I have read a couple of forum posts but am unsure if they are applicable to my problem.

 

http://forums.sforce.com/sforce/board/message?board.id=Visualforce&thread.id=4875