• Sapana W
  • NEWBIE
  • 10 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 30
    Replies
Hi,

I have created a VF page with Account as Standard Controller and have added the page as inline VF in sandbox. But when I tried to do same in the Production, I cannot see the required VF page under VisualForce Pages in edit layout. Is it becuase my Prod is at lower version and I had to decrement the version of code to lower version before deploying to Prod? I do have access to the page in Prod and could see it in setup also.

.User-added image
I could not the see the VF page am looking here for.

Also here is the code snippet:

<apex:page StandardController= "Account" extension="TestControllerExtn" recordSetVar="Accounts">
I encounter following error while sending an email to an email Id through apex code:

"This message was created automatuically by the mail system.
A message that you sent could not be delivered to one or more recipients.  This is a permanent error. The following address failed>>:
******@***.com(Undelivered) 504."

I suppose I have all the required setting configured or am I missing something?

Thanks in advance.
Hi All,

I am not able to install chatter desktop on my machine. Being a system administrator I have 'API Enabled', 'Chatter Internal User' permission too. It shows me insufficient privileges error. 
I want to generate a formatted xml output. Currently what am getting is as below:

620 SW 5th Avenue Suite 400 Portland, Oregon 97204United States 345 Shoreline Park Mountain View,CA USA USA

I want xml output as:

                       <Street>620 SW 5th Avenue Suite 400</Street>
                        <City>Portland</City>
                        <State>Oregon</State>
                        <PostalCode>97204</PostalCode>
                        <Country>USA</Country>

and so on..

Heres my code:

<apex:page StandardController="Account" recordSetVar="Accounts" contentType="text/xml" showHeader="true" sidebar="false" cache="false">
<?xml version="1.0" encoding="UTF-8" ?>
<response>
<apex:repeat value="{!Accounts}" var="eachAccount" >    
    <Account id="{!eachAccount.id}" name="{!eachAccount.name}">
        
            <Address type="Billing">
                <Street><stri>{!eachAccount.billingStreet}</stri></Street>
                <City>{!eachAccount.billingCity}</City>
                <State>{!eachAccount.billingState}</State>
                <PostalCode>{!eachAccount.billingPostalCode}</PostalCode>
                <Country>{!eachAccount.billingCountry}</Country>
            </Address>        
      </Account>
</apex:repeat>
</response>
</apex:page>

Is there a way to filter lookup dialog results based on certain criteria?  

 

So for example: 

I have a lookup relationship field for Products on a custom object for a Contact Product Association custom object.  When I click to lookup a product, I am shown all of our products.  I am trying to find a way to restrict the lookup dialog to only show me products in a certain pricebook.  Does anyone know how I could do that?

 

Thanks!

How can a filter be applied to a lookup field for the following:

There are 4 object

object A: Product
object B: Allowed Product
object C: Configuration
object D: Quote

For a configuration(A), allowed product(B) are used to define which product(A) are allowed for a configuration(C).

When you create a quote, a configuration is used.

Assuming that a lookup to Product(A) exist on either the quote or the quote line item.

How is it possible to display only the product in allowed product(B) for that configuration in the quote?

Thanks

I have objects Territory , policy , contact

Contact :  on contact page i have a field  "Annuity user ". this field has lookup to Territory object.

so "Annuity User" field is populated from the Territory field.

contact has relationship with policy .
on policy object i have a field wholesaler.

so now the requirement is if  policyId='3213'  then this  "Annuity User"  data should display on policy record's "wholesaler"  field.

can any one suggest trigger or any sollution pls.

 public void getcount()
   {
     if(opp.provider1__c!=null)
     {
      Score_Count__c scr = [select id,name from Score_Count__c where id = :opp.provider1__c];
      scorecnt= scr.name;     
     }
   }

I have an After Update trigger that updates the fields on a parent object, and that object has several validation rules that have the potential to fire if they're met when the After Update trigger runs.

 

Instead of the normal DML exception though where it reads like gibberish and sends me an error email and leaves the user scratching their head, how would I display a custom error message, prevent the DML insert, and have the system NOT clog my email with exception messages?

 

The section of my code that triggers the DML is as follows:

 

    try{
    update processedOpportunitiesList;
    } catch(DMLException e){
        if(e.getMessage().contains('FIELD_CUSTOM_VALIDATION_EXCEPTION, Please enter Shipping Address, City, State and Zip')){
            e.addError('You can\'t select this stage until you first enter the Shipping Address info on the opportunity.');
        }
    }

 In the above code, I'm trying to say that, if running the DML update with the list "processedOpportunitiesList" results in a DML exception that contains the sentence "FIELD_CUSTOM_VALIDATION_EXCEPTION, Please enter Shipping Address, City, State and Zip", then I want to instead display "You can't select this stage until you first enter the Shipping Address info on the opportunity." to the user, prevent salesforce from inserting the record, and have it not email me about the exception.

 

However, I seem to not be grasping how this particular class is structured or how I'm supposed to write it.  I keep getting "Method does not exist or incorrect signature" errors as I fiddle around with the code and I'm realizing that I'm not "getting" this and I should probably ask on here for help.  Can someone please tell me how I would need to write or structure this trigger properly?

 

Thanks.

I have created a VF page to display Funds records related to current portal user. In the controller I have written a query to return records, which is working fine but I am not able to return error message if no records exist for that user.Here's the code for VF and apex.

 

=======VF Page======

 

<apex:page controller="CTRL_FundTab" tabStyle="ENT_Fund__c" title="ENT_Fund__c" >
  
    <apex:form id="form" >
    <apex:sectionHeader title="Fund" />
        <apex:pageBlock title="Recent Funds">
                  <apex:pagemessages />
                  <apex:pageBlockTable value="{!funds}" var="row">
                          <apex:column >
                               <apex:facet name="header">Fund Name</apex:facet>
                        
                               <apex:outputLink title="" value="/{!row.id}" >{!row.Name}</apex:outputLink>
                        </apex:column>
                   </apex:pageBlockTable>
        </apex:pageBlock>

    </apex:form>
</apex:page>

 

=======Controller====

 

public class CTRL_FundTab
{

    public CTRL_FundTab()
    {

    }

        public List<ENT_Fund__c> getFunds()
        {
           
            ID contactId = [Select contactid from User where id =: Userinfo.getUserid()].contactId;
            ID AccID  = [Select AccountID from Contact where id =: contactid].AccountId;
            list<ENT_Closing_Phase_Entity__c> cpeLst = [select Id,Name, Account__r.Name,Fund__c,Fund__r.Name from   ENT_Closing_Phase_Entity__c where Account__c =:AccID];
            String ff = cpeLst[0].Fund__r.Name;
            list<ENT_Fund__c> funLst = [select Id,Name from ENT_Fund__c where Name =: ff];
            system.debug('$$$$$$$'+funLst.size());
            system.debug('$$$$$$$'+funLst[0].name);
            return funLst;
   
           


           
       }   

}

 

When I try to return Apex.Message object  in getFunds() it shows me an error saying return type does not match

 

Thanks in advance!!

I need to get the associated record. i.e with the radio button.I am using input type radio button for the same.please someone help with the code...

 

 

<apex:column >
    <apex:facet name="header">
        Action
    </apex:facet>
    <input type="radio" name="selection" value="{!m.isSelected}" /> 

 </apex:column>

<apex:column value="{!m.meet.Subject__c}">
    <apex:facet name="header">
        Subject
    </apex:facet>
</apex:column>

 

<apex:commandButton value="Invite To Meeting" action="{!inv}"/>

 wrapper class

public list<meetInviteWrapper> meetwrapperlist{get;set;}
    public class meetInviteWrapper
    {
        public meeting__c meet{get;set;}
        public Boolean isSelected{get;set;}
        public meetInviteWrapper(meeting__c m)
        {
            meet=m;
            isSelected=false;
        }



 public void inv()
    {
    List<meeting__c> mList=new List<meeting__c>();
        for(meetInviteWrapper miw:meetwrapperlist)
        {
            if(miw.isSelected)
            {
                mList.add(miw.meet);
            }

        }
    System.debug('------------------------'+mList);
}

 

 

Hi,

 

I'm hoping someone can help me with this because I can't seem to find any real documentation on Mailmerge templates in Salesforce nor can I find any samples.

 

In the past I've built Mailmerge templates for Opportunities that show all the Line Items for the opportunity.  I have custom objects related to an opportunity and I want to do a Mailmerge template that shows all the child records for an opportunity in a manner similar to Line Items.

 

I've tried doing this through Word and it returns the Opportunity items but it doesn't return the child object items.  So if anyone's got a sample Word document they'd be happy to pass along or tell me how I can address parent-child relationships in Mailmerge, I'd appreciate it.

 

Also I'm wondering if I can do a mailmerge for an Opportunity and show Line Items and also show Quotes and also show the records of custom child objects all in the same template.

 

Thanks in advance!!