• Salesforce Wizard
  • NEWBIE
  • 149 Points
  • Member since 2012


  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 58
    Replies
I'm befuddled on why I'm getting the generic unhandled fault message when I have a fault message built into the flow, any ideas?

Error Message: An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information.

Screen shot of flow: http://screencast.com/t/ADXvW0Eb8W


I am getting Error at the line 23 which is in Bold below

(ContactId = c.Id,CampaignId = '7018000tyyy'));

Here is the whole code
trigger triggerContactCreateCampMember on Contact (after update) {

   List<CampaignMember> CampaignMember = new List<CampaignMember>();
   List<Contact> ContactsToAdd = new List<Contact>();
    
    Set<Id> contId= new Set<Id>();
     if(Trigger.isUpdate)
    //Store Contact ID
    for(Contact contact: Trigger.new)
    {
       if (contact.LeadSource =='Web' ) 
       contId.add(contact.ID);
    }
        List<Contact> c = new List<Contact> ([SELECT c.Id,c.AccountId From Contact c
        WHERE Id IN :contId]);

        for (Contact con : c) {

        if(contId.size() > 0)
       {
       
           CampaignMember.add(new CampaignMember
                    (ContactId = c.Id,CampaignId = '7018000tyyy'));
                      insert CampaignMember;
        }
        }
}


Hello,

 

I'm in the process of creating a todo manager. I need a way to relate a todo to almost any object (like an activity). What's the best way to do that?

 

I'm interested in hearing some solutions. Thanks

ive got a custom visualforce page that im using as a related list

originally in my testing, it was a straight up vf page, now im editing it slightly to be a realted list

 

1) how do i remove the pageblock formatting so it looks more like a native related list?

2) how do i format the link so that it opens in  a new window rather than the related list iframe looking section?

 

<apex:page StandardController="Account" extensions="AccountAssetController" tabStyle="Account">
    <apex:pageBlock >
        <apex:pageBlockTable value="{!AllAssets}" var="asset">
            <apex:column headerValue="Asset">
                <apex:outputLink value="{!URLFOR($Action.Asset.View, asset.Id)}">{!asset.Name}</apex:outputLink>
            </apex:column>
            <apex:column value="{!asset.Product2Id}"/>
            <apex:column value="{!asset.AccountId}"/>
            <apex:column value="{!asset.Status}"/>
        </apex:pageBlockTable>
    </apex:pageBlock>
</apex:page>

 

I'm trying to get a value of a flow variable. I'm following this: http://www.salesforce.com/us/developer/docs/pages/Content/pages_flows_getting_values.htm

In the doc it specifies I need a vairable for my flow in my controller and specify that variable on the visualforce page with interview="{FlowVariable" 

I've done this, but when I launch the flow from the visualforce page my flow variable is null.

What am I missing? From what I can tell I got everything set right and it should work.

 

<apex:page standardcontroller="Opportunity" extensions="Closed_Won_Pathway_ext" >
<flow:interview name="FlowName" finishLocation="{!IAmFinish}" interview="{!myFlow}" >
    	<apex:param name="varOppID" value="{!Opportunity.id}"></apex:param>       
    </flow:interview>
</apex:page>
and the controller
public class Closed_Won_Pathway_ext {
    private final Opportunity opty; //final opportunity where the flow is started
    public string RecordID;
    
    public flow.Interview.Close_Won_This_Opp myFlow {get;set;}
    
    //constructed
    public Closed_Won_Pathway_ext(ApexPages.standardController con){
        this.opty = (Opportunity)con.getRecord();       
    }
    
    //get the contractid from the flow
    public string getRecordId(){        
        system.debug('myflow: ' + myFlow); //This is Null       
        system.debug(myFlow.varContractID); //This is a null pointer error
        return myFlow.varContractID;
    }
    
    //finish location
    public pagereference getIAmFinish(){
        PageReference thePage = Page.Celebrate;        
        thePage.getParameters().put('id',getRecordId());
        
        return thePage;
    }

}



So I'm using Visualforce Charting to display a Gauge on a dashboard. I have everything pulling and working, except I want to reduce the number of "ticks" on the gauge.

According to the documentation, the "Steps" attribute on the <apex:axis /> controls the steps on the chart when specified.Regardless of the integer I specify in the attribute I always see 10 steps + the Maximum value.

Am I doing something wrong, misunderstanding the purpose of steps, or there something else going on here?

<apex:chart height="250" width="350" animate="true" data="{!MyGaugeData}" name="ThisChart">
        <apex:axis type="Gauge" position="gauge" title="{!Percent}% {!title}"
            minimum="0" maximum="{!QuotaAmount}" steps="5"/>
        <apex:gaugeSeries dataField="size" donut="50" colorSet="#78c953,#ddd"/>
	</apex:chart>


I''m using eclipse and I'm trying to create a project.

 

After i select the components to be in the project I get this error:

 

'Unable to fetch and save force.com components to project:

com.salesforce.ide.api.metadatatypes.metadata$jaxAccessorf_FullName cannot be cast to com.sun.xml.internal.bind.v2.runtime.reflect.Accessor"

 

anyone knows what this is and how to fix the issue?

So I've been trying to figure out my fieldset and dynamic binding with vf issue.

 

My goal is to have a Map of lists where each lists contains files. I've been experiencing wierd issues.

 

So I attempted to simplify this. Here's what I'm doing.

 

I create my list (lFields) which contains all the field names I'll be using. I have a pageblock section that displays the value of those fields and a second that just lists all the fields.

 

Then I have a map with 2 keys (List1 and List2) each with a list of fields that's a sub-section of lFields. This I loop through on the page. However if I try to put the field in an Output or Input I get this "Invalid Field Core." If I just display {! f} I get the fieldname just fine.

 

Here's my Extension:

public class Admin_FieldSetTest {
    
    public list<string> lFields {get;set;}
    public list<string> lTemps {get;set;}
    public map<string, list<string>> mLists {get;set;}
    public string ConId; 
    private final Case myCase;
    
    public Admin_FieldSetTest(ApexPages.StandardController controller){    
        ConId = controller.getId();
        BuildFieldList();
        controller.addfields(lFields);
        this.mycase = (Case)controller.getrecord(); 
    }
    public void BuildFieldList(){
        //SELECT AccountId,Budget__c,CaseNumber,ContactId,Id,Origin,OwnerId,Physician_List_Format__c,RecordTypeId,Status,Subject FROM Case
        lFields = new list<string>{'AccountId','CaseNumber','Status','Subject','Physician_List_Format__c'};
        ltemps = new list<string>{'AccountId','CaseNumber','Status','Subject','Physician_List_Format__c'};
        mLists = new map<string, list<string>>();
        mLists.put('List1', lTemps);
        ltemps = new list<string>{'Origin', 'OwnerId', 'RecordTypeId','ContactId','Budget__c'};
        mLists.put('List2', lTemps);    
        lFields.add('Origin');lFields.add('OwnerId'); lFields.add('RecordTypeId');lFields.add('ContactId'); lFields.add('Budget__c');   
        for(string s : lFields){
            boolean Matches = false;
            for(string p : mLists.get('List1')){
                if(s.equals(p)){Matches=true;} 
            }
            for(string p : mLists.get('List2')){
                 if(s.equals(p)){Matches=true;}           
            }                
            system.debug('value of: ' + s + ' has a Match: ' + Matches);
            system.assert(Matches,'Match Failure on value: ' + s);
        }
        
    }
}

 And the page:

 

<apex:page standardController="Case" extensions="Admin_FieldSetTest">
<apex:form >
    <apex:pageblock title="The Lists" >
        
        <apex:pageblocksection title="All the Fields" columns="2">
            <apex:repeat value="{!lFields}" var="f">
           <apex:outputfield value="{!Case[f]}" />            
            </apex:repeat>           
        </apex:pageblocksection>
        
    <apex:pageblocksection title="Field List" >
            <apex:repeat value="{!lFields}" var="f">
            {!f}          
            </apex:repeat>           
        </apex:pageblocksection>
        <apex:repeat value="{!mLists}" var="m">
            <apex:pageBlockSection title="{!m}" columns="2">
                <apex:repeat value="{!mLists[m]}" var="f">
                <!-- This Causes my Invalid Field Core Error -->    
                <!-- <apex:outputfield value="{!Case[f]}" /> -->
                    {!f} <!-- This Works just fine -->
                </apex:repeat>
            </apex:pageBlockSection>
        </apex:repeat>
    </apex:pageblock>
    </apex:form>
</apex:page>

 

Output: Output of page

In case the picture doesn't load: http://twitpic.com/9yo0ja

Ok so here's the scenario.

 

I have a map that contains a list of field names. On the page I'm iterating through the map and for each item in the map I iterate over the list of field names.

 

When I attempt to get the outputfield using dynamic binding I get an error -- but no error message.

 

If I pull out one of the lists in the extension and iterate through that list it works fine. It only errors when I attempt to display the information within a nested item.

 

Here's a slimmed down version of (example test) of what's in the controller

 

map<string,list<string>> mFields = new map<string,list<string>>();
list<string> templist = new list<string>();
for(Schema.FieldSetMember fm : Sobject.Case.FieldSets.TestSet.getFields()){
   templist.add(fm.getFieldPath());
}

mFields.put('test',templist);

templist  = new list<string>();
templist.add('Subject'); templist.add('ContactID');

MFields.put('Test2',templist);

 

And then the page: I can't even save this because it doesn't like the Case[f]. It'll accept {!f} but nothing that'll let me reference the field. and I do a soql query for the fields in the controller, it's just not in the sample above.

 

<apex:pageblock title="tests">
   <apex:repeat value="{!mfields}" var="c">
      <apex:pageblocksection columns="2">
           <apex:repeat value="{!mFields[c]}" var="f">
              <apex:outputfield value="{!Case[f]}" />
           </apex:repeat>
      </apex:pageblocksection>
   </apex:repeat>
</apex:pageblock>

 Now if I remove the first repeat and replace the value of the second repeat with say TempList (after making it available) it works great... It's only when I'm pulling it through the map.

 

Thoughts?

I'm currently been playing around with field sets (which I love btw).

 

I'm hoping I can create a page that has a dynamic call to a field set and then display those fields.

 

I was thinking I could put the string to reference the field set in a list of the controller and then call that on the page through an apex:repeat.

 

So my Controller would look like:

 

public class My_Ext {

   public list<String> csNames {get;set;}

   public My_Ext(){
     csNames = new list<string>();
     csNames.add("$ObjectType.Case.FieldSets.MyFieldSet1");
     csNames.add("$ObjectType.Case.FieldSets.MyFieldSet2");
     csNames.add("$ObjectType.Case.FieldSets.MyFieldSet3");
   }
}

 and the page would be like this:

 

<apex:page controller="My_Ext" >
    <apex:pageblock title="All my Field Sets in Sections">
       <apex:repeat value="{!csNames}" var="cs">
           <apex:pageblocksection title="A field set" columns="2">
               <apex:repeat value="{!cs}" var="f">
                   <apex:outputfield value="{!Case[f]}" />
               </apex:repeat>
           </apex:pageblocksection>
       </apex:repeat>
    </apex:pageblock>
</apex:page>

 To make it a bit more dynamic I would create a list Custom Setting that would reference the text to the Field Set. So instead of looping a list of strings, I loop through a list of Custom Settings that contain a reference to the Field Sets.

 

I don't get an error in the code, but I get one on the page. Can something like this be done? 

 

 

Hi,

I've run into an error with the Flows in one of my orgs. Users were able to go through the flow with no issues, then out of nowhere everyone (including admins) suddenly started getting the following error when trying to start the flow process:

Data Not Available The data you were trying to access could not be found. It may be due to another user deleting the data or a system error. If you know the data is not deleted but cannot access it, please look at our support page.

I can confirm that the data DOES exist and has not been deleted, and that it can be accessed. There have been no changes made to the org between when it was working and when the error occured. The Flow is still working fine in our test environments.

Any help would be greatly appreciated.
I have created a button call New Metric that I want to use to create a new record and to pre-populate the Name field. The object where the record is created is called RFP Metrics. RFP Metric is a Master-Detail relationship with an object called RFP Tracking. I am creating the record from the RFP Tracking record where RFP Metrics is a related list. The button uses OnClick Java script. Here is the code:

location.href = "a6t/e?Name={!RFP_Metrics__c.Related_RFP_Tracking__c}&CF00N70000003UZ6F={!RFP_Metrics__c.Related_RFP_Tracking__c}&CF00N70000003UZ6F_lkid={!RFP_Metrics__c.Related_RFP_TrackingId__c}&retURL={!RFP_Metrics__c.Link}"

It looks like the Name should populate the the Name of the related record. And because this is a Master-Detail relationship, it should populate the Related Record Id. When I click the button, a new record is created but nothing is populated. When I look at the URL after I clicked the button, it appears like this:

https://na5.salesforce.com/a6t/e?Name=&CF00N70000003UZ6F=&CF00N70000003UZ6F_lkid=&retURL=

It removes all of the merge field information. I have looked all across the internet and I can't figure out why this isn't working.

My flow used to work perfectly fine, but now it does not; it converts a Quote to an Order.  There is one input variable, which takes the ID for the quote you wish to convert.  When performing a fast lookup the inputted variable reports as null, causing the rest of the flow to fail and error out.  This doesn't make any sense.  I have even validated that the input variable is being set correctly by displaying its value in a screen step right before performing the lookup, and it looks fine.

 

Has anyone else encountered this issue?

I having a difficult time. We're also under some time restraints. We feel that it would be much faster to simply pay an expert to assist us on creating the fields, accounts, leads...etc.
 
Hi,

I have issues in writing test class for below copntroller.
 
public class EditContacts {

    ApexPages.StandardSetController setCon;
    List<string> strIds = new List<string>();
    List<Contact> lstContact = new List<Contact>();
    public integer size {get;set;}
    public final String URL {get;set;}
    public Contact c;
    
    public Contact getNewContact()
    {
      if(c==null)c= new Contact();
      return c;
    }
    public MassEditContacts (Apexpages.Standardsetcontroller cont)
    {
        setCon = cont;
        strIds = ApexPages.currentPage().getParameters().get('recs').split(',',-2);
        size = strIds.size();
        URL = ApexPages.currentPage().getURL();
    
    }
    public List<Contact> getContacts()
    {
        lstContact = [select Name, Title, Phone, MobilePhone, Email, AccountId, ownerid from Contact where id IN: strIds ];
        return lstContact;
    }
     
    public Pagereference saveRecords()
    {
        List<Contact> updateContact = new List<Contact>();
    for(Contact cse : lstContact)
    {
      updateContact.add(cse);
    }
        update updateContact;
        return new Pagereference('/'+Contact.getSObjectType().getDescribe().getKeyPrefix()+'/o');
    }
    
    public Pagereference ccancel()
    {
        system.debug('***ccancel**');
        return new Pagereference('/'+Contact.getSObjectType().getDescribe().getKeyPrefix()+'/o');
    }
}

 
I'm befuddled on why I'm getting the generic unhandled fault message when I have a fault message built into the flow, any ideas?

Error Message: An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information.

Screen shot of flow: http://screencast.com/t/ADXvW0Eb8W


I'm trying to get a value of a flow variable. I'm following this: http://www.salesforce.com/us/developer/docs/pages/Content/pages_flows_getting_values.htm

In the doc it specifies I need a vairable for my flow in my controller and specify that variable on the visualforce page with interview="{FlowVariable" 

I've done this, but when I launch the flow from the visualforce page my flow variable is null.

What am I missing? From what I can tell I got everything set right and it should work.

 

<apex:page standardcontroller="Opportunity" extensions="Closed_Won_Pathway_ext" >
<flow:interview name="FlowName" finishLocation="{!IAmFinish}" interview="{!myFlow}" >
    	<apex:param name="varOppID" value="{!Opportunity.id}"></apex:param>       
    </flow:interview>
</apex:page>
and the controller
public class Closed_Won_Pathway_ext {
    private final Opportunity opty; //final opportunity where the flow is started
    public string RecordID;
    
    public flow.Interview.Close_Won_This_Opp myFlow {get;set;}
    
    //constructed
    public Closed_Won_Pathway_ext(ApexPages.standardController con){
        this.opty = (Opportunity)con.getRecord();       
    }
    
    //get the contractid from the flow
    public string getRecordId(){        
        system.debug('myflow: ' + myFlow); //This is Null       
        system.debug(myFlow.varContractID); //This is a null pointer error
        return myFlow.varContractID;
    }
    
    //finish location
    public pagereference getIAmFinish(){
        PageReference thePage = Page.Celebrate;        
        thePage.getParameters().put('id',getRecordId());
        
        return thePage;
    }

}



So I'm using Visualforce Charting to display a Gauge on a dashboard. I have everything pulling and working, except I want to reduce the number of "ticks" on the gauge.

According to the documentation, the "Steps" attribute on the <apex:axis /> controls the steps on the chart when specified.Regardless of the integer I specify in the attribute I always see 10 steps + the Maximum value.

Am I doing something wrong, misunderstanding the purpose of steps, or there something else going on here?

<apex:chart height="250" width="350" animate="true" data="{!MyGaugeData}" name="ThisChart">
        <apex:axis type="Gauge" position="gauge" title="{!Percent}% {!title}"
            minimum="0" maximum="{!QuotaAmount}" steps="5"/>
        <apex:gaugeSeries dataField="size" donut="50" colorSet="#78c953,#ddd"/>
	</apex:chart>


I am getting Error at the line 23 which is in Bold below

(ContactId = c.Id,CampaignId = '7018000tyyy'));

Here is the whole code
trigger triggerContactCreateCampMember on Contact (after update) {

   List<CampaignMember> CampaignMember = new List<CampaignMember>();
   List<Contact> ContactsToAdd = new List<Contact>();
    
    Set<Id> contId= new Set<Id>();
     if(Trigger.isUpdate)
    //Store Contact ID
    for(Contact contact: Trigger.new)
    {
       if (contact.LeadSource =='Web' ) 
       contId.add(contact.ID);
    }
        List<Contact> c = new List<Contact> ([SELECT c.Id,c.AccountId From Contact c
        WHERE Id IN :contId]);

        for (Contact con : c) {

        if(contId.size() > 0)
       {
       
           CampaignMember.add(new CampaignMember
                    (ContactId = c.Id,CampaignId = '7018000tyyy'));
                      insert CampaignMember;
        }
        }
}


Buenas tardes. Ya tengo instalado force.com en escel para importar mi base de datos. Pero cuando me pide el password me sale error. Digito el token de seguridad y seguido mi contraseña y no me deja acceder. Que debo hacer?