• cnaranjo
  • NEWBIE
  • 25 Points
  • Member since 2011

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

Hello everyone,

 

I'm trying to do something that I don't know if it is possible.

I have a flow created with Flow Designer.

To trigger that flow I have changed the 'New' button on a custom object so every time some one clicks on 'New', that flow will launch and bring the user to a flow a process. 

 

This new object have a related list inside the Campaign object. Inside the Campaign object people will click on 'New', in that related list section, and he will start the flow.

 

Now, this is all good and everything works fine.

My question is, it is possible to pass the campaign members names right after clicking on 'New' ??

I have been trying to pass the Campaign Id to the flow right after clicking on 'New', but it is not working.

I was trying to use a code like this:

 

<apex:page >
  <flow:interview name="Flow_Name"> 
  <apex:param id="Param_CampaingID" name="Variable_CampaignId" value="???????"/> //Don't know what to use in the value
    </flow:interview>
</apex:page>

This works when using {!$User} but in this case I need the Campaign Id or the Campaign Members Ids.

The all idea is to reduce the steps a user have to go trough when using this flow. Right now they have to enter the campaign member's email to start the flow.

I'm trying to present the user with a list with all the campaign members in that campaign right after clicking on 'New'.

Anyone can help me??

Thanks in avance!!

 

Regards,

 

Carlos 

 

Hello all,

 

I was wondering if this is possible with APEX code.

 

trigger NewCarEntry on Object (before insert) {
List<Object> newEntry = [SELECT id, Name FROM Object WHERE Color__c = 'Red'AND Model__c ='Seat'  LIMIT 1000];

//this is trigger and the list newEntry contains a number of items based Color__c and Model__c

for (Object o: Trigger.new) {
  if(*/here is where I want to know how to look in the newEntry list and if it finds a record that match the criteria in that list, to update a number of fields on that new record/*

 

I was wondering if this is possible. Create a list (SQOL Query)  based on a couple of fields and then use the IF statement to select those records that match the criteria on the list and update a number of fields on those records.

Can anyone help me with this?

 

Regards,

 

Carlos

I was wondering how can I do something like this with Apex Code:

 

IF(variable='text' && variable2='text2') variable3='value would be this', variable4='this',  variable5='this', etc, etc 

The idea is that if the value of variable and variable2 are correct this will change values on variable3, 4, 5, 6, 7, ...

 

Is this possible?

 

Thanks in advanced!

Hello everyone,

 

Well, I have been trying to get my head around this trigger but I haven't been able to get it right, kind of desperate now :( , that is why I'm here. Kind of new to APEX development too, so any help will be much appreciated. 

 

I have a flow that will create a new record using Data Target Elements on a customer object and that is all fine after finishing the flow process. The new record is created without any problems.

Things get bad when I'm trying to do use a trigger that will update some of the fields that are part of that new entry that it has have been created with the flow.

When I compile the trigger it looks fine and there are not errors but when I run the all thing the new records dont get updated on that particular field. (v.Honorarium2__c)

The script:

 

trigger NewIbenExpenses on IBEN_Expenses__c (before insert) {
  List <IBEN_Expenses__c> newExpenses = new List <IBEN_Expenses__c> ();
    
      for(IBEN_Expenses__c o: Trigger.new) {
           
                           
          IBEN_Expenses__c v = new IBEN_Expenses__c (id = o.id);
              if (v.External_Reference_Number_Flow__c =='W045'){
               v.Honorarium2__c = '12.4567.3456.5678'; 
              newExpenses.add(v);

        }
}

    try {
        insert newExpenses; 
    } catch (system.Dmlexception e) {
        system.debug (e);
    }
}

I'm going to keep trying but any directions on how to successfully accomplish this will be a total relief.

 

 

Regards,

Hello all!

 

I'm wondering if there is a way to set up a formula or trigger that will do this action. When a record is save in any Object, it will show up on the Pubilc Calendar with the specify information I will set to be pick from a field in those object records.

 

Is this possible?

 

 

Regards

I was wondering how can I do something like this with Apex Code:

 

IF(variable='text' && variable2='text2') variable3='value would be this', variable4='this',  variable5='this', etc, etc 

The idea is that if the value of variable and variable2 are correct this will change values on variable3, 4, 5, 6, 7, ...

 

Is this possible?

 

Thanks in advanced!

Hello everyone,

 

Well, I have been trying to get my head around this trigger but I haven't been able to get it right, kind of desperate now :( , that is why I'm here. Kind of new to APEX development too, so any help will be much appreciated. 

 

I have a flow that will create a new record using Data Target Elements on a customer object and that is all fine after finishing the flow process. The new record is created without any problems.

Things get bad when I'm trying to do use a trigger that will update some of the fields that are part of that new entry that it has have been created with the flow.

When I compile the trigger it looks fine and there are not errors but when I run the all thing the new records dont get updated on that particular field. (v.Honorarium2__c)

The script:

 

trigger NewIbenExpenses on IBEN_Expenses__c (before insert) {
  List <IBEN_Expenses__c> newExpenses = new List <IBEN_Expenses__c> ();
    
      for(IBEN_Expenses__c o: Trigger.new) {
           
                           
          IBEN_Expenses__c v = new IBEN_Expenses__c (id = o.id);
              if (v.External_Reference_Number_Flow__c =='W045'){
               v.Honorarium2__c = '12.4567.3456.5678'; 
              newExpenses.add(v);

        }
}

    try {
        insert newExpenses; 
    } catch (system.Dmlexception e) {
        system.debug (e);
    }
}

I'm going to keep trying but any directions on how to successfully accomplish this will be a total relief.

 

 

Regards,