• shoba shoba
  • NEWBIE
  • 19 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 18
    Replies
Any anyone give me an idea how to move the trigger code to Apex class. My code is
trigger InsertingBU on Opportunity (after insert,after update) 
{
    Set<Id> accountIds = new Set<Id>();
    for(Opportunity o : Trigger.New)
        accountIds.add(o.AccountId);
        
    List<Business_Unit_Company__c> buCompaniesToBeUpserted = new List<Business_Unit_Company__c>();   

    Map<Id,Business_Unit_Company__c> existingBuCompanies = new Map<Id,Business_unit_Company__c>();
    
    for(Business_Unit_Company__c bu : [Select Business_Unit__c,Company__c,Stage__c from Business_Unit_Company__c where Company__c IN: accountIds])
      existingBuCompanies.put(bu.Business_Unit__c, bu);
      
    for(Opportunity o : Trigger.New) 
    {
      if(o.Opportunity_Business_Unit__c != null && existingBuCompanies.get(o.Opportunity_Business_Unit__c) != null)
      {
        Business_Unit_Company__c relatedBuCompany = existingBuCompanies.get(o.Opportunity_Business_Unit__c);                              
        if(relatedBuCompany.Stage__c != 'Closed Won')
        {
          if(o.StageName == 'Closed Won')
          {
            relatedBuCompany.Stage__c = 'Closed Won';
            buCompaniesToBeUpserted.add(relatedBuCompany);
          }
          else if(relatedBuCompany.Stage__c != 'Closed Lost' && o.StageName == 'Closed Lost')
          {
            relatedBuCompany.Stage__c = 'Closed Lost';
            buCompaniesToBeUpserted.add(relatedBuCompany);
          }
          else if(relatedBuCompany.Stage__c != 'Open')
          {
            relatedBuCompany.Stage__c = 'Open';
            buCompaniesToBeUpserted.add(relatedBuCompany);
          }
        }        
      } 
      else if(o.Opportunity_Business_Unit__c != null)
      {
        Business_Unit_Company__c newBuCompany = new Business_Unit_Company__c();
        newBuCompany.Company__c = o.AccountId;
        newBuCompany.Business_Unit__c = o.Opportunity_Business_Unit__c;
        if(o.StageName.contains('Closed'))
        {
          newBuCompany.stage__c = o.StageName ;
        }
        else
        {
          newBuCompany.stage__c ='Open';
        }
        buCompaniesToBeUpserted.add(newBuCompany);
      }   
    }
    if(!buCompaniesToBeUpserted.IsEmpty())
      upsert buCompaniesToBeUpserted;
}

 
Hi
In Account object, therre is a duplicate management rule for account name. We override the edit page of account. The problem is  when the user try to create a duplicate record it throwing the error like "Update failed. First exception on row 0 with id 001Q0000010c9osIAA; first error: DUPLICATES_DETECTED, You may be creating a duplicate record. If so, we recommend you use the existing record instead.: []
Error is in expression '{!CustomSave}' in component <apex:commandButton> in page customsavepage: Class.CustomControllerSaveofAccount.CustomSave: line 21, column 1".
But i wan to show like this
User-added image
Can anyone help me out to solve this issue.
Hi my scenario is to display the popup window(In this i want to display related contacts) , if the account address is updated.  I tried this using jquery its not showing the popup in the account detail page. Can anyone help me out to show popup window in the account page itself.
public class testforoverridingsave 
{  
  public Id accId{get; set;}
  public final Account oldRecord;   
  public static Account newRecord;           
  public testforoverridingsave(ApexPages.StandardController controller) 
  {
    accId = ApexPages.CurrentPage().getparameters().get('id'); 
    oldRecord = [select Id, BillingStreet, BillingCity, BillingState, BillingCountry, BillingPostalCode from Account where Id =: accId];     
  }
  
  public PageReference isAddressChanged()
  {
    Boolean changed = false;
    newRecord = [select Id, BillingStreet, BillingCity, BillingState, BillingCountry, BillingPostalCode from Account where Id =: accId]; 
    If(oldRecord.BillingStreet != newRecord.BillingStreet || oldRecord.BillingCity != newRecord.BillingCity 
       || oldRecord.BillingState != newRecord.BillingState || oldRecord.BillingCountry != newRecord.BillingCountry
       || oldRecord.BillingPostalCode != newRecord.BillingPostalCode)
      changed = true;
    
    return changed?new PageReference('/apex/WrapperClass?accountId=' + newRecord.Id):new PageReference('/' + newRecord.Id);    
  }
}


<apex:page standardController="Account" extensions="testforoverridingsave">
 <apex:includescript value="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"/>
 <script type="text/javascript">

 
  function redirectFunction()
  {
    var myWindow = window.open(addressChanged(),'','width=20000,height=20000,top=1000,left=550'); 
    
  }
  
 </script>
 <apex:form id="form">
  <apex:actionFunction action="{!isAddressChanged}" name="addressChanged" />
  <apex:actionFunction action="{!isAddressChanged}" name="addressChanged" />
 </apex:form>
 <apex:detail inlineEdit="true" showChatter="true" oncomplete="redirectFunction()" />
</apex:page>
Thanks Inadvance
 
Hi
My scenario is to update the checkbox field if the Address field in Account is update. After 30 second of the record saved, it should uncheck the checkbox field.

Can anyone help me out to solve this issue.
Trigger throwing an error "
trigger test on Account (before update) {
list<Account> a =  new list<Account>();
Account acc = [select Id,checkboxForPopUp__c,BillingAddress,BillingCity,BillingCountry,BillingCountryCode,BillingPostalCode,BillingState,BillingStateCode,BillingStreet
                         from Account
                         where Id =:trigger.new];
if( (acc!=Null) &&
((acc.BillingAddress != trigger.oldmap.get(acc.id).BillingAddress) || (acc.BillingCity != trigger.oldmap.get(acc.id).BillingCity) ||
(acc.BillingCountry != trigger.oldmap.get(acc.id).BillingCountry) || (acc.BillingStateCode != trigger.oldmap.get(acc.id).BillingStateCode) ||
(acc.BillingStreet != trigger.oldmap.get(acc.id).BillingStreet))  
)
{
acc.checkboxForPopUp__c = TRUE;
a.add(acc);
}
update acc;
}

execution of BeforeUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id 001Q00000104rDvIAI; first error: SELF_REFERENCE_FROM_TRIGGER, Object (id = 001Q00000104rDv) is currently in trigger test, therefore it cannot recursively update itself: []: Trigger.test: line 15, column 1"
Hi I want to show the pagination for the wrapper class for the below code.  Can anyone help me out how to solve this.
public class opentasks {
    public List<Contact> open{get;set;}
    public Id Accld{get;set;}
    //public set<string> st;
    public list<Account> le{get;set;}
    public list<wrapperclass> listwrapper{get;set;}
    Public  boolean refreshpage{get;set;}    
    public opentasks(ApexPages.StandardController controller){
        Accld = ApexPages.CurrentPage().getparameters().get('id');
        list<Contact> open1 =new list<Contact>();
        listwrapper = new list<wrapperclass>();
         le =[SELECT Id,BillingState,BillingCountry,BillingStreet,BillingCity,BillingPostalCode,
             (Select Id,Email,MailingState,MailingStreet,MailingCountry,MailingCity,Contact_Type__c,MailingPostalCode 
                             FROM Contacts )
                            FROM Account WHERE Id =:Accld];       
        if(!le.isEmpty()){           
            for(Contact k: le[0].Contacts)
            {
              listwrapper.add(new Wrapperclass(k));            
            }
        }
    }
    public class wrapperclass
    {
        public  boolean checked{get;set;}
        public Contact k{get;set;}
        public Wrapperclass(Contact k){
            this.k=k;
        }
    }
  public PageReference Updates()
    {  
        list<Contact> listofopen=new list<Contact>();
        if(!listwrapper.isEmpty()){
            for(Integer i=0; i<listwrapper.size();i++)
            {
                wrapperclass w = listwrapper[i];           
                if(w.checked==true){
                    system.debug(w);
                    w.k.MailingCountry=le[0].BillingCountry;
                    w.k.MailingStreet=le[0].BillingStreet;
                    w.k.MailingCity=le[0].BillingCity;
                    w.k.MailingState=le[0].BillingState;
                    w.k.MailingPostalCode=le[0].BillingPostalCode;
                    listofopen.add(w.k);
                    //listwrapper.remove(i);
                    //i--;
                    update listofopen;   
   
                                }
             
            }

        }

        if(listofopen.isEmpty())

        {

            ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR,'Select atleast one column '));

        }
  return null;
    }  
    public PageReference UpdatesAll()

    {  

        list<Contact> listofopen1=new list<Contact>();
        for(Integer i=0; i<listwrapper.size();i++)
            {
             wrapperclass w = listwrapper[i];
        if(!listwrapper.isEmpty()){
                   
                    system.debug(w);
                    w.k.MailingCountry=le[0].BillingCountry;
                    w.k.MailingStreet=le[0].BillingStreet;
                    w.k.MailingCity=le[0].BillingCity;
                    w.k.MailingState=le[0].BillingState;
                    w.k.MailingPostalCode=le[0].BillingPostalCode;
                    listofopen1.add(w.k);
                    //listwrapper.remove(i);
                   // i--;
                    update listofopen1;      
                                }                                        
            }
               return null; 
        }

}

VisualForce Page:
<apex:page standardController="Account" extensions="opentasks"  >
<apex:form >
        <apex:pageBlock title="Contacts" mode="edit"  id="opnTsks" >
        <apex:Messages /> 
              <apex:pageblockButtons location="Top" >  
              <apex:commandButton value="Update" action="{!Updates}"  id="opnTsks"/>
              <apex:commandButton value="UpdateAll" action="{!UpdatesAll}"  />                
              </apex:pageblockButtons>
                          <apex:pageBlockTable value="{!listwrapper}" var="each" >

                <apex:column headerValue="Action">

                     <apex:inputCheckbox value="{!each.checked}"/>
                   </apex:column>

                <apex:column headerValue="MailingCountry" value="{!each.k.MailingCountry}"/>
                <apex:column headerValue="MailingStreet" value="{!each.k.MailingStreet}"/>
                <apex:column headerValue="MailingCity" value="{!each.k.MailingCity}"/>
                <apex:column headerValue="MailingState" value="{!each.k.MailingState}"/>
                <apex:column headerValue="MailingPostalCode" value="{!each.k.MailingPostalCode}"/>
                
            </apex:pageBlockTable>
            <apex:outputPanel id="refresh" rendered="true">

 <apex:outputPanel id="refresh1" rendered="{!refreshPage}">   
 </apex:outputPanel>
</apex:outputPanel>
         
        </apex:PageBlock>
</apex:form>
</apex:page>
Thanks In Advance
Hi,
I am new in Salesforce...I want to design a pop up window.  My requirement is when Account address field is updated(Inline editing), i wan to show the popup window(In this i will display related contact). can anyone help me out to solve this issue.
 
<apex:page standardController="Account" extensions="testforoverridingsave">
<apex:form >
<apex:detail inlineEdit="true"/>
<apex:commandButton action="{!save}" value="Calculate" onComplete="showpopup();"/>
<style type="text/css">
.customPopup {
    background-color: white;
    border-style: solid;
    border-width: 2px;
    left: 20%;
    padding: 10px;
    position: absolute;
    z-index: 9999;
    /* These are the 3 css properties you will need to tweak so the pop 
                            up displays in the center of the screen. First set the width. Then set 
                            margin-left to negative half of what the width is. You can also add 
                            the height property for a fixed size pop up.*/
    width: 500px;
    top: 20%;
}

.disabledTextBox {
    background-color: white;
    border: 1px solid;
    color: black;
    cursor: default;
    width: 90px;
    display: table;
    padding: 2px 1px;
    text-align:right;
}   

.closeButton {
    float: right;
}
</style> 
</apex:form>
</apex:page>


Apex Class
public class testforoverridingsave {
    public  Account[] oldRecords;
    public  Account[] NewRecords;                  
    public testforoverridingsave(ApexPages.StandardController controller) {
           
    }
   public PageReference save() {
   // Do the standard save action
      this.save();
    NewRecords = [select Id,BillingAddress,BillingCity,BillingCountry,BillingCountryCode,BillingPostalCode,BillingState,BillingStateCode,BillingStreet
                         from Account
                         limit 1];
    oldRecords  = NewRecords.deepClone(true,true,true);
   update  NewRecords;            
   if(NewRecords[0].BillingCity != oldRecords[0].BillingCity){
   
  
   }
    return null;


}
}

Thanks In Advance
 

Hi
The requirement is, When the user tries to update the address field in detail page using inline editing. When he click SAVE button in account,at that time it should save the Account and it should show an pop up window (In that i want to display related contact Name,Address field and checkbox as well as update button).
 
Can anyone help me out to solve this issue or sample code related to this scenario.

Thanks In Advance

Hi my scenario is to restrict the user,if they try to edit the opportunity record after the three business days from the ClosedDate field. For example : if i update the opportunity after three days from the ClosedDate(5/12/2016), it will through an alart message, then if i edit the ClosedDate as 5/13/2016 then the record will save. But by requirement is to restrict the update operation itself. 
(CASE( 
MOD( CloseDate - DATE(1900, 1, 7), 7), 
0, CloseDate+3, 
1, CloseDate+3, 
2, CloseDate+3, 
3, CloseDate+5, 
4, CloseDate+5, 
5, CloseDate+5, 
6, CloseDate+4, 

CloseDate))<=TODAY()

 

I have a created two custom fields in lead called Alternate email1, Alternate email2 .

My scenario is to show an alert message for the duplicate email while inserting or updating the record.  For e.g. if X@gmail.com exist in EmailID(Standard field)  in  a lead then it should not be allowed to be entered as Email or alternate email ids(Custom field)  of other lead and the vice versa.
At the same time while inserting the record in lead , the email id mention in Email,Alternate email1, Alternate email2 field should be different otherwise it should through an alert message.
Can anyone help me out to solve this.

trigger leadDuplicate on Lead (before insert, before update) {

Map<String, Lead> leadMap = new Map<String, Lead>();

for (Lead lead : System.Trigger.new) {

if ((lead.Email != null) &&

    (System.Trigger.isInsert || (lead.Email != System.Trigger.oldMap.get(lead.Id).Email))) {

if ((leadMap.containsKey(lead.Email)) || (leadMap.containsKey(lead.Alternate_Email1__c)) || (leadMap.containsKey(lead.Alternate_Email_2__c))) {

  lead.Email.addError('Another new lead has the ' + 'same email address.');

} else { 

    leadMap.put(lead.Email, lead);
    leadMap.put(lead.Alternate_Email1__c, lead); 
    leadMap.put(lead.Alternate_Email_2__c, lead);  

}

}

}

for (Lead lead : [SELECT Email,Alternate_Email_2__c,Alternate_Email1__c FROM Lead
                  WHERE ((Email IN :leadMap.KeySet()) or (Alternate_Email_2__c IN :leadMap.KeySet()) or (Alternate_Email1__c IN :leadMap.KeySet()))] ) {

Lead newLead = leadMap.get(lead.Email);


Lead.Email.addError('A lead with this email ' + 'address already exists.');

}

}
Thanks In Advance

For an opportunity i want to calculate the weekends. In Sucess Community i saw  a code. But i can't understand what the logic they used.

CASE(MOD( StartDate__c - DATE(1985,6,24),7),
  0 , CASE( MOD( EndDate__c - StartDate__c, 7),1,0,2,0,3,0,4,0,5,1,6,2,0),
  1 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,0,2,0,3,0,4,0,5,2,2),
  2 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,0,2,0,3,1,2),
  3 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,0,2,1,2),
  4 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,1,2),
  5 , CASE( MOD( EndDate__c - StartDate__c, 7),0,1,2),
  6 , CASE( MOD( EndDate__c - StartDate__c, 7),6,2,1),
  999)
  +
  (FLOOR(( EndDate__c - StartDate__c )/7)*2)
Can anyone please help to understand this.  Thanks In Advance.

 

My scenario is to calculate the holidays for an opportunity.  For this i have created an custom field(DateType: Integer) in opportunity called "Holidayslist__c"(This field i want to display no of holidays).
1.If my opportunity is in "Open" , i want to calculate the holidays between the opportunity CreatedDate field to TODAY.
2.If Opportunity is "Closed", i want to calculate the holidays between the CreatedDate field to ClosedDate.
I wrote a trigger its working , is there anyother option to do this scenario in configuration part like using  visual flow. Can anyone give me suggestion how to do this please.
My scenario is to calculate the no of holidays for an opportunity. For this i wrote an apex class but its not working. Can anyone help me out to solve this issue. Am  new to salesforce
public class testforholidays
{
public list<opportunity> opp;
public list<holiday> hd;
public set<date> st = new set<date>();
public integer testforholidays(){
opp =[select id,Name,CreatedDate,Holidayslist__c,AccountId,Opportunity_Business_Unit__c,Region__c,
      LeadSource,Lead_Source_Detail__c, StageName,CloseDate,CurrencyIsoCode,Contact_Name__c,Type,
      Closed_Won_Reason__c 
      from opportunity limit 1];
    for(opportunity opt: opp){
    st.add(opt.CreatedDate.date());
    }
hd = [SELECT Name,ActivityDate FROM Holiday];
Integer ise = 0;
for(holiday h : hd){
 if((h.ActivityDate> (system.today())) && (h.ActivityDate<opt.st)  ){
 ise++;
 }
}
opp.Holidayslist__c=ise;
update opp;
return ise;

}

}
My scenario is to display all the dashboard in the homepage. For this i wrote visualforce page and then i added to home page component. It showing all the dashboard in the homepage when we click the dashboard its not redirecting to dashboard page. Can any one help me out to solve this issue. Thanks in advance.
 
<apex:page showheader="false" sidebar="false">
<apex:outputPanel id="SalesfunnelDashboard" >
     <script>
     window.location.href="https://cs51.salesforce.com/01Z4B0000000FwO?isdtp=vw";
   
       
     </script>
     </apex:outputPanel>
</apex:page>

 
I wrote a process builder which will update the region field depends on billing country in Account .
I wrote a trigger to show error if it not have a contact while updating the Account.
While am creating a new account it throwing an error like
"Workflow Action Failed to Trigger Flow
The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3014B0000000yDZ. Contact your administrator for help. Click here to return to the previous page".

Can anyone help me out to solve this issue please. Thanks in advance.

Hi 
For an opportunity there is a feature called "Save and  Add" button,while clicking this button it will save the opportunity and redirect to opportunitylineitem to add products. Is there is any feature in account object that while saving account  it should save and redirect to its contact.
Thanks in advance.

Hi
My scenario is to update the checkbox field if the Address field in Account is update. After 30 second of the record saved, it should uncheck the checkbox field.

Can anyone help me out to solve this issue.
Trigger throwing an error "
trigger test on Account (before update) {
list<Account> a =  new list<Account>();
Account acc = [select Id,checkboxForPopUp__c,BillingAddress,BillingCity,BillingCountry,BillingCountryCode,BillingPostalCode,BillingState,BillingStateCode,BillingStreet
                         from Account
                         where Id =:trigger.new];
if( (acc!=Null) &&
((acc.BillingAddress != trigger.oldmap.get(acc.id).BillingAddress) || (acc.BillingCity != trigger.oldmap.get(acc.id).BillingCity) ||
(acc.BillingCountry != trigger.oldmap.get(acc.id).BillingCountry) || (acc.BillingStateCode != trigger.oldmap.get(acc.id).BillingStateCode) ||
(acc.BillingStreet != trigger.oldmap.get(acc.id).BillingStreet))  
)
{
acc.checkboxForPopUp__c = TRUE;
a.add(acc);
}
update acc;
}

execution of BeforeUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id 001Q00000104rDvIAI; first error: SELF_REFERENCE_FROM_TRIGGER, Object (id = 001Q00000104rDv) is currently in trigger test, therefore it cannot recursively update itself: []: Trigger.test: line 15, column 1"
Hi,
I am new in Salesforce...I want to design a pop up window.  My requirement is when Account address field is updated(Inline editing), i wan to show the popup window(In this i will display related contact). can anyone help me out to solve this issue.
 
<apex:page standardController="Account" extensions="testforoverridingsave">
<apex:form >
<apex:detail inlineEdit="true"/>
<apex:commandButton action="{!save}" value="Calculate" onComplete="showpopup();"/>
<style type="text/css">
.customPopup {
    background-color: white;
    border-style: solid;
    border-width: 2px;
    left: 20%;
    padding: 10px;
    position: absolute;
    z-index: 9999;
    /* These are the 3 css properties you will need to tweak so the pop 
                            up displays in the center of the screen. First set the width. Then set 
                            margin-left to negative half of what the width is. You can also add 
                            the height property for a fixed size pop up.*/
    width: 500px;
    top: 20%;
}

.disabledTextBox {
    background-color: white;
    border: 1px solid;
    color: black;
    cursor: default;
    width: 90px;
    display: table;
    padding: 2px 1px;
    text-align:right;
}   

.closeButton {
    float: right;
}
</style> 
</apex:form>
</apex:page>


Apex Class
public class testforoverridingsave {
    public  Account[] oldRecords;
    public  Account[] NewRecords;                  
    public testforoverridingsave(ApexPages.StandardController controller) {
           
    }
   public PageReference save() {
   // Do the standard save action
      this.save();
    NewRecords = [select Id,BillingAddress,BillingCity,BillingCountry,BillingCountryCode,BillingPostalCode,BillingState,BillingStateCode,BillingStreet
                         from Account
                         limit 1];
    oldRecords  = NewRecords.deepClone(true,true,true);
   update  NewRecords;            
   if(NewRecords[0].BillingCity != oldRecords[0].BillingCity){
   
  
   }
    return null;


}
}

Thanks In Advance
 

Hi
The requirement is, When the user tries to update the address field in detail page using inline editing. When he click SAVE button in account,at that time it should save the Account and it should show an pop up window (In that i want to display related contact Name,Address field and checkbox as well as update button).
 
Can anyone help me out to solve this issue or sample code related to this scenario.

Thanks In Advance

Hi my scenario is to restrict the user,if they try to edit the opportunity record after the three business days from the ClosedDate field. For example : if i update the opportunity after three days from the ClosedDate(5/12/2016), it will through an alart message, then if i edit the ClosedDate as 5/13/2016 then the record will save. But by requirement is to restrict the update operation itself. 
(CASE( 
MOD( CloseDate - DATE(1900, 1, 7), 7), 
0, CloseDate+3, 
1, CloseDate+3, 
2, CloseDate+3, 
3, CloseDate+5, 
4, CloseDate+5, 
5, CloseDate+5, 
6, CloseDate+4, 

CloseDate))<=TODAY()

 

For an opportunity i want to calculate the weekends. In Sucess Community i saw  a code. But i can't understand what the logic they used.

CASE(MOD( StartDate__c - DATE(1985,6,24),7),
  0 , CASE( MOD( EndDate__c - StartDate__c, 7),1,0,2,0,3,0,4,0,5,1,6,2,0),
  1 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,0,2,0,3,0,4,0,5,2,2),
  2 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,0,2,0,3,1,2),
  3 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,0,2,1,2),
  4 , CASE( MOD( EndDate__c - StartDate__c, 7),0,0,1,1,2),
  5 , CASE( MOD( EndDate__c - StartDate__c, 7),0,1,2),
  6 , CASE( MOD( EndDate__c - StartDate__c, 7),6,2,1),
  999)
  +
  (FLOOR(( EndDate__c - StartDate__c )/7)*2)
Can anyone please help to understand this.  Thanks In Advance.

 

Hi,
I had requirement to do some extra stuff  when user create a new  an account or edit an account. So I want to overrride the  standard save button .
I wnat to override the save button in apex could anyone guide me how to do that.

Thanks
My scenario is to display all the dashboard in the homepage. For this i wrote visualforce page and then i added to home page component. It showing all the dashboard in the homepage when we click the dashboard its not redirecting to dashboard page. Can any one help me out to solve this issue. Thanks in advance.
 
<apex:page showheader="false" sidebar="false">
<apex:outputPanel id="SalesfunnelDashboard" >
     <script>
     window.location.href="https://cs51.salesforce.com/01Z4B0000000FwO?isdtp=vw";
   
       
     </script>
     </apex:outputPanel>
</apex:page>

 

Hi 
For an opportunity there is a feature called "Save and  Add" button,while clicking this button it will save the opportunity and redirect to opportunitylineitem to add products. Is there is any feature in account object that while saving account  it should save and redirect to its contact.
Thanks in advance.

Hi,
 Duplicate alert

As shown in the image i need to get the possible duplicate records when i am inserting record from apex class or Api.

when i am executing from apex class with the following code
Account ll =  new lead();
ll.Name = 'Burlington Textiles Corp of America';
insert ll;

it showing error without possibilities like this
User-added image

Please help on this.

Hi,

 I am new in Salesforce...I want to design a pop up window. The window will appear after save button is hit which will show the values those an user has entered as input. After the pop up comes out then the user will click the ok in pop up and the page will be redirected to the object view page.

 

Now how can I implement it throgh java script or any other possible way.

Can u pls provide some sample coding for it.

 

Thanks in advance,

  • September 28, 2011
  • Like
  • 0