• viv5586
  • NEWBIE
  • 25 Points
  • Member since 2012

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

Hi,

 

I have a multi select picklist with different values. I want when other is selected from multiselect picklist, and other__c(text field) is empty, it should give an error message.

 

How to implement this in visualforce page?

 

Any help is appreciated.

 

Thanks.

When sending a mail from salesforce, The salesforce user will not come to know whether the mail is sent to customer or not.

Need a solution : when a mail is sent to customer , If it is not delivered , it should revert it back to salesforce. How we can achive this.

 

Please help me on this

what  is transient keyword ....how to use in transient key word in salesforce

 

How can we rename the salesforce SITES NAME for enterprise edition????

Hi all,

 

I have a custom object that associates two other objects (room and reservation).

 

When clicking on the Reservation detail page on New association, and then saving the association I find myself on the association page, but I want the user to be redirected back to the reservation detail page where he started.

 

Any idea on how to do this?

 

Thanks

Hello,

 

I am trying to create a few charts in a VF pageusing the controller below.  However, I am getting an error:

 

Error: theController Compile Error: Constructor already defined: <Constructor>() at line 24 column 10

 

I assume this means my structure is incorrect, but I don't know what I need to do to fix it.  Can someone advise?  Thanks.

 

 

public class theController {

//Empl Top 10 by Revenue
public list<Scorecard__c> Dashboard1 { get; set; }

public theController() {
Dashboard1 = [SELECT id,Name,Client_Name__c,Type_of_Client__c,Projected_Annual_Revenue__c,Overall_Percent__c,Overall_Score__c,Overall_Status_Icon__c,Renewal_Date__c
FROM Scorecard__c
WHERE Type_of_Client__c <> 'HP'
ORDER BY Projected_Annual_Revenue__c DESC limit 10];
}

public AggregateResult[] getChartData() {

return [SELECT Overall_Status__c Status, SUM(Projected_Annual_Revenue__c) Revenue
FROM Scorecard__c
GROUP BY Overall_Status__c];
}

 

//HP Top 10 by Revenue
public list<Scorecard__c> Dashboard2 { get; set; }

public theController() {
Dashboard2 = [SELECT id,Name,Client_Name__c,Type_of_Client__c,Projected_Annual_Revenue__c,Overall_Percent__c,Overall_Score__c,Overall_Status_Icon__c,Renewal_Date__c
FROM Scorecard__c
WHERE Type_of_Client__c = 'HP'
ORDER BY Projected_Annual_Revenue__c DESC limit 10];
}

public AggregateResult[] getChartData() {

return [SELECT Overall_Status__c Status, SUM(Projected_Annual_Revenue__c) Revenue
FROM Scorecard__c
GROUP BY Overall_Status__c];
}

}

  • December 10, 2012
  • Like
  • 0

Hi,

 

I have a multi select picklist with different values. I want when other is selected from multiselect picklist, and other__c(text field) is empty, it should give an error message.

 

How to implement this in visualforce page?

 

Any help is appreciated.

 

Thanks.

hello,

does anyone know if it is possible for me to block out some dates on my calendar, so it shows something like "out of office" or "busy" on the calendar?

That is extremely necessary, because another person schedules meetings for me, and I have to have a way to show this operator not to schedule some dates I am already busy (for example, Doctor´s appointment, vacation time or anything like that).

Thank you!

If I got to Setup > Security Controls > View Setup Audit Trail it shows me the latest 20 entries in the Setup Audit Trail and then gives me a link to download.  The link points here...

https://cs9.salesforce.com/servlet/servlet.SetupAuditTrail?id=00DK00000005aWf&_CONFIRMATIONTOKEN=dOUnmTlmtqUZPNu7EOgn.a536Ro9n4y8dNm1HVAg6X0qvTV197yHr0gnXSRwtrZlBE83jt1N4tJpj7REbXe9FFrwwOIoVjtp36uWOxVEpog9Wun02xj0WxOb3KWESCX.KPtV8S4HM096LLL51SqrIzxDDR227YUp0vL4qHeGk27VjXyz

The id is the SFDC Org Id.  I need to programmatically gain access to this log, there are three ways I see this being possible...

-Download the log a different way

-Find out what the CONFIRMATIONTOKEN is and how I can generate it

-Access the Setup Audit Trail directly somehow with out needing to download the full log

 

Do anyone have any insite into how I can make any of these three methods work?

Does anyone know how I can delete an attachment on a VF page by just using a link? I allow my users to upload images to be displayed and I want them to be able to just click a link or small button that allows them to delete the image.

 

I know I can use the <apex:listViews type="attachment"/> and see all the attachments and get the Edit | Del | View but I just want the delete button. While working with my DE account I was able to use this:

 

 

<apex:repeat value="{!Member__c.attachments}" var="attachment" rows="1" first="0"> 
    
<a href="/setup/own/deleteredirect.jsp?delID={!attachment.ID}" onclick="confirmation4()">Delete</a>

<img src="{!URLFOR($Action.Attachment.Download, attachment.Id)}"/>
</apex:repeat>

 

 

and I was able to delete with no issues. But with keeping this same code in my Enterprise Production Trial it doesn't seem to work. I highlighted the delete link in the listview to get the URL and created this link:

 

<a href="/setup/own/deleteredirect.jsp?id={!Member__c.id}&delID={!attachment.ID}">Del.</a>

 

but I keep getting an error message saying "The attempted delete was invalid for your session. Please confirm your delete." and then there's a delete link right below but I click on it and nothing happens.

 

Any ideas? I'm stuck.... Thanks!

  • August 09, 2010
  • Like
  • 0

Three days after a particular condition is met, I need to send an email message that includes a PDF attachment. I've set up workflow to do a field update when the time-based condition is met. I have a trigger that detects the field update and generates the email message.

 

To generate the PDF attachment, the trigger has to get a PageReference to the VF page, and then call either getContent() or getContentAsPDF(). Unfortunately, these methods aren't supported in a trigger.

 

[Actually, the documentation says that getContent() isn't supported in a trigger, but it doesn't say the same thing about getContentAsPDF(). It makes sense that, if getContent() isn't supported, neither is getContentAsPDF(), but the documentation should say so. But I digress.]

 

Since the documentation doesn't say anything about getContent() not being supported with @future methods, I wrote an @future method that generates the PDF and sends the email, and changed my trigger to call that. But apparently getContent() doesn't work from an @future method. 

 

[Interestingly, getContent() fails differently when called from a trigger than it does when called from @future. When called from a trigger, getContent() throws an exception. When called from an @future method, getContent() doesn't fail -- it just generates a blank PDF, which is the same the thing doc says it does when called from a unit test. But again, I digress.]

 

Because of the time-based nature of the condition that causes the email to be sent, I need to use workflow to detect the condition. The PDF attachment is complex enough that it needs its own VF controller, so I can't use a messaging:attachment, and I can't use a workflow email action. I need to use a trigger to send the email. Any suggestions on how I can get a trigger to construct and send this email message with its attachment?

 

  • February 05, 2010
  • Like
  • 0