• Rabbani sayyed 8
  • NEWBIE
  • 20 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 116
    Questions
  • 17
    Replies
Hi all, I have created one field IsPrimeNubmer in one of the object, now my req is, i want to allow only primary numbers to that field? otherthan prime no it should throw error? i m little confused ? can anyone help me out?
Hi all, I need a validation rule where field can allow only primary numbers? is it possible with trigger ? if yes any sample code for this? or is this possible with config only? if yes any idea
 Public static void UpdateStatus (List<FC_Reviewer__External_Review__c> ExtRevLst ) {
        Set<Id> setOpptyIds = new Set<Id>();
        Map<Id,List<FC_Reviewer__External_Review__c>> OpptyFCRMap =new Map<Id,List<FC_Reviewer__External_Review__c>>();
        Integer i=0;
        Set<Id> ApprovedOppty = new Set<Id>();      
        List<Opportunity> Opplist = new List<Opportunity>();

        for (FC_Reviewer__External_Review__c extreve :ExtRevLst)
        {

        if(extreve.FC_Reviewer__Status__c == 'Review Submitted' && extreve.Approved__c =='Yes')  {
             setOpptyIds.add(extreve.FC_Reviewer__Opportunity__c);
        }
   
        }
        
        for(FC_Reviewer__External_Review__c FCR:[SELECT id,FC_Reviewer__Opportunity__c,FC_Reviewer__Status__c,Approved__c FROM FC_Reviewer__External_Review__c WHERE FC_Reviewer__Opportunity__c IN :setOpptyIds]){
         If(!OpptyFCRMap.containskey(FCR.FC_Reviewer__Opportunity__c))
         {
             OpptyFCRMap.put(FCR.FC_Reviewer__Opportunity__c,new List<FC_Reviewer__External_Review__c>{FCR});
         }else
         {
             OpptyFCRMap.get(FCR.FC_Reviewer__Opportunity__c).add(FCR);
         }        
        }   
         
         For(Opportunity Opp: [Select Id,Stagename from opportunity where id in :OpptyFCRMap.keyset()])
         {
             Integer Size=OpptyFCRMap.get(Opp.id).Size();
             System.debug('Size++++++'+Size);
             For(FC_Reviewer__External_Review__c FCR:OpptyFCRMap.get(Opp.id))
             {
                 
                 If(FCR.FC_Reviewer__Status__c== 'Review Submitted' || FCR.Approved__c=='Yes')
                 {
                     i++;
                     System.debug('i++++++'+i);
                 }

             }
             System.debug('i++++++'+i);
             If(i==Size)
             {
              ApprovedOppty.add(Opp.id);
             }
             
         }
        
         For(Opportunity Opp: [Select Id,Stagename from opportunity where id in :ApprovedOppty])
         {
           Opp.Stagename='Approved';
           Opplist.add(Opp);
         }
         
     
    update Opplist;
}
}
I am getting "Leads Missing Organization Feature: Lead.Sharing null" error message while installing the managed packages, also i checked owd for lead obj it was public read/wrire/transfer. Can anyone tell me what might be the reason for this?
How do I write a code that deletes the right records if the record is idle for more than 180 days. Can anyone share me the code for this synario ??
I want to Send automatic email acknowledgements to the Partner  whenever they successfully post a document on the Portal. How can i achieve this ? Can i do it trigger ? if yes, anyone share me the sample apex code? 
I need to Create an Apex trigger for Opportunity that adds a task to any opportunity set to 'Closed Won' . Can anyone share me the code for this with best practises.
How will we implement the controlling and dependent pick list functionality using VF?
@readonly can we perform dml actions? if no how to achieve this? can anyone suggest me on this ?
Scenario: I hav 1 obj on that i am having all read,write,edit,delete permissions when am trying to delete that raises an error.Why?
I want to create a VF page that display list of accouts and when i select a particular account i want related contact to be displayed there itself. i dont want page to redirect to another page? Can anyone share me the VF code for this?
<apex:page controller="wrapperClassExample">
    <apex:pageBlock title="Account from Wrapper class">
        <apex:pageBlockTable value="{!wraccount}" var="wra">
            <apex:column value="{!wra.acc.name}"/>
        </apex:pageBlockTable>
    </apex:pageBlock>
    <apex:pageBlock title="Opportunity from wrapper class">
        <apex:pageBlockTable value="{!wropportunity}" var="wro">
            <apex:column value="{!wro.opp.name}"/>
        </apex:pageBlockTable>
    </apex:pageBlock>
</apex:page>

Controller:
--------------

public class wrapperClassExample{
public list<wrapperClass> wraplist{get;set;}     
public list<wrapperClass> getwraccount()
{
    list<Account>newacclist=[select id,name from Account limit 3];
    wraplist=new list<wrapperClass>();  
                                  
    for(Account acn:newacclist)
    {
        wraplist.add(new wrapperClass(acn));   
    }
    return wraplist;
 }
    
    public list<wrapperClass> getwropportunity()
    {
        list<Opportunity>opplist=[select id,name from opportunity limit 20];
        wraplist=new list<wrapperClass>();
        for(Opportunity op:opplist)
        {
            wraplist.add(new wrapperClass(op));  
        }
        return wraplist;
    
    }
    
    public class wrapperClass{
    public Account acc{get;set;}
    public Opportunity opp{get;set;}
    public wrapperClass(Account accn){   
        acc=accn;
    }
    public wrapperClass(Opportunity oppn){   
        opp=oppn; 
    }
    }

 }
 
Error:
--------
Error: wrapperClassExample Compile Error: Illegal assignment from List<Account> to List<Account> at line 6 column 5

Can anyone help me out this error where i have modify
 
i have two WF's say wf1 and wf2, in wf1 my RC is a=1 and after FU a value becomes 2 and in wf2 my RC is a=2 and after FU a value becomes 1? my question is how many times WF will be triggered and what will be the final value? any suggestions on this?
I have a requirement when a batch is running and if there is some failure occuring in the records ,a msg should be sent .How do i achieve this? any suggestions on this ?
In visualforce page i do have two buttons one is edit and delete, my requirement is whenver i click on edit button it should need to send notification mail to an external system and for delete button also same? any suggestions on this synario?
I have two custom objects namely student and training here training is a master object in master detail relationship. i want to display the related list of student (child)object in master object by using visualforce pages.Can anyone of you help me on this

Hi,

 

 

How to query on field history object in vf page? i have an object Product_table__c enabled for field tracking for one field

and am getting record id how to know history object API name?

 

Any one help me

 

 

Thank you