• rush
  • NEWBIE
  • 25 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 8
    Replies

I have what I thought woudl be a very simple scenario to setup, but am having issues getting anything to come through on it, though no errors actually appear.

 

I have this on my visual force page

 

<apex:inputField value="{!Lead.Parent__c}" id="Parent"/>

 

I have a URL that is being generated from a workflow rule, included in an email, and sent to an external contact.  From this URL they navigate to the page that includes the above inputField.  The URL is such as....

 

http://testdomain.force.com/test?Parent=500F000000EHXs8

 

......however the field will NOT load any value nor will it pass on anything when the form is submitted.  Any help much appreciated as I am missed something obvious I think, but I cannot seem to find anything specifically for this in help anywhere.

 

 

  • March 05, 2013
  • Like
  • 0

 

What happens to a Subscribed lead in one instance is converted in the system that published it?

  • August 30, 2012
  • Like
  • 0

 

Is there any way to make sure that a batch process does not actviate any further triggers from occuring after it as a result of its run?

 

I have the below code in place and want to run it overnight, however it is producing far too many SOQL queries and limits are causing it to error.  The basic goal here is to summarize data from at least two other objects (leads and opps so far) and place the totals on the Contact record.

 

global class batchonContact_updatekpi implements Database.Batchable<Contact>{
	List<Contact> ConsToUpdate = [SELECT Id, KPI_Dig_Audit_Closed__c, KPI_Dig_Audit_Converts__c, KPI_Dig_Audit_Requests__c, KPI_Dig_Audit_Won_Value__c FROM Contact Where RecordTypeId = '012F0000000y9gDIAQ'];
	global Iterable<Contact> start(database.batchablecontext Conkpi){
		return (ConsToUpdate);
	}
	global void execute(Database.BatchableContext Conkpi, List<Contact> scope){

		Set<String> AfflRepList = new Set<String>();
		String ConIdToAdd;
		List<Contact> masterAFFLCON = [SELECT Id, KPI_Dig_Audit_Closed__c, KPI_Dig_Audit_Converts__c, KPI_Dig_Audit_Requests__c, KPI_Dig_Audit_Won_Value__c FROM Contact Where RecordTypeId = '012F0000000y9gDIAQ' AND AccountId = '001F000000gfrcZ'];
		for(Contact tempCon1 : masterAFFLCON){
			ConIdToAdd = tempCon1.Id;
			AfflRepList.add(ConIdToAdd);
		}
		List<Lead> sumLeads = [SELECT Id, RecordTypeId, SalesRep__c, Status, IsConverted FROM Lead Where SalesRep__c IN :AfflRepList];	
		List<Opportunity> sumOpps = [SELECT Id, RecordTypeId, Sales_Rep__c, StageName, IsWon, Amount FROM Opportunity Where Sales_Rep__c IN :AfflRepList];
		for(Contact tempCon2 : masterAFFLCON){
			tempCon2.KPI_Dig_Audit_Requests__c = 0;
			tempCon2.KPI_Dig_Audit_Converts__c = 0;
			tempCon2.KPI_Dig_Audit_Closed__c = 0;
			tempCon2.KPI_Dig_Audit_Won_Value__c = 0;
			for(Lead tempLead1 : sumLeads){
				if(tempLead1.SalesRep__c == tempCon2.Id){
					tempCon2.KPI_Dig_Audit_Requests__c = tempCon2.KPI_Dig_Audit_Requests__c + 1;
					if(tempLead1.IsConverted == True){
						tempCon2.KPI_Dig_Audit_Converts__c = tempCon2.KPI_Dig_Audit_Converts__c + 1;
					}
				}
			}
			for(Opportunity tempOpp1 : sumOpps){
				if(tempOpp1.Sales_Rep__c == tempCon2.Id && tempOpp1.IsWon == True){
					tempCon2.KPI_Dig_Audit_Closed__c = tempCon2.KPI_Dig_Audit_Closed__c + 1;
					tempCon2.KPI_Dig_Audit_Won_Value__c = tempCon2.KPI_Dig_Audit_Won_Value__c + tempOpp1.Amount;
				}
			}
		}
		update masterAFFLCON;
	}
	global void finish(Database.BatchableContext info){
	}
}

 

  • July 28, 2012
  • Like
  • 0

 

I have a basic Account page in Visualforce via Sites that creates an account.  I have the attachment tool as well up and running.  I am still trying to make the attachment required and as of yet have been unable to find anything specific on it.  Could anyone direct me to some information on this?

 

Much appreciated.

 

 

  • March 28, 2012
  • Like
  • 0

 

Should/Does an insert of a child object create an update trigger on the parent in a master detial relationship?  I thought it had been changed about a year ago so it did not, but I cannot find the specific documentation for it at this time.

 

Thanks for any help.

  • May 20, 2011
  • Like
  • 0

 

I am performing a before update trigger on a record that creates records on a child object.  It has been working fine.  Now I am simply adding one field to the insert on the child, and when trying to update the code I am getting a 'recursive trigger' error.  I know basically what this means, but didn't think inserting child records pushed an update trigger on a parent record. 

 

So, in other words, the update on the parent record triggers an insert of child records which then tries to trigger an update event on the parent record all over again.  Is there a way to prevent this from occuring?

 

It is strange I didn't have a problem with this just a couple weeks ago when I initially deployed this trigger code.

  • May 19, 2011
  • Like
  • 0

 

Is there any way to make sure that a batch process does not actviate any further triggers from occuring after it as a result of its run?

 

I have the below code in place and want to run it overnight, however it is producing far too many SOQL queries and limits are causing it to error.  The basic goal here is to summarize data from at least two other objects (leads and opps so far) and place the totals on the Contact record.

 

global class batchonContact_updatekpi implements Database.Batchable<Contact>{
	List<Contact> ConsToUpdate = [SELECT Id, KPI_Dig_Audit_Closed__c, KPI_Dig_Audit_Converts__c, KPI_Dig_Audit_Requests__c, KPI_Dig_Audit_Won_Value__c FROM Contact Where RecordTypeId = '012F0000000y9gDIAQ'];
	global Iterable<Contact> start(database.batchablecontext Conkpi){
		return (ConsToUpdate);
	}
	global void execute(Database.BatchableContext Conkpi, List<Contact> scope){

		Set<String> AfflRepList = new Set<String>();
		String ConIdToAdd;
		List<Contact> masterAFFLCON = [SELECT Id, KPI_Dig_Audit_Closed__c, KPI_Dig_Audit_Converts__c, KPI_Dig_Audit_Requests__c, KPI_Dig_Audit_Won_Value__c FROM Contact Where RecordTypeId = '012F0000000y9gDIAQ' AND AccountId = '001F000000gfrcZ'];
		for(Contact tempCon1 : masterAFFLCON){
			ConIdToAdd = tempCon1.Id;
			AfflRepList.add(ConIdToAdd);
		}
		List<Lead> sumLeads = [SELECT Id, RecordTypeId, SalesRep__c, Status, IsConverted FROM Lead Where SalesRep__c IN :AfflRepList];	
		List<Opportunity> sumOpps = [SELECT Id, RecordTypeId, Sales_Rep__c, StageName, IsWon, Amount FROM Opportunity Where Sales_Rep__c IN :AfflRepList];
		for(Contact tempCon2 : masterAFFLCON){
			tempCon2.KPI_Dig_Audit_Requests__c = 0;
			tempCon2.KPI_Dig_Audit_Converts__c = 0;
			tempCon2.KPI_Dig_Audit_Closed__c = 0;
			tempCon2.KPI_Dig_Audit_Won_Value__c = 0;
			for(Lead tempLead1 : sumLeads){
				if(tempLead1.SalesRep__c == tempCon2.Id){
					tempCon2.KPI_Dig_Audit_Requests__c = tempCon2.KPI_Dig_Audit_Requests__c + 1;
					if(tempLead1.IsConverted == True){
						tempCon2.KPI_Dig_Audit_Converts__c = tempCon2.KPI_Dig_Audit_Converts__c + 1;
					}
				}
			}
			for(Opportunity tempOpp1 : sumOpps){
				if(tempOpp1.Sales_Rep__c == tempCon2.Id && tempOpp1.IsWon == True){
					tempCon2.KPI_Dig_Audit_Closed__c = tempCon2.KPI_Dig_Audit_Closed__c + 1;
					tempCon2.KPI_Dig_Audit_Won_Value__c = tempCon2.KPI_Dig_Audit_Won_Value__c + tempOpp1.Amount;
				}
			}
		}
		update masterAFFLCON;
	}
	global void finish(Database.BatchableContext info){
	}
}

 

  • July 28, 2012
  • Like
  • 0

 

Should/Does an insert of a child object create an update trigger on the parent in a master detial relationship?  I thought it had been changed about a year ago so it did not, but I cannot find the specific documentation for it at this time.

 

Thanks for any help.

  • May 20, 2011
  • Like
  • 0

What I am trying to accomplish (given all the SF EE and my skill limitations) is to pull up in a formula field for Account total Amount of only the 1st Closed Won opportunity associated with that account. It basically will tell sales folks (and provide data for reports) that shows how much customers usually spend the first time they buy.

 

So how do I write a condition that shows only the first "Closed Won" opportunity for the Account?

I'm trying to create a picklist using <apex:selectList>, populate it with my own selections, and require the field to contain a value. Here's my code:

 

 

<apex:selectList required="true" size="1" value="{!SDQA__c.Inspector_Stamp1__c}" > <apex:selectOption itemLabel="{!SDQA__c.Inspector_Stamp1__c}" itemValue="{!SDQA__c.Inspector_Stamp1__c}" /> <apex:selectOption itemLabel="{!$User.FirstName} {!$User.LastName}" itemValue="{!$User.FirstName} {!$User.LastName}" /> <apex:selectOption itemLabel="N/A" itemValue="N/A" /> </apex:selectList>

 

The first value defaults to whatever the field currently contains (which will initially be null). The other two options are either the users First Name+Last Name, or N/A. The problem is that even though I have required="true", there is no validation enforced on this field (The red "required" bar doesn't even show up beside it). Anybody have an idea as to why that is?