• Tejpal Kumawat
  • SMARTIE
  • 1360 Points
  • Member since 2012
  • Tech Lead


  • Chatter
    Feed
  • 43
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 298
    Replies
Hi,

the requirements is based on the contact photo setup on Contact page. I created a Visualforce page to show/upload photo and embeded on contact's edit page layout. The photo is showing left side of section  but we need to show in center how can we do that? I tried div tag with align center but no use.

Please give me clue on this.

Sumant K
Hello,

How to check if the fields are modified in trigger,

I have  account object, i want to execute a trigger if the few fiedls are modified,

How can i acheve it
Hello,

I have a Pagnignation âge in salesforce i have followeed link below 
http://blog.jeffdouglas.com/2009/07/14/visualforce-page-with-pagination/

But the code fails for End/last button because the ofset should be less than 2000 but i have 10k rows (in Sandbox) and 50k rows (in Production),
Any work around for this ?
Hi,

I am trying to use apex trigger to send an email when certain criteria is met for a customObj1__c. The email is supposed to include a link that is something along the lines of "http://cs##.salesforce.com/customObjId". 

How can I send an email where there is a direct link to the record?

Example:

Subject: "Some subject"
Link: http://cs01.salesforce.com/customObjId
  • November 11, 2015
  • Like
  • 0
Hi All,

I am working on this Action Poller thing. My requirement is VF component has to change according to the field change or DML operation on a Record in an object. Like the stages are "Processing" "Completed" "Exception". Each Stages have their own VF components which are rendered accordingly.

But, This actionpoller is not moving to next stage from "Processing" to "Completed" though i made DML changes to record.
Pls help. Below is my code.
PAGE..
<apex:page  showHeader="false" controller="DocumentStatusPoller" >
    <apex:form>
    <apex:actionPoller reRender="Intform,Pendform,Compform,Excepform" action="{!pollermeth}"
                        interval="10"  />
    </apex:form>
    <apex:form id="Intform" rendered="{!Intform}">
        <c:Initiating >
             <img src="{!$Resource.SpinnerLightning}" width="50" height="50" />
             <div style="font-size:150%;padding:5px">Processing..</div>
        </c:Initiating>
    </apex:form>
    
    <apex:form id="Pendform" rendered="{!Pendform}">
        <c:Pending >
            <img src="{!$Resource.SpinnerLightning}" width="50" height="50" />
             <div style="font-size:150%;padding:5px">Pending..</div>
        </c:Pending>
    </apex:form>
    
    <apex:form id="Compform" rendered="{!Compform}">
        <c:Complete >
            <img src="{!$Resource.SpinnerLightning}" width="50" height="50" />
             <div style="font-size:150%;padding:5px">Completed..</div>
        </c:Complete>
    </apex:form>
    
    <apex:form id="Excepform" rendered="{!Excepform}">
        <c:Exception >
            <img src="{!$Resource.SpinnerLightning}" width="50" height="50" />
             <div style="font-size:150%;padding:5px">Exception Occured</div>
        </c:Exception>
    </apex:form>
CLASS..
public with sharing class DocumentStatusPoller {
    public Boolean Intform{get; set;}
    public Boolean Pendform{get; set;}
    public Boolean Compform{get; set;}
    public Boolean Excepform{get; set;}
    
    
    
   /* public Boolean IntBlk {get; set;}
    public Boolean ExceptionBlk { get; set;}
    public Boolean CompBlk { get; set; }
    public Boolean PendBlk { get; set; }*/
    
    public String DocSessID{get; set;}

    public DocumentStatusPoller(){
    
     DocSessID = ApexPages.currentPage().getParameters().get('DocSessionID');
        
            Intform = true;
            Pendform = false;
            Compform = false;
            Excepform = false;
      
     /* IntBlk = true;
      PendBlk = false;
      CompBlk = false;
      ExceptionBlk = false;*/
      
    }

    public PageReference pollermeth() {
    
   Document_Session__c DocSessRec = [select   Name, 
                                                   Contact_Document__c,
                                                    Exception__c,
                                                    Status__c
                                             from   Document_Session__c where Id='a1JU0000003qSVgMAM'];
    
    if(DocSessRec != null){
        if(DocSessRec.Status__c=='Pending'){
            Intform = false;
            Pendform = true;
            Compform = false;
            Excepform = false;
            
           /* PendBlk = true;
            CompBlk = false;
            ExceptionBlk = false;
            IntBlk = false;*/
        } else
            if(DocSessRec.Status__c=='Complete'){
                
            Intform = false;
            Pendform = false;
            Compform = true;
            Excepform = false;
           /* PendBlk = false;
            CompBlk = true;
            ExceptionBlk = false;  
            IntBlk = false;*/
            
        } else
            if(DocSessRec.Status__c=='Exception'){
              Intform = false;
            Pendform = false;
            Compform = false;
            Excepform = true;
            /*PendBlk = false;
            CompBlk = true;
            ExceptionBlk = false;
            IntBlk = false;*/
          
        }
      }
         return null;
   }
   
 }

 
Hello,

Exsisting functionality:
> I have a checkbox (check__c) field on the account.
> Accounts are grouped as per hierarchy

Required Functionality
> When the Parent account is checked, i want that the accounts below them (child accounts) should get checked automatically and recursiverly also.

Thanks for suggesting some ideas
Hello,

Eanabling below seeting, will it effect below
1) will the report displayed to each user will still remain same
2) Permissions like, read, read/write, will its still stand true as it was before.
User-added image

What are other impacts ?

Thanks you !
How do I get rid of the epilog statement after a report that reads:

Confidential Information - Do Not Distribute
Copyright (c) 2000-2015 salesforce.com, inc. All rights reserved.
.
HI

i want to create visualforce page based on public group.

for example i have two groups A, B in visaulforce search box i give the value of A Group users display in to the table format in visualforce page 

Thanks 
SS
 
  • October 21, 2015
  • Like
  • 0
I have installed ""NearbyContacts2" component from the app exchange, However, they are not available to add as components in the Lightning App Builder. I've tried uninstalling an reinstalling, with no luck. The "Custom Components" section in Lightning App Builder shows 0.

I have also enabled "Enable Debug Mode", And I dont have Lightning Components in Salesforce1 (BETA) checkbox option in my dev org.

Please help on that....

I am attaching the screen shots :

User-added image



User-added image




 
I'm getting the following error:

Error: Compile Error: Initial term of field expression must be a concrete SObject: Map<Id,FieldPermissions> at line 71 column 9

Here are the snippets of code 
//update field permission for Opportunity  permission
        fieldpermissions fp=new fieldpermissions();
        Map<id,fieldpermissions>rt=new Map<id,fieldpermissions >([select id,Field FROM fieldpermissions where parentid=:parameterValue AND SobjectType='Opportunity']);
        if(!rt.isempty()) //Compile Error
        {
        rt.id=rt[0].id ;
        }else{
          rt.parentid          = parameterValue ;
          rt.SobjectType       ='Opportunity'; 
        }
        
        for(wrapper i:lstwrapperIntString) //wrapper loop
        {
        if(i.selectedread ==true){
         rt.PermissionsRead= true;
        }
        if(i.selectedwrite ==true){
         rt.PermissionsEdit=true;
         rt.PermissionsRead= true;
         }
           upsert rt;
        }
           return null;

    }

 

Hi
  please tell me what is the SERVICE CLOUD,what are all the new features in SERVICE CLOUD and which purpose we can go head and use the SERVICE CLOUD.


THANKS

RANGA

hi,
I do have a requirement where we need to use for loop  with if statement for multiple fields if selected ,is it possible ?
}	
public pagereference actionsupport()                 //pageReference method
	{
		lstwrapperIntString = new List<wrapper>();       //new lstwrapperIntString list
		Map<String, SobjectField> fieldMap = Opportunity.getsObjectType().getDescribe().Fields.getMap(); 
		for(String f : fieldMap.keySet())
		{
			lstwrapperIntString.add(new wrapper(fieldMap.get(f).getDescribe().getLabel(),selectedValue));
		}
		return null;
	}
	public class wrapper    //Wrapper Class 
	{
		public boolean selectedread  {get;set;}
		public boolean selectedwrite {get;set;}

		public String  fieldName     {get;set;}

		public wrapper(String Name,String write) // wrapper constructor 
		{
			this.fieldName=Name;                     
			this.selectedread=true;
			if(write=='writeseleted')
			{
				this.selectedwrite=true;
			}
		}  
	}

 
:
Hi
I have come across the following error when I tried to " Mass Convert Leads".
SObject row was retrieved via SOQL without querying the requested field: Lead.Fax
Error is in expression '{!convertLeads}' in component in page massleadconverter: Class.MassLeadConverterController.convertLeads: line 96, column 1
Package :  Mass Lead Converter
Publisher - Force.com Labs - Mass Lead Converter
Version - 1.10
How can I change the apex code to aovid this error? Or is there another way to handle this issue? 
I have created a packge. Component are tab and buttom links on standard object contacts and Leads.
Now the problem that i am facing after insalling these package in other organisation buttom and tabs are not autopopulating.
I have a managed package which I installed on different orgs with no problems. Recently I added 2 new classes and all hell broke loose. I packaged it fine, compiled fine, passed all the unit tests just fine. When I tried to install it on a sandbox it gave errors about not recognizing some vars from a class that I know(checked) is included. I then removed the 2 new classes, repackaged it and it was the same. I should mention that all the other files are Managed-released but the package is currently beta. The 2 new files I added are also beta (blue instead of green) but the errors are not about the new classes.

Example error: "Class_Name.
Variable var_name does no exist. ("Class_Name" is a very important class that has been in this package since the begining, it never caused problems and it's included in the package, "var_name" is a static bool from that class that also exists)

 
Hi All,

Can any one solve this issue .

trigger defaultpayment on Student__c (after insert) {
    Student__c student = trigger.new();
    Payment__c payment = new Payment(Student__c = student.Name,StudentId=student.Id,Amount = 200);
    
insert payment;
}

Regards,
Suresh.
  • April 02, 2015
  • Like
  • 0
Hi,

I have added 2 pageblocksectionitems in a visualforce page. But I want to display those based on a field value. How can I accomplish this?

Code snippet -
<apex:pageBlockSectionItem id="emvQn">
                    <apex:outputPanel id="emvQSpan">
                        <apex:outputLabel style="color:red">*</apex:outputLabel>
                        <apex:outputLabel value="If you have a non-EMV"/><br/> 
                        <apex:outputLabel value="compliant card reader, would" /><br/>
                         <apex:outputLabel value="you like to purchase an"/><br/>
                         <apex:outputLabel value="EMV-compliant card reader:" />
                    </apex:outputPanel>
                    <apex:outputPanel id="emvQOSpan">
                        <apex:selectList Value="{!ReaderOption}" id="ReaderOptionsId" onchange="Readerdef('select');" size="1" style="width:250px" onkeypress="handleKeyPressSearch(event);">
                            <apex:selectOption itemValue="None" itemLabel="--None--" />
                            <apex:selectOption itemValue="Yes" itemLabel="Yes"/>                            
                            <apex:selectOption itemValue="No" itemLabel="No" />
                        </apex:selectList>                        
                    </apex:outputPanel>
                </apex:pageBlockSectionItem>
                
               <apex:pageBlockSectionItem id="emvOpn">                
                    <apex:outputPanel id="emvOpnSpan">
                      <apex:outputLabel style="color:red">*</apex:outputLabel>                        
                      <apex:outputLabel value="Reader Type:"/>
                    </apex:outputPanel>
                    <apex:outputPanel id="emvReadSpan">
                      <apex:selectList Value="{!NewSRSMPODLead.Reader_Type__c}" id="ReaderTypeId" size="1" style="width:250px" onkeypress="handleKeyPressSearch(event);">
                            <apex:selectOption itemValue="None" itemLabel="--None--" />
                            <apex:selectOption itemValue="EMV Card Reader" itemLabel="EMV"/>
                            <apex:selectOption itemValue="MSR Card Reader" itemLabel="MSR"/>                            
                            <apex:selectOption itemValue="Not Applicable" itemLabel="No thanks"/>
                      </apex:selectList>                                                
                   </apex:outputPanel>
                </apex:pageBlockSectionItem>

Thanks
Kumar
  • March 27, 2015
  • Like
  • 0
How to debug in eclipse in force.com plugin. I have installed eclipse juno, got all data into my eclipse from my dev org. I want to debug a trigger which works on creating an account. How to set debug point ot how to debug it. am not seeing any debug mode
If we remove membership of System Admin profile then how to manage Community?
I need to access Enable Inline Editing from user interface setting, how to i find in apex it is checked or not.

User-added image
Hello,

I am trying to call XML-RPC webservices call from salesforce, Is there any way so can call those services.

Thanks

Hello Everyone,

 

I have Created one Manage Package from 'Free Developer Org' that have Instace 'ap1' and I want to install it on new sandbox Org that Instace 'cs11' , But I am not able to Install that package on Sandbox But Using same URL i am able to install package on other developer Org. So what is issue please suggest me?

 

Error is

Your requested install failed. Please try this again.

None of the data or setup information in your salesforce.com organization should have been affected by this error.

If this error persists, contact salesforce.com Support through your normal channels and reference number: 1886983166-12913 (-422369675)

 

Thanks

Hello Everyone,

 

I have Created one Manage Package from 'Free Developer Org' that have Instace 'ap1' and I want to install it on new sandbox Org that Instace 'cs11' , But I am not able to Install that package on Sandbox But Using same URL i am able to install package on other developer Org. So what is issue please suggest me?

 

Error is

 

Your requested install failed. Please try this again.
None of the data or setup information in your salesforce.com organization should have been affected by this error.
If this error persists, contact salesforce.com Support through your normal channels and reference number: 1886983166-12913 (-422369675)
 
Thanks

Hello,

 

I have one requirement in which there are two custom object and i am fetching records from both object , I need to Sorting & Pagination as per both object in Combined  List ..

 

Any Help appreciate...

Hi ,

 

I need calculate  'oauth_nonce' and 'oauth_signature'  for twitter Integration. please give me any idea?

How to delete content type picklists for your organization.?

Hi Guys,

I have one custom object in which lookup of Account and one checkbox. when it is true then i need to send a mail to Account owner's manager. How to its possible please let me know? 

Thanks
 

Hi ,

 

I am using “ instead of " and ’ instead of ' , in VF page there i got �

 

 

I have used also 

bodyText = d.body.toString().replace('“','\"');
bodyText = d.body.toString().replace('’','\'');

 

But not get success.. Please help...

Hi,

We are planing to buy sales cloud crm enterprise edition ($125 per user per month) . We will be using salesforce crm content also. It would be great help f some one could answer following queries

1. How many users could be given access to salesforce crm content?
2. What are the user licenses which can be enabled salesforce crm content?
3. Could customer portal or partner portal user could also be enabled for salesforce crm content?
4. Is there any edtional pricing for salesforce crm content feature?

Regards

Hi,

We are planing to buy sales cloud crm enterprise edition ($125 per user per month) . We will be using salesforce crm content also. It would be great help f some one could answer following queries

1. How many users could be given access to salesforce crm content?
2. What are the user licenses which can be enabled salesforce crm content?
3. Could customer portal or partner portal user could also be enabled for salesforce crm content?
4. Is there any edtional pricing for salesforce crm content feature?

Regards..

Hi I need to SAML configuration in my org ... How to Enable in please give me steps ...

 

 

Single Sign-On Settings
 
 
  
Federated single sign-on using SAML
SAML Enabled  
2.0 
SAML Version
 
--None--1.1 
User Provisioning Enabled
Issuer
 
Identity Provider Certificate
 
  
 
Custom Error URL
SAML User ID Type
 
  • Assertion contains User's salesforce.com username
  • Assertion contains the Federation ID from the User object
SAML User ID Location
 
  • User ID is in the NameIdentifier element of the Subject statement
  • User ID is in an Attribute element
 
 
  
How to feel the entry data.....

I have Integrate DocuSign With Salesforce. How can you get the signed contract pdf attached  back in salesforce Contract?

 

Is there Code Require or UI Setup??

Can any one help me how to call below wrapper class in my Test class. 
// wrapper class to allow the sobject the information and get displayed in the page

Public customcontroller
{

    public class sObjectWrapperClass
    {
        public sobject sobj{Get;set;}
        public String objectName{get;set;}
        public String actions{get;set;}
        public string groups{get;set;}
    }
}
Hi Guys,

Can any one tell me why we can use the visualforce page instead of using salesforce provided user interface.

What type of the events we can not do by using standard controller and what type of the events we can do by using the extension.

please anhy one tell me.
 
Hi All,

I have written a batch class with the below scenario.
if (ObjectName==Account)
{ need to query account  records
}
else if (ObjectName =Contact )
{ Query Contact records)
}
So i will get either account or contact records in scope and in execute method i will create records for other custom object means if it is account it will insert with account Id in the new custom object and if Contact contact Id in the new object .Right now it is captuirng the Id into another custom Object but the problem is whenever i am executing it is capturing the same .

So here i want to eliminate the creation of duplicates means if the Record Id(Acc or con Id already in the new custom object then it should not create new record if the record is not existing then create new record with the Acc or Con Id

My Code:
  global void execute(Database.BatchableContext BC, List<SObject> scope)
    { 
        Map<id, Custom Object> CustomMap= new Map<id,Custom Map>();
         for(Sobject obj: scope)
         {      
                Custom Object cm= new Custom Object();
                 
                 cm.Recordt_ID__c =obj.Id;
                 
                  CustomMap.put(Cm.Object_ID__c, cm);
             
          }
          if(!CustomMap.isEmpty())
        {
            Database.SaveResult[] InsertResult = Database.insert(CustomMap.values(),false);
            
        }
        
    }

So here how i will check if there is already a record with same Object Id is there then it should not insert if it is not there it should create new custom object Record.Any one please guide how to do this

Thanks in advance
Error: Unknown property 'AccountStandardController.accGroup'

My VF Page
<apex:page standardController="Account" extensions="AccountSearchUI" sidebar="false">
<head>
<title>Account Search UI</title>
<style type="text/css">
body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px;}

a:link    {color:blue; background-color:transparent; text-decoration:none}
a:visited {color:blue; background-color:transparent; text-decoration:none}
a:hover   {color:blue; background-color:transparent; text-decoration:underline}
a:active  {color:blue; background-color:transparent; text-decoration:underline}

<!--.tablemain tr:nth-child(odd){ background: #E6E6E6;}
.tablemain tr:nth-child(even){ background: #FFFFFF;}
.tablemain {border:#E6E6E6 1px thin;}-->

.tablemain tr:nth-child(odd){ background: #F0F0F0;}
.tablemain tr:nth-child(even){ background: #FFFFFF;}
.tablemain {border:#F0F0F0 1px thin;}


.headingmain {align=left; valign=top; font-family:Calibri; font-weight:bold; font-size:20px; bgcolor=#FFFFFF;}
.headingsub1{align=left; font-family:Calibri; font-size:13px; font-weight:bold; bgcolor=#FFFFFF;}
.headingsub2{font-family:Calibri; font-size:13px;}

.headingpicklistlabel{align=left; font-family:Calibri; font-size:14px; font-weight:bold; bgcolor=#FFFFFF;}

</style>
</head>

<body>
<apex:form >
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
    <tr>
    <td bgcolor="#FFFFFF" valign="top">
        <table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
            <tr><td height="1"></td></tr>
            <tr><td height="30" class="headingmain">&nbsp;Account Search UI</td></tr>
            <tr>
                <td height="15" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="11%">&nbsp;</td>
                    <td height="25" width="6%" class="headingpicklistlabel">Group</td>
                    <td width="1%">&nbsp;</td>
                    <td width="81%">
                        <apex:selectList multiselect="false" size="1">
                            <apex:selectOptions value="{!accGroup}"></apex:selectOptions>
                        </apex:selectList>
                    </td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td height="25" width="8%" class="headingpicklistlabel">Vertical</td>
                    <td>&nbsp;</td>
                    <td>Vertical</td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td height="25" width="8%" class="headingpicklistlabel">Type</td>
                    <td>&nbsp;</td>
                    <td>Type</td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td height="25" width="8%" class="headingpicklistlabel">Ranking</td>
                    <td>&nbsp;</td>
                    <td>Ranking</td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td height="25" width="8%" class="headingpicklistlabel">Accounts</td>
                    <td>&nbsp;</td>
                    <td>Accounts</td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                </table></td>
                <td height="5" bgcolor="#FFFFFF">&nbsp;</td>
                <td height="5" bgcolor="#FFFFFF">&nbsp;</td>
            </tr>
            <tr>
                <td align="center">
                  <table width="100%" border="0" cellspacing="0" cellpadding="1" class="tablemain">
                    <tr>
                      <td width="10%" height="23" class="headingsub1">View Dashboard</td>
                      <td width="10%" height="23" class="headingsub1">Group Org Acc</td>
                      <td width="10%" height="23" class="headingsub1">Vertical</td>
                      <td width="10%" height="23" class="headingsub1">Account Name</td>
                      <td width="10%" height="23" class="headingsub1">Type</td>
                      <!--<td width="10%" height="23" class="headingsub1">Owner Last Name</td>-->
                      <td width="10%" height="23" class="headingsub1">Client Rank</td>
                      <td width="10%" height="23" class="headingsub1">Account Plan</td>
                      <td width="10%" height="23" class="headingsub1">Last Modified</td>
                      <td width="10%" height="23" class="headingsub1">View Latest PDF</td>
                      <td width="10%" height="23" class="headingsub1">PDF Upload Date</td>
                    </tr>
                    <apex:repeat value="{!accPList}" var="cp">
                    <tr>
                        <td height="23" class="headingsub2"><apex:outputField value="{!cp.Group_Org__c}"/></td>
                        <td height="23" class="headingsub2"><apex:outputField value="{!cp.Group_Org__c}"/></td>
                        <td height="23" class="headingsub2"><apex:outputField value="{!cp.Vertical__c}"/></td>
                        <td height="23" class="headingsub2"><apex:outputField value="{!cp.Name}"/></td>
                        <td height="23" class="headingsub2"><apex:outputField value="{!cp.Type}"/></td>
                        <!--<td height="23" class="headingsub2"><apex:outputField value="{!cp.Type}"/></td>-->
                        <td height="23" class="headingsub2"><apex:outputField value="{!cp.Client_Rank__c}"/></td>
                        <td height="23" class="headingsub2"><apex:outputField value="{!cp.Account_Planlookup__c}"/></td>
                        <td height="23" class="headingsub2"><apex:outputField value="{!cp.Name}"/></td>
                        <td height="23" class="headingsub2"><apex:outputField value="{!cp.Type}"/></td>
                        <td height="23" class="headingsub2"><apex:outputField value="{!cp.Client_Rank__c}"/></td>
                    </tr>
                    </apex:repeat>
          </table>
        </td>
        
      </tr>
    </table></td>
    <td bgcolor="#FFFFFF" valign="top"></td>
    <td bgcolor="#FFFFFF" valign="top"></td>
  </tr>
  
  <tr>
    <td bgcolor="#FFFFFF">&nbsp;</td>
    <td bgcolor="#FFFFFF">&nbsp;</td>
    <td bgcolor="#FFFFFF">&nbsp;</td>
  </tr>

</table>
</apex:form>
</body>
</apex:page>
APEX Class
public with sharing class AccountSearchUI{    

    public ApexPages.StandardController stdController {get; set;}
    public Account acc {get; set;}
    public List<Account> accPList {get; set;}
    
    public String accountName ='';
    public AccountSearchUI(ApexPages.StandardController stdController){
    this.stdController = stdController;

    accPList = [select Group_Org__c, Vertical__c, Name, Type, Client_Rank__c, Top_25_Client__c, Account_Planlookup__c, Attachment_PDF__c from Account where Top_25_Client__c = true and Client_Rank__c < 26 order by Client_Rank__c ASC limit 10];        
    //accPList = [select Group_Org__c, Vertical__c, Name, Type, Client_Rank__c from Account where Top_25_Client__c = true and Client_Rank__c < 26 order by Client_Rank__c ASC limit 5];
    }
    
    List<selectOption> options = new List<selectOption>();
    public List<selectOption> getaccNames(){
    for(Account acc : [select id, Group_Org__c from Account])
    {
        options.add(new selectOption(acc.Group_Org__c, acc.Group_Org__c));
    }
        return options;
    }
}
I am getting the error as below

Error: Unknown property 'AccountStandardController.accGroup'

Need help on this code.
 
I am creating a trigger that will call code to count contacts at the account level meeting certain criteria.  It's working for Adds and Updates, but when I delete a contact the trigger is not updating anything.  Here is the trigger.  Do I need to place the isDelete somewhere else so that it will use the current values instead of the values before the action?  

trigger TAFS_Contact_Trigger on Contact(after insert, after update, after delete){
    if(Trigger.isAfter){
        if(Trigger.isInsert){
            TAFS_ContactTriggerHandler.contactInsert(Trigger.new);
        }
        if(Trigger.isDelete){
            TAFS_ContactTriggerHandler.contactInsert(Trigger.old);
        }
        if(Trigger.isUpdate){
            TAFS_ContactTriggerHandler.contactInsert(Trigger.new);
        }
    }
I have a Override page for Case , Which redirects to a Visual force page if a certain record type is selected and if not it redirects to a standard page. This is working perfectly for redireting to the necessary page . Howewer when  it is directed to the visual force page the record type which was selected is not passed to the visual force page and it is causing issues with the Picklist values based on the record type. Visual force page always shows the default record type instead of the selected record type.

Here is my override page 
 
<apex:page standardController="Case" extensions="caseRedirect" tabStyle="Case" showheader="true" action="{!redirect}" />
public with sharing class caseRedirect {

private ApexPages.StandardController controller;
public String retURL {get; set;}
public String Type {get; set;}
public String saveNewURL {get; set;}
public String rType {get; set;}
public String cancelURL {get; set;}
public String ent {get; set;}
public String confirmationToken {get; set;}
public String accountID {get; set;}
public String contactID {get; set;}

public caseRedirect(ApexPages.StandardController controller) {

    this.controller = controller;

    retURL = ApexPages.currentPage().getParameters().get('retURL');
    rType = ApexPages.currentPage().getParameters().get('RecordType');
    cancelURL = ApexPages.currentPage().getParameters().get('cancelURL');
    ent = ApexPages.currentPage().getParameters().get('ent');
    confirmationToken = ApexPages.currentPage().getParameters().get('_CONFIRMATIONTOKEN');
    saveNewURL = ApexPages.currentPage().getParameters().get('save_new_url');
    accountID = ApexPages.currentPage().getParameters().get('def_account_id');
    contactID = ApexPages.currentPage().getParameters().get('def_contact_id');

}

public PageReference redirect() {

    PageReference returnURL;

    // Redirect if Record Type corresponds to custom VisualForce page

    IF(rType == '012180000000DjD') {

        returnURL = new PageReference('/apex/CC_CaseEdit?Recordtype=012180000000DjD');

    }
  
    ELSE {

       returnURL = new PageReference('/500/e');

    }

    returnURL.getParameters().put('retURL', retURL);
    returnURL.getParameters().put('RecordType', rType);
    returnURL.getParameters().put('cancelURL', cancelURL);
    returnURL.getParameters().put('ent', ent);
    returnURL.getParameters().put('_CONFIRMATIONTOKEN', confirmationToken);
    returnURL.getParameters().put('save_new_url', saveNewURL);
    returnURL.getParameters().put('nooverride', '1');

    IF (accountID != null){

        returnURL.getParameters().put('def_account_id', accountID);

    }

    IF (contactID != null){

        returnURL.getParameters().put('def_contact_id', contactID);

    }

    returnURL.setRedirect(true);
    return returnURL;

}

}
When VF opens up the record type is always default record type instead of the record type i selected .What am i missing

Thanks 

 
Hi,

the requirements is based on the contact photo setup on Contact page. I created a Visualforce page to show/upload photo and embeded on contact's edit page layout. The photo is showing left side of section  but we need to show in center how can we do that? I tried div tag with align center but no use.

Please give me clue on this.

Sumant K
Hello,

How to check if the fields are modified in trigger,

I have  account object, i want to execute a trigger if the few fiedls are modified,

How can i acheve it
Hello,

I have a Pagnignation âge in salesforce i have followeed link below 
http://blog.jeffdouglas.com/2009/07/14/visualforce-page-with-pagination/

But the code fails for End/last button because the ofset should be less than 2000 but i have 10k rows (in Sandbox) and 50k rows (in Production),
Any work around for this ?
Hi, 

Can someone give me a little guidance here to understand how taking a input from user works here is Salesforce.

I was going through Apex developer's guide and I'vea almost read half of the book, but still didn't see any example to take a input from user. Like in Java we can use a DataInput stream or scanner class to take a input from user, but I've not seen anything like in Apex.

Can someone point me to the documentation which can help me to understand how apex lets your customer to input the data in Salesforce.

Any help will be highly appreciated.

Thanks
Hi All,

i have a requirement that i have to use same button diffrentely for 2 diffrent countries on same page. for example for one country like russia current functionality will be used. but i want to make some changes on the same button for australia and it would fetch diffrent data on the basis of a picklist field.so please can you suggest how can i control diffrent behaviour on same button.
Hi i have this wsdl from my webservice provided and i converted in to apex class and this is what i get.
 
//Generated by wsdl2apex

public class mttest {
    public class Rows_element {
        public String Valor;
        private String[] Valor_type_info = new String[]{'Valor','http://mtbr/test',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://mtbr/test','false','false'};
        private String[] field_order_type_info = new String[]{'Valor'};
    }
    public class DT_Test_Req {
        public String Operacao;
        public mttest.Rows_element[] Rows;
        private String[] Operacao_type_info = new String[]{'Operacao','http://mtbr/test',null,'0','1','false'};
        private String[] Rows_type_info = new String[]{'Rows','http://mtbr/test',null,'0','-1','false'};
        private String[] apex_schema_type_info = new String[]{'http://mtbr/test','false','false'};
        private String[] field_order_type_info = new String[]{'Operacao','Rows'};
    }
    public class DT_Test_Resp {
        public String Resultado;
        private String[] Resultado_type_info = new String[]{'Resultado','http://mtbr/test',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://mtbr/test','false','false'};
        private String[] field_order_type_info = new String[]{'Resultado'};
    }
    public class HTTPS_Port {
        public String endpoint_x = 'http://service/service';
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        private String[] ns_map_type_info = new String[]{'http://mtbr/test', 'mttest'};
        public String SI_Test_Out_Sync(String Operacao,mttest.Rows_element[] Rows) {
            mttest.DT_Test_Req request_x = new mttest.DT_Test_Req();
            request_x.Operacao = Operacao;
            request_x.Rows = Rows;
            mttest.DT_Test_Resp response_x;
            Map<String, mttest.DT_Test_Resp> response_map_x = new Map<String, mttest.DT_Test_Resp>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://sap.com/xi/WebService/soap1.1',
              'http://mtbr/test',
              'MT_Test_Req',
              'http://mtbr/test',
              'MT_Test_Resp',
              'mttest.DT_Test_Resp'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.Resultado;
        }
        public String rettt(String vla){
            return vla;
        }
    }
}
Then i tried to calll the webservice using:-
mttest.HTTPS_Port si_test = new mttest.HTTPS_Port();
List<String> fillers = new String[]{'2','5'};
String opera = '+';
String output = si_test.SI_Test_Out_Sync(opera,fillers);
But it give me error:-
Method does not exist or incorrect signature: [mttest.HTTPS_Port].SI_Test_Out_Sync(String, List<String>)

What parameter should i input for the method
SI_Test_Out_Sync(String Operacao,mttest.Rows_element[] Rows)
?

Thanks


 
Hi,all. I am back again.
This time, I meet a problem about bunch load data.

The details is the following:
     For example, when I create or update a contact, it will trigger a process to execute a flow, which can search a template from a custom object called SMS, and when the flow find a template, it will send a message to the contact. Besides, if the flow can not find a template, it will send me an email to tell me that. But now, when I create or update greater than 3 records, it will send me the email. what's more, I can use the variables search the correct data by writing a query code on sublime. Could anybody please help me solve it?

Yours sincerely,
Best wishes!
I have the following test that asserts that a portal user is able to update it's own contact first name.
@IsTest
public class MyTestClass {
    
    @IsTest
    static void portalUserSelfUpdateContact() {
        
        Account ac = new Account(Name = 'the account');
        insert ac;

        Contact ct = new Contact(LastName = 'contact_lastname', AccountId = ac.Id);
        insert ct;

        Profile pf = [SELECT Id FROM Profile WHERE UserType = 'CspLitePortal' LIMIT 1];

        User usr = new User(
            Alias                 = 'usralias',
            Email                 = 'theuser@email.com',
            Emailencodingkey      = 'UTF-8',
            Lastname              = 'user_lastname',
            Languagelocalekey     = 'en_US',
            Localesidkey          = 'en_US',
            Profileid             =  pf.Id,
            Timezonesidkey        = 'America/Los_Angeles',
            Username              =  Math.random() + 'test@testuser.com',
            ContactId             =  ct.Id,
            CompanyName           = 'the company',
            Salesforce_Edition__c = 'DE',
            IsPortalSelfRegistered = true
        );

        System.runAs(usr) {
            ct.FirstName = 'contact_firstname';
            update ct;
        }
    }
}
When I compile the class using API 33.0, the test passes. But when I try with API 34.0, the update fails with this message.
System.DmlException: Update failed. First exception on row 0 with id 005Q000000NtSmRIAV; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []
What has changed in API 34.0 that causes this issue. What other changes should I make in my code for this test to pass?

Note: same question in http://salesforce.stackexchange.com/questions/89697