• Auyon
  • NEWBIE
  • 45 Points
  • Member since 2011
  • Solution Architect
  • HCL Technologies

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

Hi -

 

I have a requirement to display the number of open reservations an account has in the Accounts tab. To get the number I will need to join the Accounts Contacts and Reservations and then get the number of records. Basically Accounts -> Contacts -> Reservations (Open status)

 

1. Can I place a custom field as a formulae and do this?

 

2. Some discussion boards talk about a roll up field but that seems to be limited only to Accounts -> Contacts

 

Any suggestion on the best way to get this done is welcome.

 

Thanks is advance for your time.

 

Regards,

Pradhip. S

 

 

Hi

 

I am seeking information regarding possible solutions to share video streams through chatter. Videos which may be hosted in any public site, much like what we do in other commericial social networking sites like Facebook or Orkut.

 

Please advice.

 

Regards

Auyon

  • May 27, 2011
  • Like
  • 0

Hi, 


I am creating a custom app which has four custom object and the first 
three are master object for the fourth one. 


In the fourth object (i.e. the child of all the other object) I would 
like to create a "Related To" field, this field would have one drop 
down to select which object type (one of the three custom objects)  I 
want to relate it to and the second field a lookup for the record to 
which it would be related. 


This feature is already there in events and tasks object. I want to 
replicate the feature in custom object. 


I know this would be a customization, however, I am trying to debate 
on best probable ways to do this. 


Please help. 


Regards 
Auyon

  • May 06, 2011
  • Like
  • 0

Hi,


I am new to Visualforce, I would like to get to a simple visualforce page which show a detail view of my record and show only selected related lists below. But I am unable to make the related list hover link at the top of the page to be as per the selected list, it either shows all or none.

 

E.g. In a Accounts Details page, if I use the following code it shows all the related list links

 

<apex:page standardController="Account">
<apex:detail relatedListHover="true" relatedList="true"/>
<apex:relatedList list="Cases" />
<apex:relatedList list="Contacts" />
</apex:page>

 

But I need only the hover links for Cases and Contacts at the top.

 

Please advise

 

Regards

Auyon

  • February 17, 2011
  • Like
  • 0

I am generating a quote pdf in salesforce using VF. When I genearate a pdf this should save inside a given directory in local system. I know this is something strange but anybody has a workaround for this. Thanks in advance

Hello,

 

In Apex, at runtime we want to check if Object obj is of type Set or List where the type of elements in Set/List can be anything like String, Integer etc. 

 

obj (of type Set<String>) instanceOf Set<Object> returns false and we want to avoid having if statements for each possible type of set. 

 

Any pointers would be of great help.

 

-Sayali

  • October 16, 2013
  • Like
  • 0

Hi, 

 

      I have a treeview in leftside. if i click  any of the link from tree view. i want to display a related records in right side.  its working properly. But the problem is after click the treeview link the page gets reload and the tree view get collapsed.  i want to reload only right side. not the whole page. Is there any possiblities are there?

  • October 16, 2013
  • Like
  • 0

Is it possible to access data that has been loaded into an instance of a class once it has been instatiated, from outside the class? I have a class that pulls some data from the database, puts it into a wrapper class, sorts it, and stores into a map. From a separate class, I want to be able to access the data from the map using a key value that is an instance variable in said class. I imagine this is a programming methodology that isn't exclusive to Apex, but is something like this possible?

 

A static method won't work because obviously I can't access instance data, and so I would have to replicate the data polling, wrapping, sorting and storing behavior within it, which I want to avoid. I also tried extending the class that wants to access the data from the initial class, but that doesn't work because when an instance of the second class is created, the first class is also instantiated again, which would be redudant. 

 

Definitely would appreciate some insight into this. Let me know if this doesn't make sense and/or want to know the use case behind this.

 

Thanks

We have custom settings and an APEX class that is returning zero records after October 12th.

The day that Winter 14 was implemented in our production environment.
 Up to that day we would average about 10 emails a day from this approval process.

 

The select statement that returns zero is 
EmailTemplate template = [ 
select id 
from EmailTemplate 
where developerName = :System.Label.PRW_Phase_Assigned_Accounting_Notification_Email_Template_Name 
]; 

This is embedded as part of an Approval process. When I, as an administrator, approve  this select statement will return the template name.   Everything is fine.

However, when our production staff approves then this will return no rows. 

I can not figure out where to check their profile to the emailtemplate object. Or is there another way of granting permission for these templates?  I don't see an object as part of App Setup - Customize...

Rudy

 

Is it possible to change the current system language (Language Settings) from an Apex controller of a public facing vf page? We are creating a configuration menu on a vf page where the user can change the current default system language.

There is a drop down for languages in the vf page from where the user selects his language. I looked into LanguageLocaleKey and I was able to change the current language by querying user and setting different language.

 

This is sample code i created as proof of concept:

 

<apex:page controller="LanguageChangeTestController">
 
  Current system language : <apex:outputText value="{!currentLanguage}"/>
 
  <apex:form >
      <apex:commandButton value="Change language to Portuguese" action="{!changeLanguage}"/>
      <apex:commandButton value="Go back to US English" action="{!goBackToUSEng}"/>
  </apex:form>
 
</apex:page>

 

 

public with sharing class LanguageChangeTestController {

    public String currentLanguage {get; set;}
    
    public LanguageChangeTestController() {
        currentLanguage =  UserInfo.getLanguage();
    }
    
    public void changeLanguage() {
        //get current user
        String currentuserId = UserInfo.getUserId();
        User currentUserInfo = [select LanguageLocaleKey from User where Id = :UserInfo.getUserId()];
        currentUserInfo.LanguageLocaleKey = 'pt_BR';
        update currentUserInfo;
    }
    
    public void goBackToUSEng() {
        User currentUserInfo = [select LanguageLocaleKey from User where Id = :UserInfo.getUserId()];
        currentUserInfo.LanguageLocaleKey = 'en_US';
        update currentUserInfo;
    }
}

 

However I am not sure if I can access user id from the public facing vf page.

 

Any idea on how this will work for a public facing vf page?

I have created one custom object & there is one picklist Opt with two option- Yes & No.

 

My requirement is that I want to display  “I like primary interest specifically secondary interest” if user selects ‘YES’ option in picklist.

 

Hi ,

 

We have an Email to case set up in our org to handle salesforce cases(Salesforce issues from business users).

 

We would like to send automatic emails from case submitter when a case is generated.

 

For that we would like to copy the email subject into case comments that way we can merge case comments when sending replies.

 

Any thoughts on how this can be done?

 

Thank you!!!!!

Hi -

 

I have a requirement to display the number of open reservations an account has in the Accounts tab. To get the number I will need to join the Accounts Contacts and Reservations and then get the number of records. Basically Accounts -> Contacts -> Reservations (Open status)

 

1. Can I place a custom field as a formulae and do this?

 

2. Some discussion boards talk about a roll up field but that seems to be limited only to Accounts -> Contacts

 

Any suggestion on the best way to get this done is welcome.

 

Thanks is advance for your time.

 

Regards,

Pradhip. S

 

 

Hi All,

In our instance we have implemented a partner portal for portal users to access the case management process. Here We have 2 case form layouts.
Standard_Layout for standard users, with System Administrator profile
PP_Layout for Portal users with PP profile

We have a Record type as well called PP_RT with a support process say PP_SP. In this PP_SP we made sure to remove some case status picklist items. Also in the PP_RT, we removed some items from available picklists. After all this we assigned PP_Layout for PP profile with PP_RT record type. And for the system administrator. we assigned Standard_Layout with master record type.

Once the partner user logs in the Portal, they are able to create a case with restricted picklist items including Status as well. When we access the same case using System administrator profile internaly, the Standard_layout display for us. But the issue is we still getting the restricted picklists as in portal users. And vise versa. Meaning once we create a case internally, the portal users will see the unrestricted picklists when they access the same case in partner portal.

Is there any way to resolve this issue? 

 

Thanks

  • October 13, 2013
  • Like
  • 0

We are trying to restrict super user account (not system admin) profile's ability to see and use Setup button to perform any system admin functions. But I am not able to find where it is. Can anyone guide or point me to the right direction? Thanks, Andrew

 

Hi,

 

 

I have created a page in site.com. i am using data elemnt for fetch data. but some where i need to use operators betwwen data elements like this -> {!ECS__Order__r.ECS__Net_Order_Total__c} - {!ECS__Order__r.ECS__Total_Payments__c} . but it can't subtract the elements value.

 

 

Thanks

Hi,

 

   I have a requirement where I have to add my custom Expiration Date with 90 days from submission Date field. but when I have created a workflow with the following field action it is updating the value of the expiration date with 90 days but an hour less.

 

Workflow Field Update Action : Submission_Date__c + 90

 

suppose my submission date is 10/10/2013 2:30AM'

 

then the expiration Date is getting updated as 01/08/2014 1:30AM whereas ideally it should get updated as 01/08/2014 2:30AM.

 

Please let me know any pointers in that.

 

Thanks,

Karthik

System.NullPointerException: Attempt to de-reference a null object: Trigger.updateCount: line 13, column 1

 

 

trigger updateCount on Student__c (after insert, before delete)
{
//////////////////////////////////////
// When insert/update any student’s in class then update MyCount Accordingly.
// Created 20131009 max
// Modified 20131009
//////////////////////////////////////
if(Trigger.isAfter && Trigger.isInsert)
{
for (Student__c stent : Trigger.new)
{
Id cid = stent.Class__c;
Integer clist = [Select Count() FROM Student__c where Class__c =: cid ];
//stent.Class__r.My_Count__c = clist;
}
}
else if(Trigger.isAfter && Trigger.isDelete)
{
for (Student__c stent : Trigger.new)
{
Id cid = stent.Class__c;
Integer clist = [Select Count() FROM Student__c where Class__c =: cid ];
//stent.Class__r.My_Count__c = clist;
}
}

}

Hi,

 

I am running some tests with queryall and am finding that it is returning records that have been deleted, but are NOT in the recycle bin.  This is primarily with Tasks, but I have come across it before with Contacts.  For example, I export all tasks where isdeleted=true, and I get 12 tasks.  I then attempt to undelete them (assuming they should be in the recycle bin) and I get errors that they are no longer in the recycle bin.  Plugging in the ID to the SF URL, it does confirm the records are deleted.

 

So...I think I have narrowed it down to 2 possibilities:

 

1.  Hard Deleted Records - The docs all say they do not go to the recycle bin (and yes they are not there as expected), but they ARE flagged with isdeleted=true, so they can be exported with queryall().  I have tested hard deleting some Tasks and Leads and WAS able to export them with queryall.

 

2.  Cascading Deletes - When a child record is deleted when the parent is deleted (i.e. Tasks when the Lead is deleted), the Task records ARE also flagged with isdeleted=true, but again are not directly in the recycle bin, and they ARE exported with queryall().

 

So it appears that the SF help documentation around isdeleted is INCORRECT unless I am missing something

 

Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.

 

The assumption based on the SF docs for the isdeleted field would be that any records that can be exported with queryall should be able to be undeleted using the undelete() call, but that is not true in these cases.

 

Also I am assuming that once a record is flushed from the recycle bin, then it can no longer be queried qith query(all).  The docs do not seem to clarify this either "Indicate where the object has been MOVED to the recycle bin" vs. is IN the recycle bin.

 

Can anyone confirm my findings?  

 

Thanks, Laurie

 

 

Hello all,

 

I am trying to push one code from my Force.com Eclipse to other sandbox organization. When selected the folder in Eclipse and clicked on "Deploy to Server" in the final validation step it throws me an error showing "package.xml : Cannot deploy installed package in Package Manifest with any other types!".

 

Not only code even if I am trying to move some custom objects also it throws the same error. Finally I am not able to push any thing from my Eclipse to any org. 

 

Can someone please help me how to clear this error and push the stuff into org.

 

Regards,

Manu.