• verynewbie
  • NEWBIE
  • 50 Points
  • Member since 2013

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 13
    Replies

Hi

 

I've just set up web-to-lead, and created a Lead Assignment Rule to route new leads to a Queue in SalesForce.

The leads are successfully being entered into the queue, however the automatic email notification of queue members isn't working. The "Send Email to Members" box is selected  and a relevant email address supplied. I also assigned email template. I also made the changes in lead settings .

Are there any other settings I need to look at?

 

 

Hi 

 

I have written a trigger in my sandbox .I am trying to deploy that to production along with my test class(100% code coverage)

I got error in validating.My package is saying too many soql queries.

I ran the test class indivually in sandbox ...all methods are passed with 87% code coverage.

When i run the same class in production its giving me error.What might be the reason?any suggestions?

 

Hi 

 

I created a process-config file for dataloade which works perfectly fine.

I am not sure if I can change these lines ...I want to store this value in text file and have the path given here so that whenever password changes rather than changing conf file we can change only text file and run the file.

Is this possible?Please suggest?

 

<entry key="sfdc.username" Value="admin@Org.org"/>
<entry key="sfdc.password" Value="e8a68b73992a7a54"/>

Hi..

 

I need a trigger which will work anytime the Account Owner changes, update all Account Contacts to that same Owner as their related Account.

 

So I created a trigger..Which doesn't work..To test it i created a account with two contacts .So i get contact owner same as account owner.i manually changed one contact owner to another user

So my account owner ,contact1 owner are user1 and contact 2 owner is user2

 

and changed the account owner/Out of two,only one contac whose owner id is same as account changes and other doesnt.

This is my trigger ..Please help me where i am going wrong.

 

 

trigger Changeownertrigger on Account (after insert,after update) {
  
      Set<Id> accountIds = new Set<Id>(); 
      Map<Id, String> oldOwnerIds = new Map<Id, String>();
      Map<Id, String> newOwnerIds = new Map<Id, String>();
      Contact[] contactUpdates = new Contact[0]; 
     
      for (Account a : Trigger.new) 
      { 
         if (a.OwnerId != Trigger.oldMap.get(a.Id).OwnerId) 
         {
            oldOwnerIds.put(a.Id, Trigger.oldMap.get(a.Id).OwnerId); 
            newOwnerIds.put(a.Id, a.OwnerId); 
            accountIds.add(a.Id); 
         }
      }
        if (!accountIds.isEmpty()) { 
         for (Account acc : [SELECT Id, (SELECT Id, OwnerId FROM Contacts) FROM Account WHERE Id in :accountIds])
            {
            String newOwnerId = newOwnerIds.get(act.Id); 
            String oldOwnerId = oldOwnerIds.get(act.Id); 
            for (Contact c : acc.Contacts) 
            { 
               if (c.OwnerId == oldOwnerId) 
               {
               Contact updatedContact = new Contact(Id = c.Id, OwnerId = newOwnerId);
               contactUpdates.add(updatedContact);
               }
            }
            
            }
       }
            update contactUpdates;
}

 Pease help i need this asap...

 

Hi Friends,

 

I have a visual force page which will have a lookup field and needs to be prepopulated with the parents id when ever the page is called , We are able to do it by passind the parents(lookup) id , name as query string with the lookups field id .

 

But the problem is when we move the code to other org, the field id wont be the same and the lookup is not getting prepopulated.  Is there any better approach for this.?

 

Just sharing my Approach..any new or easy Approach ideas are requested.

 

My approach:I created two buttons one with standard controller =Account another with standard controller =Custom object.

 

1st button-Vf page:

 

<apex:page standardController="CO__c" tabStyle="CO__c" title="C Edit" extensions="controllerone">
<apex:form >
    <apex:sectionHeader title="C Edit" subtitle="New C"/>
        <apex:pageBlock title="C Edit" mode="Edit">
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}"/>
                <apex:commandButton value="Cancel" action="!cancel}"/>
                </apex:pageBlockButtons>
                <apex:pageBlockSection title="Information" collapsible="false" columns="2">
                <apex:inputField value="{!CO__c.First_Name__c}"/>
                <apex:inputField value="{!CO__c.Account__c}"/>
                <apex:inputField value="!Co__c.Last_Name__c}"/>
                <apex:inputField value="{!CO__c.Email__c}"/>
                <apex:inputField value="{!CO__c.Street__c}"/>
                <apex:inputField value="{!CO__c.SSN__c}"/>
                <apex:inputField value="{!CO__c.Phone__c}"/>
            </apex:pageBlockSection>  
        </apex:pageBlock>
        </apex:form>
</apex:page>

Then created another button:

 

<apex:page standardController="Account" extensions="controllertwo" action="{!testing}">

</apex:page>

 Controllertwo code: which calls first 1st button Vf page:

 

Public class controllertwo{
   Account account;
   Account acc;
    public myoppcontroller(ApexPages.StandardController controller) {
    acc = (account)controller.getRecord();

    }   
    Public PageReference testing(){
    PageReference pageRef = new PageReference('/apex/1stbuttonvfpage');
    pageRef.getParameters().put('AccountId', acc.Id);
    return pageRef;

    }
}

 Above code works fine and gets URL as 

https://c.na14.visual.force.com/apex/1stpagevfbutton?AccountId=001d000002Gsjvx

But the problem is i am not able to get the Account lookup field autopopulated.

Please help Or any ideas??

 

 

Hi..

I am kindoff confused with this.

Any help please.....!!!!!

 

I have a req where I need to create a custom button on standard object.Lets suppose it as account.

I have a custom object called Candidate__c which has account look up.

I have to create a custom button on Account..which when clicked,opens candidate__c edit page with account data pre populated.

I created a VF page but not able to access on account button creation.

I also set standardcontroller Please help..Any sample snippet...I need this ASAP!!!

Thanks

 

Hi experts

 

I just started working in a salesforce company as a developer.

This is my trigger.I have a trigger on case object which was written by my old developer,

 

http://wiki.developerforce.com/page/Autocreating_Contacts_From_Web_To_Case

This is what he used.

 

It works fine now.I should include new use case in this trigger where i have to also check with web phone number.

If email match is not found then i should try to find match on contact phone number.If more than one contact has the phone number, pick the one with the most recent created date and  associate the Case with that contact.

 

I dont understand how i can get this.Please help.!!!

 

Hi

 

I've just set up web-to-lead, and created a Lead Assignment Rule to route new leads to a Queue in SalesForce.

The leads are successfully being entered into the queue, however the automatic email notification of queue members isn't working. The "Send Email to Members" box is selected  and a relevant email address supplied. I also assigned email template. I also made the changes in lead settings .

Are there any other settings I need to look at?

 

 

Hi 

 

I have written a trigger in my sandbox .I am trying to deploy that to production along with my test class(100% code coverage)

I got error in validating.My package is saying too many soql queries.

I ran the test class indivually in sandbox ...all methods are passed with 87% code coverage.

When i run the same class in production its giving me error.What might be the reason?any suggestions?

 

Hi 

 

I created a process-config file for dataloade which works perfectly fine.

I am not sure if I can change these lines ...I want to store this value in text file and have the path given here so that whenever password changes rather than changing conf file we can change only text file and run the file.

Is this possible?Please suggest?

 

<entry key="sfdc.username" Value="admin@Org.org"/>
<entry key="sfdc.password" Value="e8a68b73992a7a54"/>

Hi..

 

I need a trigger which will work anytime the Account Owner changes, update all Account Contacts to that same Owner as their related Account.

 

So I created a trigger..Which doesn't work..To test it i created a account with two contacts .So i get contact owner same as account owner.i manually changed one contact owner to another user

So my account owner ,contact1 owner are user1 and contact 2 owner is user2

 

and changed the account owner/Out of two,only one contac whose owner id is same as account changes and other doesnt.

This is my trigger ..Please help me where i am going wrong.

 

 

trigger Changeownertrigger on Account (after insert,after update) {
  
      Set<Id> accountIds = new Set<Id>(); 
      Map<Id, String> oldOwnerIds = new Map<Id, String>();
      Map<Id, String> newOwnerIds = new Map<Id, String>();
      Contact[] contactUpdates = new Contact[0]; 
     
      for (Account a : Trigger.new) 
      { 
         if (a.OwnerId != Trigger.oldMap.get(a.Id).OwnerId) 
         {
            oldOwnerIds.put(a.Id, Trigger.oldMap.get(a.Id).OwnerId); 
            newOwnerIds.put(a.Id, a.OwnerId); 
            accountIds.add(a.Id); 
         }
      }
        if (!accountIds.isEmpty()) { 
         for (Account acc : [SELECT Id, (SELECT Id, OwnerId FROM Contacts) FROM Account WHERE Id in :accountIds])
            {
            String newOwnerId = newOwnerIds.get(act.Id); 
            String oldOwnerId = oldOwnerIds.get(act.Id); 
            for (Contact c : acc.Contacts) 
            { 
               if (c.OwnerId == oldOwnerId) 
               {
               Contact updatedContact = new Contact(Id = c.Id, OwnerId = newOwnerId);
               contactUpdates.add(updatedContact);
               }
            }
            
            }
       }
            update contactUpdates;
}

 Pease help i need this asap...

 

Hi..

I am kindoff confused with this.

Any help please.....!!!!!

 

I have a req where I need to create a custom button on standard object.Lets suppose it as account.

I have a custom object called Candidate__c which has account look up.

I have to create a custom button on Account..which when clicked,opens candidate__c edit page with account data pre populated.

I created a VF page but not able to access on account button creation.

I also set standardcontroller Please help..Any sample snippet...I need this ASAP!!!

Thanks

 

Hi experts

 

I just started working in a salesforce company as a developer.

This is my trigger.I have a trigger on case object which was written by my old developer,

 

http://wiki.developerforce.com/page/Autocreating_Contacts_From_Web_To_Case

This is what he used.

 

It works fine now.I should include new use case in this trigger where i have to also check with web phone number.

If email match is not found then i should try to find match on contact phone number.If more than one contact has the phone number, pick the one with the most recent created date and  associate the Case with that contact.

 

I dont understand how i can get this.Please help.!!!

 

Hi Guys,

 

I have a visual force page which will have a lookup field and needs to be prepopulated with the parents id when ever the page is called , We are able to do it by passind the parents(lookup) id , name as query string with the lookups field id .

 

But the problem is when we move the code to other org, the field id wont be the same and the lookup is not getting prepopulated.  Is there any better approach for this.