• Pavan Renjal
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 5
    Replies

Hi there! Is there a way to restrict a user from following another user? I believe there is no existing functionality to achieve this. But is there a way to achieve this via custom coding? Can you please provide any references or guide me how i can do this?

Hi, i need to track changes whenever this Feed Tracking checkbox is enabled or disabled for Account Object. I need to have the visibility at user level. How do i track this? Please advice.

Hi, I need to know how we can check if the list is empty before rendering it. I am not sure if i am doing it right in the below code:

 

<apex:repeat value="{!Contacts}" var="con">
                               
      <apex:commandLink value="{!con.Name}" rendered={!NOT(Contacts.size==0)}"/>
                                     
 </apex:repeat>

  

I am displaying set of Opportunities in Inline VF page related to a account in Account detail page. However on saving, the Inline VF page opens seperately in new browser Tab. I want avoid this from happening and i want only the updated records to be saved. Please suggest if i am doing anything wrong here.

 

I have displayed only a section of apex and visualforce code here: 

 

 public void mySave()
    {
      try
      {    
          for(Integer i=0;i<OpptyGetChanged.size();i++)
          {    
            if(Oppty[i].StageName!=OpptyGetChanged[i].StageName || Oppty[i].Description!=OpptyGetChanged[i].Description)
            {
              OpptyToBeUpdated.add(Oppty[i]);
            }
          }
          update OpptyToBeUpdated;
          ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.CONFIRM,'Record Saved Successfully!');
          ApexPages.addMessage(myMsg);
       }
       
       catch(DMLException e)
       {   
         ApexPages.addMessages(e); 
       }  
    
     
    }

 

 

 

<apex:pageBlockButtons>
                  <apex:commandButton action="{!mySave}" Value="Save"/>
</apex:pageBlockButtons>

 

I have a map consisting of Id and Double as Key and Value Pair. I am trying to assign a custom field in Opportunity to the value from Map. I have already added the values to the Map (not shown in the piece of code below) but i am failing to add the values to custom field Total_Price__c in Opportunity. Can anyone please help me in achieveing this? The syntax used below might be wrong, being a newbie i have no clue as how to execute this.

Map<Id,Double> MapTotalPrice = new Map<Id,Double>();

Opportunity Opp = new Opprtunity();
List<Opportunity> OpportunityList = new List<Opportunity>();


for(Id OppId: MapPrice.KeySet())
{
    Opp.get(OppId).Total_Price_c = MapTotalPrice.get(OppId);
    OpportunityList.add(Opp);
}
    
update OpportunityList;

Hi, I need to know how we can check if the list is empty before rendering it. I am not sure if i am doing it right in the below code:

 

<apex:repeat value="{!Contacts}" var="con">
                               
      <apex:commandLink value="{!con.Name}" rendered={!NOT(Contacts.size==0)}"/>
                                     
 </apex:repeat>

  

I have a map consisting of Id and Double as Key and Value Pair. I am trying to assign a custom field in Opportunity to the value from Map. I have already added the values to the Map (not shown in the piece of code below) but i am failing to add the values to custom field Total_Price__c in Opportunity. Can anyone please help me in achieveing this? The syntax used below might be wrong, being a newbie i have no clue as how to execute this.

Map<Id,Double> MapTotalPrice = new Map<Id,Double>();

Opportunity Opp = new Opprtunity();
List<Opportunity> OpportunityList = new List<Opportunity>();


for(Id OppId: MapPrice.KeySet())
{
    Opp.get(OppId).Total_Price_c = MapTotalPrice.get(OppId);
    OpportunityList.add(Opp);
}
    
update OpportunityList;