• clouduser
  • NEWBIE
  • 170 Points
  • Member since 2012

  • Chatter
    Feed
  • 6
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 27
    Questions
  • 43
    Replies

Hi guys,

 

I'm trying to write a query selecting top 5 sales persons, this doesn't work:

 

SELECT SUM(Amount)AmountSum,OwnerId FROM Opportunity GROUP BY OwnerId ORDER BY AmountSum DESC LIMIT 5

 

What is the way to sort by aggregate column? I've been searching for almost an hour now but I'm nowhere closer. 

Need to find the records count of all the objects in the org. I have tried using Dynamic SOQL in a VF page (readonly) but hitting the limits of the SOQL queries. Any other thoughts?
Any ideas to open the visualforce tab in a complete new window or tab? If I click on the tab, it should directly open it in a new window. please let me know your thoughts.
We have a junction object ABC with a custom field i.e. Year (Picklist value) and we also have another field i.e. Branch (Text). This object has a lookup relation to other 2 custom objects i.e. BCD and CDE. Those objects also have same picklist fields and text fields. We need to make sure that we show the lookup results based on Year and Branch. Need to create the lookup filters criteria from the Junction Object to other related objects. Text field is not supported in lookup filters from source object. Are there any alternatives? Let me know your thoughrs....
https://help.salesforce.com/HTViewHelpDoc?id=fields_lookup_filters.htm
Salesforce doesn't send an email to the user when chatter @ mentioned user doesnt have access to the specific record. We are able to grant the record access to the user by using apex sharing but user is unable to receive the chatter @ mentioned message. Let me know if there are any thoughts to invoke the email alert even though doesnt have access to the record..

hi all,

 

for outbound messages, is there way to choose the endpoint url as a same salesforce org url...? i want to use the same salesforce org for sending and receiving the messages? 

 

please let me know your thoughts..appreciate any help!

Hi All,

 

We have 2 approval processes with 15 steps in first process and 5 steps in second process. (total = 20 steps). After completion of the first process, trigger will kick off the second process. It works fine when all steps are approved. It doesnt work when it is rejected in 16th step, it doesnt go back to the 15th step for approval. Any thoughts to resolve this issues?

 

Appreciate your help!

 

regards

 

Any thoughts to share the record to the user whom we mentioned @someone in the chatter posting. I know we can do somethng with the feeditem trigger.

 

I am facing an issue with the Chatter:feed tag when I used it in HTML5 VF jquerymobile page. It doesn't allow me to add the link. Any thoughts? It doesn't allow me to enter the text in textbox (not enabled)...Anybody is facing the same issue...looks like properly rendered in jquerymobile vf page. let me know your thoughts. appreciate your help!

Hey,

 

I have 2 visualforce pages..first page will list the records from SFDC using SOQL query with some conditions. Second vf page to display the details of the respective record when user clicks on the record. I just want to include the feature of next/previous record links on the 2nd vf page i.e. detailed page.

any thoughts?

 

regards

 

I am facing an issue with the Chatter:feed tag when I used it in HTML5 VF page. It doesn't allow me to add the link. Any thoughts? It doesn't allow me to keyin the text in textbox (not enabled)...Anybody is facing the same issue...let me know your thoughts. appreciate your help!

I have noticed a strange behavior in HTML5 visualforce chatter:post page after summer'13 release. When we try to keyvin some content in text box using chatter:post, it will increase the text box size automatically (1 line). let me know if any one face same issue. appreciate your help!

I would like to disable the link-based buttons for the particular group of users in HTML5 jquerymobile vf page. any thoughts?

I would like to disable the link-based buttons for the particular group of users in HTML5 jquerymobile vf page. any thoughts?

Timesheet_week__c (Date field) should be 'Monday'. If the user is creating/updating the record, it should validate below things.

If the record is created/updated before Friday COB, it should allow the user to choose the current Monday or future monday also.

If the record is created/updated after Friday COB, it should allow the user to choose the future Monday only. 

 

Let me know your thoughts.

 

 

I am facing an issue with the Chatter:feed tag when I used it in HTML5 VF page. It doesn't allow me to add the link. Any thoughts? It hangs sometimes when i switch between link, post, file or etc...Anybody is facing the same issue...let me know your thoughts. appreciate your help!

I am facing an issue with the Chatter:feed tag when I used it in HTML5 VF page. It doesn't allow me to add the link. Any thoughts? It hangs sometimes when i switch between link, post, file or etc...Anybody is facing the same issue...let me know your thoughts. appreciate your help!

rerender the detail page for a record when we select the record that was displayed in visualforce page using enhancedlist view

Any thoughts/examples to accomplish this? 

 

<apex:page controller="CustomController">
<apex:enhancedList type="Custom_object__C" height="300" rowsPerPage="10" id="ObjectRecordsList" />
<apex:outputpanel id="detail">
<apex:pageblock>
<apex:pageblocktable >
//rerender this details page based on the particular record selection in above records listing........?

</apex:pageblocktable>
</apex:pageblock>
</apex:outputpanel>
</apex:page>

need to build the visualforce console as like regular console...page should display as below.

List View drop down - block 1

List of records rendered based on the list view. - block 2

click on the record (in block 2) to see the detail page in block 3(rendered based on the record selection).

I have seen some of the console examples but not related to this.

let me know any thoughts. appreciate your help.

 

Regards.

Hi All,

 

I see the strange thing in permission sets. I can't see 3 of the permission sets in Salesforce UI but i can see those permission sets thru PermissionSet API. I don't know why can't we see those 3 permission sets in salesforce standard UI i.e. Administration Setup -> Manage Users -> Permission Sets.

 

Please let me know if you have any thoughts.

 

thanks

Hi All,

 

I see the strange thing in permission sets. I can't see 3 of the permission sets in Salesforce UI but i can see those permission sets thru PermissionSet API. I don't know why can't we see those 3 permission sets in salesforce standard UI i.e. Administration Setup -> Manage Users -> Permission Sets.

 

Please let me know if you have any thoughts.

 

thanks

Need to find the records count of all the objects in the org. I have tried using Dynamic SOQL in a VF page (readonly) but hitting the limits of the SOQL queries. Any other thoughts?
Any ideas to open the visualforce tab in a complete new window or tab? If I click on the tab, it should directly open it in a new window. please let me know your thoughts.
We have a junction object ABC with a custom field i.e. Year (Picklist value) and we also have another field i.e. Branch (Text). This object has a lookup relation to other 2 custom objects i.e. BCD and CDE. Those objects also have same picklist fields and text fields. We need to make sure that we show the lookup results based on Year and Branch. Need to create the lookup filters criteria from the Junction Object to other related objects. Text field is not supported in lookup filters from source object. Are there any alternatives? Let me know your thoughrs....
https://help.salesforce.com/HTViewHelpDoc?id=fields_lookup_filters.htm

Hi All,

 

I have a requirement to do the javascript in the Onkeyup event on RichTextArea in VF page. But the script am trying to load is working properly in the normal inputtextarea, if i gave richtext="true" then it is not working. Please help me to do this.

 

See the following code,

 

VF page

<apex:page >
<apex:includeScript value="{!$Resource.jquery}"/>

<script type="text/javascript">

function check(f){
alert("f");
}
function check1(f){
alert("f");
}
</script>

<apex:form id="frm1">
<apex:inputtext id="one" onkeyup="return check(this);"/>  //This is not working
<apex:inputtextarea richtext="true" id="e" onkeyup="return check1(this);"/> //This is working
<apex:commandbutton id="n" value="save" disabled="true"/>
</apex:form>

</apex:page>

 

Waiting for the solution.

 

Thanks  in Advance.

 

 

 

 

hi all,

 

for outbound messages, is there way to choose the endpoint url as a same salesforce org url...? i want to use the same salesforce org for sending and receiving the messages? 

 

please let me know your thoughts..appreciate any help!

Hi All,

 

We have 2 approval processes with 15 steps in first process and 5 steps in second process. (total = 20 steps). After completion of the first process, trigger will kick off the second process. It works fine when all steps are approved. It doesnt work when it is rejected in 16th step, it doesnt go back to the 15th step for approval. Any thoughts to resolve this issues?

 

Appreciate your help!

 

regards

 

Any thoughts to share the record to the user whom we mentioned @someone in the chatter posting. I know we can do somethng with the feeditem trigger.

 

I have the following Button below that opens a page to add a new record for "Drugs__c".  It pre-populates the Account field on the page, but I also want to auto populate the DrugsName (Name (text)) field  with the following text, "default".  I dont want our users to worry about filling in this field since it will be overrided with a naming convention using Workflow/FieldUpdate once the record is saved.  

 

Highlighed in red is the id of the field name, "Drugs Name" in the custom object "Drugs__c".  The code is not working properly and not populating the Drug Name field.  Suggestions how to correct this.  

 

 

/a0J/e?CF00NZ0000000etH2={!Account.Name} & CF00NZ0000000etH2_lkid={!Account.Id}&retURL=%2F{!Account.Id}&01IZ00000008qBS="default"

 

 

  • December 02, 2012
  • Like
  • 0

I've a requirement that as soon as home page load, it should automatically display  public calendar, without needing to click anywhere. 

 

For this, I'm trying to use Iframes. But problem is , I'm not able to find any link which just display 'just' calendar. Currently, what I do is.. I change the calendar type at home page to public calendar and grab the link from browser address bar. But  this link displays many things with public calendar( banner, all tabs, side bar etc). 

 

As a result, when Iframe loads, it also displays all those stuffs which I dont want;  Any idea, what I can do 

My link is this: 

 

https://ap1.salesforce.com/00U/c?cType=1&cal=MyPublicCalendar&cal_lkid=02390000000CPdb&cal_lkold=MyPublicCalendar&cal_lspf=1&md0=2012&md1=3

Is it possible to add public calendar to visual forca page with some standard controller and ID?

 

Click to "change button" is very uncomfortable way and I want to just show visualforce page with one click tab.

  • January 06, 2011
  • Like
  • 0

Does anyone know how to embed a Salesforce public calendar on the home page?  I am currently using a link but I believe it would be much for beneficial for our reps to see the public calendar displayed upon logging in.

 

Thanks!

Thought I'd pass this little set of snipets on.  Have had clients asking us how to implement a Next and Prev button on some objects.  The concept being that if I'm looking at say an invoice I want to just easily go to the next one or previous one while still in that object instead of having to go back to the list view.  So we built the following.  The movement from one record to another is based on an invoice number field but you could modify to do it based on other fields as appropriate and you could also add a limiting factor to only records based on the owner that's running this.

 

 

VisualForce page component code


<apex:pageBlockButtons >
<apex:commandButton value="Prev" action="{!prev}" rerender="page" immediate="true" />
<apex:commandButton value="Next" action="{!next}" rerender="page" immediate="true" />
</apex:pageBlockButtons>

 

 

 

Apex controller code (this assumes you're adding to an existing controller extension class and you must initialize Allids in your init class by calling getListofIds() and we also have a generic utility that scans a list to see if it contains a field called Utils.SetContains)


Id oppid;
String invoiceno;
List <Id> Allids = new List <Id>();

 

public List<Id> getListofIds()
{
Billing__c[] billingids;
List <Id> ids = new List <Id>();

billingids = ([SELECT Id FROM Billing__c WHERE Invoice_Number__c < :invoiceno ORDER BY Invoice_Number__c DESC LIMIT 1]);
for (Billing__c b : billingids) {ids.add(b.id);}
ids.add(entry.id);
billingids = ([SELECT Id FROM Billing__c WHERE Invoice_Number__c > :invoiceno ORDER BY Invoice_Number__c LIMIT 1]);
for (Billing__c b : billingids) {ids.add(b.id);}
return ids;
}

public PageReference next()
{
Id nextid;
Integer idlocation = Utils.SetContains(System.currentPageReference().getParameters().get('id'), Allids);
if (idlocation != -1) {if (idlocation < Allids.size() - 1) {nextid = Allids[idlocation + 1];} else {nextid = AllIds[AllIds.size() - 1];}}
else {nextid = System.currentPageReference().getParameters().get('id');}
PageReference pageRef = new PageReference('/'+nextid);
pageRef.setRedirect(true);
return pageRef;
}

public PageReference prev()
{
Id previd;
Integer idlocation = Utils.SetContains(System.currentPageReference().getParameters().get('id'), Allids);
if (idlocation != -1) {if (idlocation != 0) {previd = Allids[idlocation - 1];} else {previd = AllIds[0];}}
else {previd = System.currentPageReference().getParameters().get('id');}
PageReference pageRef = new PageReference('/'+previd);
pageRef.setRedirect(true);
return pageRef;
}

 

Message Edited by dkorba2k5 on 04-27-2009 12:50 PM
Is it possible to add an event to a public calendar via apex or the API in general?  I could try it myself, but it's much quicker to ask.

Once I've added an event to a public calendar via the standard UI, I can pull up the record in Apex Explorer etc. and see that it's put in the public calendar ID as the OwnerID, but don't know if apex will let me write that value directly.  (I've noticed that one quirk of the standard UI is that while I can create an event in the public calendar if I start from that calendar, I can't take an existing event and move it to a public calendar by typing the name of the calendar in the Assigned To field (which I assume corresponds to OwnerID.)   I want to make sure there aren't similar limitations on edits for apex.

And is there any way to pull up a list of public calendars and their ID's?  I don't see the object anywhere in the scema explorer.

Thanks much!

  • November 14, 2007
  • Like
  • 0