• GeneRegistry
  • NEWBIE
  • 0 Points
  • Member since 2012

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

I am trying to call a Flow (not workflow but flow) from inside a trigger:

trigger OpportunityTriggerAfter on Opportunity (after insert,after update) {
public Flow.Interview.Update_Opportunity_w_Favorite_Venue_Info fl;
for(Opportunity o:Trigger.New){

if(Trigger.isInsert){
   		                     
fl.vaOpportunityID = o.Id;

}
}

 although I'm not certain if you can do this or if this is even the correct syntax. I'm also getting a CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY error even though the flow I am calling doesn't perform an update on the Opportunity but instead only takes the opportunity ID as a starting parameter. If I try fl = new Flow.Interview.Update_Opportunity_w_Favorite_Venue_Info(o.Id); I get a constructor not defined error even though this can be done in the following doc: http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_flows_advanced.htm

My questions are:

1.) Is this even possible? If so what is the syntax (do I have the correct syntax)?
2.) Why am I getting the CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY error?

I'm currently trying to research if there is a way to update my organization's Lead assignment rules so that incoming Leads only get assigned to users who are logged in.

So far, I've had no luck though. Has anyone had a similar problem or knows how to resolve this?

Hi.

I'm having difficulty getting a workflow on the opportunity to work.

 

The workflow is Active.

 

The evaluation criteria is: When a record is created, or when a record is edited and did not previously meet the rule criteria.

The rule criteria is:

(Opportunity: Opportunity Name EQUALS ClicktoolsTest-Wedding Event-Photography) AND (Opportunity: Stage EQUALS Prospect) AND (Opportunity: TEST CT EQUALS 2)

When the criteria is met my workflow action is a field update that is supposed to change the Opportunity Stage to Bride Contacted.

I created a test account which in-turn creates a child opportunity with the name ClicktoolsTest-Wedding Event-Photography and the opportunity's stage is Prospect by default.

The Test CT field is a formula field that gets updated from 1 to 2 when a field in the Account is changed to Yes.

Any ideas as to why it isn't working? What I'm really wondering is, looking at the order of execution, does the commit for a field update that is a formula field occur after a workflow? This seems to be a cross-object workflow since the formula field that is part of the evaluation criteria comes from the account.

Hello

My organization has our own custom Lead Assignment Rules but they aren't firing whenever a Lead comes in from an external source. I've come to find out that the following code has to be executed as detailed here: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_database_dmloptions.htm

Unfortunately, there realy isn't a controller or class that inserts Leads, which is where the code detailed above would be inserted at. Instead, we are using a third party vendor that has set up web pages which then push the form information and create a Lead.

The closest thing I have is a before insert trigger with the following code:

if(Trigger.isInsert){
        Database.DMLOptions dmo = new Database.DMLOptions();
	dmo.assignmentRuleHeader.assignmentRuleId= '01Q60000000JZmdEAG';
			
	for(Lead l : Trigger.new){
		l.setOptions(dmo);
	}
}

 
This doesn't appear to be working though. Whenever Leads come in, they don't trigger the rules. Any help would be greatly appreciated.

Hello all.

I am having trouble getting VFP fields to properly update certain SF fields of an sObject. In this case, an Opportunity. Basically, I want someone to access a VFP I've created, enter the values in the fields, and when they click the submit button. An Opportunity is supposed to be created with its field values properly mapped/filled in from the VFP.

 All of the fields display properly on the VFP so I'm 90% certain it's not a lack of permissions. Whenever I hit submit, I get a null-pointer exception thrown at me, even though it gets masked as an 'Authporization Required' error...

I am trying to call a Flow (not workflow but flow) from inside a trigger:

trigger OpportunityTriggerAfter on Opportunity (after insert,after update) {
public Flow.Interview.Update_Opportunity_w_Favorite_Venue_Info fl;
for(Opportunity o:Trigger.New){

if(Trigger.isInsert){
   		                     
fl.vaOpportunityID = o.Id;

}
}

 although I'm not certain if you can do this or if this is even the correct syntax. I'm also getting a CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY error even though the flow I am calling doesn't perform an update on the Opportunity but instead only takes the opportunity ID as a starting parameter. If I try fl = new Flow.Interview.Update_Opportunity_w_Favorite_Venue_Info(o.Id); I get a constructor not defined error even though this can be done in the following doc: http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_flows_advanced.htm

My questions are:

1.) Is this even possible? If so what is the syntax (do I have the correct syntax)?
2.) Why am I getting the CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY error?

Hello

My organization has our own custom Lead Assignment Rules but they aren't firing whenever a Lead comes in from an external source. I've come to find out that the following code has to be executed as detailed here: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_database_dmloptions.htm

Unfortunately, there realy isn't a controller or class that inserts Leads, which is where the code detailed above would be inserted at. Instead, we are using a third party vendor that has set up web pages which then push the form information and create a Lead.

The closest thing I have is a before insert trigger with the following code:

if(Trigger.isInsert){
        Database.DMLOptions dmo = new Database.DMLOptions();
	dmo.assignmentRuleHeader.assignmentRuleId= '01Q60000000JZmdEAG';
			
	for(Lead l : Trigger.new){
		l.setOptions(dmo);
	}
}

 
This doesn't appear to be working though. Whenever Leads come in, they don't trigger the rules. Any help would be greatly appreciated.

Hello all.

I am having trouble getting VFP fields to properly update certain SF fields of an sObject. In this case, an Opportunity. Basically, I want someone to access a VFP I've created, enter the values in the fields, and when they click the submit button. An Opportunity is supposed to be created with its field values properly mapped/filled in from the VFP.

 All of the fields display properly on the VFP so I'm 90% certain it's not a lack of permissions. Whenever I hit submit, I get a null-pointer exception thrown at me, even though it gets masked as an 'Authporization Required' error...

This technique looks like it will save a lot of trouble – if I can get it to work for me.

 

http://th3silverlining.com/2010/03/02/visualforce-form-validation-enhanced/

 

I’m currently getting a “element is undefined” (according to Firefox) error on the jquery validate script. I’m current loading the jquery code via these lines:

 

<apex:includeScript value="{!$Resource.jquery1_3_2}"/>
<apex:includeScript value="{!$Resource.jquery_validate1_6}"/>

 

I’m using jquery 1.3.2 and the jquery validate plugin 1.6 (same as in this example).

 

Any ideas on what I’m doing wrong would be welcome.

 

Is the following page structure critical to this technique?

 

<apex:define name="content">   
   <apex:outputPanel layout="block" style="text-align:center; font-size:12px;padding: 4px">
      <apex:form id="commentForm" >
...

 

My form isn’t wrapped by a define or an output panel.