• Gobbledigook
  • NEWBIE
  • 250 Points
  • Member since 2010

  • Chatter
    Feed
  • 10
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 37
    Questions
  • 39
    Replies

I was correcting some mistakes when I began to receive this error on something that previously worked and I'm not sure why it's not working now. I've narrowed it down to this section of code:

 

 

List<Contract_Line_Item__c> current_cls=[select Id, hasCPI__c, Name, Product__c, Net_Price__c, Quantity__c, Maintenance_Amount__c, isCheckbox__c from Contract_Line_Item__c where Contract__c=:current.Id];
    
    List<Contract_Line_Item__c> cls=new  List<Contract_Line_Item__c>();
   
    boolean cpiX;
    for(Contract_Line_Item__c cli:current_cls){
     if(cli.Maintenance_Amount__c > 0)
     {	
     	
     	cpiX=false;
     	Contract_Line_Item__c cl = cli.clone(false, true);
     	Contract_Line_Item__c cpi = cli.clone(false, true);
     	cl.Net_Price__c=0;
     	cl.Services_Amount__c=0;
     	if(!cli.isCheckbox__c)
     	{
     	cpi.Net_Price__c=0;
     	cl.Contract__c=c.Id;
     	cl.Net_Price__c=0;
     	if(current.CIPIX_Increase__c=='Yes' && current.CPI_Increase_Percent__c!=null){
      		if(cli.hasCPI__c)
      			cl.Maintenance_Amount__c*=1+(current.CPI_Increase_Percent__c/100);
     		cl.hasCpi__c=true;
     		cpi.hasCPI__c=true;
     		cpi.Contract__c=c.Id;
     		cpi.Maintenance_Amount__c=cl.Maintenance_Amount__c*(current.CPI_Increase_Percent__c/100);
     		cpi.Name=cli.Name;
     		cpi.isCheckbox__c=true;
     		cpiX=true;
     		}
     	cls.add(cl);
     	if(cpiX)
     		cls.add(cpi);
     	
     	a=new Asset();
     	a.AccountId = c.AccountId;
  	    a.Product2Id=cli.Product__c;
   	    a.Name=cli.Name + ' - Asset';
 	    a.ContactId=Cont;
 	    if(c.startDate!=null){
 	    a.installDate=c.StartDate;
 	    date enddate=c.StartDate.addMonths(12).addDays(-1);
 	    a.UsageEndDate=enddate;
 	    }
 	    
 	    insert a;}
 	    else{
 	    	delete cli;}
     	
	  }
    }
   
    insert cls;

 

And when I comment out the "If.isCheckBox__c) sections, I get a 'de-referencing a null object error'. Any advice?

 

  • November 29, 2010
  • Like
  • 0

I have a command button, and when I try and use it in the visualforce page I am not able to reterive the paramter from the page, it returns null

 

Here is the visualforce code

 

 

<apex:page standardController="Account" extensions="Controller_DupeChecker">
<apex:form >
<apex:dataTable value="{!DupeAccounts}" var="das" width="100%" border="1px" style="text-align:center">
<apex:column headerValue="Account Names" value="{!das.Name}"/>
<apex:column headerValue="Phone" value="{!das.Phone}"/>
<apex:column headerValue="Shipping Street" value="{!das.ShippingStreet}"/>
<apex:column headerValue="Billing Street" value="{!das.BillingStreet}"/>
<apex:column >
<apex:commandButton action="{!MergeAccounts}" value="Merge" id="theButton">
<apex:param name="acid" value="{!das.id}"/>
</apex:commandButton>
</apex:column>
<apex:column >{!das.id}</apex:column>
</apex:dataTable>

</apex:form>
</apex:page>

 

 

 

 

And here is the apex class

 

	public PageReference MergeAccounts(){
	// aid is not passing a value 	
	Id aid = System.currentPageReference().getParameters().get('acid');
	
	List<Account> mergeAccounts = new List<Account>();
	system.debug('aid: '  + aid);
	
	Account mergeAccount = ([select Id FROM Account WHERE Id =:aid]);
	//merge function doesn't bring over fields
	merge acc mergeAccount;
	return null;
	}

 

 

Please help!

 

Is there any way to have different custom links based on the role that the user is part of? 

 

For instance, I want a Sales Associate to have links to different tables of products and such, while someone from IT would have links to Internal S.O.Ps and technical documentation. 

 

So far I haven't found anything like this.

Is there any away to define sharing rules for Solutions, either programmatically or not? 

I've been searching around the internetz, but I haven't found a definitive answer. 

 

I'm trying to write a search method that filters based on Record Type. (I'm only searching one object, hence no SOSL)

 

It returns anything that contains the search string itself, so I'm using like so far.  I want to know a few things:

 

Does SOQL have support for Contains, (or anything to that effect)? 

 

Does Like check strings themselves?  For example, if I type 'Hello World' in the search string, will it return things only with the phrase 'Hello World' or will it return results on 'Hello' and 'World' seperately? 

Hey all,

 

I'm trying to write a trigger that takes the current user's profile id and assign a recordtype automatically depending on the profile, for data filtering processes in the future, but I was wondering how the UserInfo would actually run during a bulk fire.  Who would be the Current User in a bulk trigger?  Since triggers fire in bulk of 200 each, and since the UserInfo would take the current User, and since the trigger itself can fired by multiple Users, what would happen to the getProfileId() method itself? Would it even fill?  

 

I can't really test this since I don't have multiple Users trying to fire the trigger in bulk, hence me coming to the boards.

Hello,

 

I'm in charge of trying to put together an Internal Knowledge Base using Solutions.  (And using Knowledge is out of the question due to it costing $50/User/Month for a single piece of functionality).  So I have to find some way to work around the fact that one can't assign security restrictions to categories of Solutions, so only certain profiles have access to certain categories. 

 

One way I thought of doing this is to grab the relevant Category names themselves depending on the UserInfo.getProfileId() when the apex class is called, and then doing the search off of them. 

 

So can WITH DATA CATEGORY also be used for Solutions? 

 

Or, if anyone else has any other ideas to help solve this problem?

 

Has anyone else tried to do something like this?  Any advice whatsoever

Can the Search functionality in SFDC be overridden?  I want to limit the Solutions that return in the Search bar based on the UserRole, but not take them away completely

 

Is that possible?

I didn't know where else to put this, so I'll put it here.

 

My Org is looking to build an internal knowledge base.  Unfortunately, Solutions might not be exactly what we're looking for.  So there's Knowledge, which I've demo'd but haven't been able to play around with. 

 

Looking around the internet I haven't found a knowledge trial; is there one?  I can't really see paying $50/user per month (with 80 users) if it doesn't give me exactly what I want, so is there a free trial I can use to see if it suits what my Organization needs?  

I was wondering if there were a way to have multiple solution sets, meaning that the solutions available to a specific User is dependent on the permissions that the User has. 

 

For example:  I want to have 3 different Solution bases.  One for Finance, one for Sales, and one for Manufacturing.  When a Finance user has a question, they can only see the subcategories of Finance, and can only search Finance's main and sub-categories.  Similarly, the Sales and Marketing users act this way. This is all for internal use. 

 

Additionally, I want each of these databases to have different solution managers to eschew through the Approval process.  Can this be done using Native functionality ? 

Pretty trivial question (maybe)

 

Is there any way to default apex:selectradio, apex:selectlist, apex:selectcheckboxes to be auto selected upon creation?

 

I'm writing a visualforce page to change a Contact from an associated Account to one of the user's choosing, using apex:selectRadio.

 

I want the previous contact to be defaulted selected.  Right now none of them are. 

 

Any ideas?

Ok, so I have a problem:

 

I have a VF page overriding a standard Edit page that references some of the standard fields. 

  <apex:pageBlockSection title="{!$ObjectType.Report__c.label} Information" columns="1">
                <apex:inputField value="{!Report__c.Account__c}"/>
                <apex:inputField value="{!Report__c.Date__c}" required="true"/>

 

 

etc.

 

I also have a Custom Button on another page that references the Ids of these fields to auto fill them on creation from said button:

 

 

/a0F/e?CF00NA0000004riGC_lkid={!Open_Quotes__c.AccountId__c}&CF00NA0000004riGC={!Open_Quotes__c.Account__c}&00NA0000004rmIC={!Open_Quotes__c.Date}

 

 

Now, to get the Ids (those are just placeholders) from the input fields, I have to view the source of the Edit page, and find the Ids themselves.  Problem is, now they're something like:

 

 

id="j_id0:theForm:thePageBlock:j_id15:j_id19"

 

And if I try to reference that mess, it doesn't work anyway.  The original Ids I took from the original page before it was overridden, but that still didn't work. I need these fields to be auto filled.  Any ideaS?

 

Hey all,

 

Just a simple question:  Are triggers executed when lookup fields change from an outside source?

 

I have a Custom Object that references a Contact as a Lookup.  If I change that contact (thus changing the lookup) will that cause an update trigger to fire on that Custom Object?  Or, since the Lookup is a reference to the Contact, and the reference does not change (only the value that is being referenced does) would it not fire?

When testing out mobile functionality and Visualforce, I have found that when "clicking" the Lookup Icon, it takes you to a page to allow you to search for an account, but when you click the account itself, it doesn't do anything.  It's supposed to take you to the previous page and fill the inputfield with the selected account.

Hey all,

 

I've been playing around with the salesforce mobile app, and I've receently started putting up Visualforce tabs within the app itself, that references a custom object.  The reason why I included the Visualforce page, instead of the standard mobile view, is because of security settings that I want to keep in place. 

 

Now here's the problem: when I click the "Save" button and using standardcontroller.save() it takes me to a standard Salesforce view page, NOT a mobile list view.  However, I can't seem to find any API documentation on how to do this process.  Is there any way to override this?  Is there any way to override the standard + button with another VF tab? 

 

To reiterate, this is what I want to do:

 

1. Standard Mobile List View.  User clicks the + button.

2. The VF page opens up with a Custom Page. 

3. When the user clicks "Save", the VF page is saved, and the Standard Mobile List view opens up. 

 

Right now, when the User clicks the + button, it takes them to a standard mobile 1 column page, and when the user clicks the Save button on the VF tab, it takes them to a standard salesforce non-mobile view. 

 

Help please :)

 

 

 

 

 

Hey all,

 

Is there some sort of guide (non Visualforce) for mobile development?  As in figuring out how to override standard mobile functionality as one would in Salesforce?

 

There are a few things I want to do using the mobile app, but I'm having a very difficult time customizing it, since there doesn't seem to be a standard override.

 

For instance, I have multiple visualforce pages overriding a Custom Object.  They all work great in salesforce, but when I put the Custom Object as part of the mobile app, these pages are no longer overridden.  (On iPhone iOS 4.2, clicking the + icon next to a new Custom Object (instantiating Object.new) takes me to the standard 1 column display, unlike the Visualforce page that overrides it. 

 

Is there an API or developer's guide out there that I could get my hands on?  (Does one even exist??)

Hey all,

 

I'm getting a strange display on a standard view page, after overriding the standard edit page using Visualforce.  The thing is, with the Visualforce page, I'm not really doing much of anything, other than recreating the page (using the standard input fields) and adding a button. 

 

I'll just post the Code itself: As you can see I'm not really doing much with it, just redisplaying the view itself, adding in the "save and add call attendees" button.  The extension itself does nothing with the problem I'm experiencing.

 

 

<apex:page standardController="Call_Report__c" extensions="FD_CallReportSave" action="{!Redirect}" tabStyle="Call_Report__c" showHeader="true" sidebar="true">
    <apex:SectionHeader title="{!$ObjectType.Call_Report__c.label} Edit" subtitle="New Call Report"/>
    <apex:form id="theForm">
        <apex:pageBlock title="{!$ObjectType.Call_Report__c.label} Edit" mode="edit" id="thePageBlock">
            <apex:pageBlockButtons >
                <Apex:commandbutton value="Save and Add Call Attendee" Action="{!SaveAdd}" />
                <apex:commandButton value="Cancel" Action="{!cancel}" immediate="true"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="{!$ObjectType.Call_Report__c.label} Information" columns="1">
                <!--Row 1-->
                <apex:inputField value="{!Call_Report__c.Account__c}"/>
                <!--Row 2-->
                <apex:inputField value="{!Call_Report__c.Date__c}" required="true"/>
                <!--Row 3-->
                <apex:inputField value="{!Call_Report__c.Type_of_Interaction__c}" required="true"/>
                <!--Row 4-->
                <apex:inputField value="{!Call_Report__c.Products_Discussed__c}"/>
                <!--Row 5-->
                <apex:inputField value="{!Call_Report__c.Project__c}"/>
                <!--Row 6-->
                <apex:inputField value="{!Call_Report__c.Other_Project__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Call Comments" columns="1">
                <!--Row 1-->
                <apex:inputField value="{!Call_Report__c.Summary__c}" required="true" style="Width:400px;"/>
                <!--Row 2-->
                <apex:inputField value="{!Call_Report__c.Comments__c}" style="Width:400px;"/>
            </apex:pageBlockSection>   
            <apex:pageBlockSection title="Additional Details" columns="2">
                <!--Row 1-->
                <apex:inputField value="{!Call_Report__c.Missed_Opportunity__c}" required="true" />
                <apex:inputField value="{!Call_Report__c.ERP_Document_Num__c}" id="ERPDocNum"/>
                <!--Row 2-->
                <apex:inputField value="{!Call_Report__c.Missed_Opportunity_Products__c}" />
                <apex:inputField value="{!Call_Report__c.ERP_Document_Type__c}" />
                <!--Row 3-->
                <apex:inputField value="{!Call_Report__c.M_O_Reason__c}" />
                <apex:inputField value="{!Call_Report__c.M_O_Other_Reason__c}" />
            </apex:pageBlockSection>
            <!--<apex:pageBlockSection title="Additional Information" > 
                <apex:inputField value="{!Call_Report__c.Attendee_Summary__c}" style="width:400px;" rendered="false"/>   
            </apex:pageBlockSection>   -->
            <apex:pageBlockSection title="Call Report Email Notifications" columns="2">
                <!--Row 1-->
                <apex:inputField value="{!Call_Report__c.Applications_Engineer__c}" />
                <apex:inputField value="{!Call_Report__c.U_S__c}" />
                <!--Row 2-->
                <apex:inputField value="{!Call_Report__c.Global__c}" />
                <apex:inputField value="{!Call_Report__c.U_K__c}" />
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

Now I should say a few things: Missed_Opportunity_Products__c and M_O_Reason__c are dependent picklists of the Missed_Opportunity__c Picklist.  This is where I'm getting the strange error. 

 

If Missed_Opportunity is Yes, the other picklists are filled and everything displays ok:

 

But when Missed Opportunity is no:

 

I get the strange display.  Can anyone shed some light on it?  It's not a crippling feature it's just kind of annoying.

 

 

Hey all, pretty straightforward question:

 

If I have some code that will override the Standard Delete button on a custom object through Visualforce, would Deleting the same custom object through a related list fire off that code? 

Hey all,

 

Recently I posted a problem about manipulating the URL to auto-fill fields without using Visualforce.  The answer turned out to be that to do this, I would need to hard code in the Id values of the fields and then just throw what I wanted in there. 

 

 

/a0F/e?CF00NA0000004riGC_lkid={!Open_Quotes__c.AccountId__c}&CF00NA0000004riGC={!Open_Quotes__c.Account__c}&00NA0000004rmIC={!LEFT(Open_Quotes__c.ERPID__c, (LEN(Open_Quotes__c.ERPID__c) - 3))}&00NA0000004rmFn={!RIGHT(Open_Quotes__c.ERPID__c, 2)}

 

Ok so we got that working, but now I'm sending this to a Visualforce page that mimics standard functionality, and the <label for> Ids are now: j_id0:theForm:thePageBlock:j_id15:j_id17.  So as you may well surmise, it's no longer working.  So I tried to put it the new values into the formula, and it still doesn't work. 

 

Any ideas?

 

Hey all,

 

I'm trying to pass values to a Visualforce Page from another VF page, and when I get to that page, it will automatically assign values of Custom Fields to what is being passed in by System.GetParameters(), and then Automatically call a save, so that the User will only see a pageview, and not the edit functionality. 

 

So to make a bit more simple:

1. User Saves a Record.

2. Parameters get passed into another VF page (by clicking a button) that carries a reference that the first Record needs. 

3. User does some cool stuff on the other page, modifying the reference and sends it back to the first page using a button.

4. Page.edit() opens and automatically dereferences the system.getParameters() and assigns them to values on the page.

5. The system saves the page and goes to Page.view(), firing custom workflow, without any User input.

 

Any ideas?

 

So far this is what I have:

 

 

First Page Controller: 

ublic FirstPage(ApexPages.StandardController stdcontroller) 
    { 
        this.C = (Custom_Object__c)stdController.getRecord(); 
        if(system.CurrentPageReference().getParameters().get('Email') == '1')
        {
            PageReference Test = SaveView();
        }
    }

 

 

So in the controller I look for a field called 'Email' and if it's equal to '1', then call:

 

public PageReference SaveView()
    {
        
        update C;
        PageReference GoBack = new ApexPages.StandardController(C).view();
        GoBack.setRedirect(true);
        return GoBack;
    }

 

 

And on my second page (along with some other data) when I click a button:

 

 

public PageReference SaveAndEmail()
    {
        this.AddCallAttendee();
        Custom_Object__c C = new Custom_Object__c(Id = CA.Call_Report__c);
        PageReference GoBack = new ApexPages.StandardController(C).edit();
        GoBack.getParameters().put('Email','1');
        GoBack.setRedirect(true);
        return GoBack;
    }    
    

 

Since Edit is overridden by the first page, it will keep the values that are saved within the Call Report and pass in EMail = '1'.  When I check the page, it's there, but it doesn't either call SaveView(), or doesn't reference the Email itself.

 

Note: This does Compile and Save, the errors in the code above are the result of my failure to know how to copy and paste.

 

I'm running into a fairly frusterating problem, but it really shouldn't be.  I have a Workflow validation rule that will send a confirmation e-mail to a group of users when a Custom Object is saved and a specific value is checked. 

 

I overrode the page using Apex and Visualforce, but it still saves using an upsert command, which should trigger the Workflow rule, but it doesn't.  Now since I'm working in the Sandbox, I figured it was my e-mail, so I changed it to an outside e-mail but it still won't work. 

 

So can anyone shed some light on things?

 

 

Ok, so for some reason my Messages aren't being displayed, even though I (Seem to) have everything all set up.

 

VF page setting up the messages:

 

 

<apex:messages rendered="true" style="color:Red;"/>

 

 

Apex Code calling and creating a message:

 

 

 ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.INFO, 'Call Attendees: ' + CallAttendeeSum + 'uploaded'));
            

 

 

I get no compile errors, no errors of any kind at all, the message just does not display. What gives?

Hey all,

 

I'm having a problem where I need to dynamically update a picklist through a web service from an ERP system to Salesforce, and so I've started working on it, using C#.  The list will change depending on business practices throughout and will be "pushed" from the ERP to Salesforce nightly. 

 

So I was able to create the picklist values through the Web Service, as well as Update the picklist values using the metadata API.  The problem I'm running into now is deleting the values WITHOUT deleting the entire picklist itself. 

 

I've tried using delete but that will get rid of the entire picklist, and I only want to get rid of a few values at a time.  Any thoughts or examples that might help out? 

Hey all,

 

I'm trying to write a trigger that takes the current user's profile id and assign a recordtype automatically depending on the profile, for data filtering processes in the future, but I was wondering how the UserInfo would actually run during a bulk fire.  Who would be the Current User in a bulk trigger?  Since triggers fire in bulk of 200 each, and since the UserInfo would take the current User, and since the trigger itself can fired by multiple Users, what would happen to the getProfileId() method itself? Would it even fill?  

 

I can't really test this since I don't have multiple Users trying to fire the trigger in bulk, hence me coming to the boards.

We have a field on the Account level called "Monthly Fee".  I'd like to create a new field on the parent level so we can see a roll-up summary of the children accounts.  Please help me with writing the trigger! 

Hi,

 

We have a WSDL file which has import from xml schema files.As import  in WSDL file is not supported by salesforce,

can anyone please suggest the way to overcome this issue.

 

 

 

 

Thanks,

Srilakshmi B

Pretty trivial question (maybe)

 

Is there any way to default apex:selectradio, apex:selectlist, apex:selectcheckboxes to be auto selected upon creation?

 

I'm writing a visualforce page to change a Contact from an associated Account to one of the user's choosing, using apex:selectRadio.

 

I want the previous contact to be defaulted selected.  Right now none of them are. 

 

Any ideas?

I am trying to pass a record ID via URL for a VisualForce page and continually receive a URL No Longer Exists error. Any ideas on what I am doing wrong or is URL not properly referenced? See URL below. 

 

The VF page is based on a standardController for a custom object. I plan on extending the standardController but can't even get the basics to work. Any ideas would be much appreciated. Thanks. 

 

https://c.na7.visual.force.com/apex/ReviewData/?id=a0gA0000002BBZa

  • December 29, 2011
  • Like
  • 0
Hi everybody,
I am trying to populate selectlist options through onload javascript function, but some how this is not working. I have pasted the code below that iam working on, could any body please suggest any changes to make it working.
<apex:page >
<script> window.onload = list1;
function list1()
{
var list=document.getElementById('listchosen');
for(var i=0;i<10;i++)
list.add(new Option('xxx','xxx'));
}
</script>
<apex:outputPanel id="result"> <apex:form >
<b>Please select :</b>
<apex:selectList id="listchosen" multiselect="false" size="1"> </apex:selectList>
</apex:form>
</apex:outputPanel>
</apex:page>

 

Hey all,

 

Just a simple question:  Are triggers executed when lookup fields change from an outside source?

 

I have a Custom Object that references a Contact as a Lookup.  If I change that contact (thus changing the lookup) will that cause an update trigger to fire on that Custom Object?  Or, since the Lookup is a reference to the Contact, and the reference does not change (only the value that is being referenced does) would it not fire?

I was correcting some mistakes when I began to receive this error on something that previously worked and I'm not sure why it's not working now. I've narrowed it down to this section of code:

 

 

List<Contract_Line_Item__c> current_cls=[select Id, hasCPI__c, Name, Product__c, Net_Price__c, Quantity__c, Maintenance_Amount__c, isCheckbox__c from Contract_Line_Item__c where Contract__c=:current.Id];
    
    List<Contract_Line_Item__c> cls=new  List<Contract_Line_Item__c>();
   
    boolean cpiX;
    for(Contract_Line_Item__c cli:current_cls){
     if(cli.Maintenance_Amount__c > 0)
     {	
     	
     	cpiX=false;
     	Contract_Line_Item__c cl = cli.clone(false, true);
     	Contract_Line_Item__c cpi = cli.clone(false, true);
     	cl.Net_Price__c=0;
     	cl.Services_Amount__c=0;
     	if(!cli.isCheckbox__c)
     	{
     	cpi.Net_Price__c=0;
     	cl.Contract__c=c.Id;
     	cl.Net_Price__c=0;
     	if(current.CIPIX_Increase__c=='Yes' && current.CPI_Increase_Percent__c!=null){
      		if(cli.hasCPI__c)
      			cl.Maintenance_Amount__c*=1+(current.CPI_Increase_Percent__c/100);
     		cl.hasCpi__c=true;
     		cpi.hasCPI__c=true;
     		cpi.Contract__c=c.Id;
     		cpi.Maintenance_Amount__c=cl.Maintenance_Amount__c*(current.CPI_Increase_Percent__c/100);
     		cpi.Name=cli.Name;
     		cpi.isCheckbox__c=true;
     		cpiX=true;
     		}
     	cls.add(cl);
     	if(cpiX)
     		cls.add(cpi);
     	
     	a=new Asset();
     	a.AccountId = c.AccountId;
  	    a.Product2Id=cli.Product__c;
   	    a.Name=cli.Name + ' - Asset';
 	    a.ContactId=Cont;
 	    if(c.startDate!=null){
 	    a.installDate=c.StartDate;
 	    date enddate=c.StartDate.addMonths(12).addDays(-1);
 	    a.UsageEndDate=enddate;
 	    }
 	    
 	    insert a;}
 	    else{
 	    	delete cli;}
     	
	  }
    }
   
    insert cls;

 

And when I comment out the "If.isCheckBox__c) sections, I get a 'de-referencing a null object error'. Any advice?

 

  • November 29, 2010
  • Like
  • 0

Hello.  Does anyone know if it is possible via Visualforce code to substitute a lookup with a picklist?

 

We all know that, by default, salesforce.com creates a lookup situation when associating the master record values on a child record.

 

Well, I am trying to figure out if Visualforce code will allow me to present things a little differently for my users.

Is this possible?  Does anyone have any suggestions?

 

Thanks in advance.

Hey all,

 

Is there some sort of guide (non Visualforce) for mobile development?  As in figuring out how to override standard mobile functionality as one would in Salesforce?

 

There are a few things I want to do using the mobile app, but I'm having a very difficult time customizing it, since there doesn't seem to be a standard override.

 

For instance, I have multiple visualforce pages overriding a Custom Object.  They all work great in salesforce, but when I put the Custom Object as part of the mobile app, these pages are no longer overridden.  (On iPhone iOS 4.2, clicking the + icon next to a new Custom Object (instantiating Object.new) takes me to the standard 1 column display, unlike the Visualforce page that overrides it. 

 

Is there an API or developer's guide out there that I could get my hands on?  (Does one even exist??)

I have a custom list button that invokes a VF page.  This bascially allows user to start something from an object's Activity History related list.  I wonder how I can deploy it properly.  There isn't anything to select for List Buttons in either IDE or SFMT tools.  I don't want to deploy the whole Task object.  I tried just deploying the layout using the button.  The button did seem to cross over, but its URL all screwed up.  I did see "Buttons and Links" in Change Set, but that's a less preferrable approach since it's a beta feature and less automatable.  Any suggestions?

I have a command button, and when I try and use it in the visualforce page I am not able to reterive the paramter from the page, it returns null

 

Here is the visualforce code

 

 

<apex:page standardController="Account" extensions="Controller_DupeChecker">
<apex:form >
<apex:dataTable value="{!DupeAccounts}" var="das" width="100%" border="1px" style="text-align:center">
<apex:column headerValue="Account Names" value="{!das.Name}"/>
<apex:column headerValue="Phone" value="{!das.Phone}"/>
<apex:column headerValue="Shipping Street" value="{!das.ShippingStreet}"/>
<apex:column headerValue="Billing Street" value="{!das.BillingStreet}"/>
<apex:column >
<apex:commandButton action="{!MergeAccounts}" value="Merge" id="theButton">
<apex:param name="acid" value="{!das.id}"/>
</apex:commandButton>
</apex:column>
<apex:column >{!das.id}</apex:column>
</apex:dataTable>

</apex:form>
</apex:page>

 

 

 

 

And here is the apex class

 

	public PageReference MergeAccounts(){
	// aid is not passing a value 	
	Id aid = System.currentPageReference().getParameters().get('acid');
	
	List<Account> mergeAccounts = new List<Account>();
	system.debug('aid: '  + aid);
	
	Account mergeAccount = ([select Id FROM Account WHERE Id =:aid]);
	//merge function doesn't bring over fields
	merge acc mergeAccount;
	return null;
	}

 

 

Please help!

 

Hey all,

 

Recently I posted a problem about manipulating the URL to auto-fill fields without using Visualforce.  The answer turned out to be that to do this, I would need to hard code in the Id values of the fields and then just throw what I wanted in there. 

 

 

/a0F/e?CF00NA0000004riGC_lkid={!Open_Quotes__c.AccountId__c}&CF00NA0000004riGC={!Open_Quotes__c.Account__c}&00NA0000004rmIC={!LEFT(Open_Quotes__c.ERPID__c, (LEN(Open_Quotes__c.ERPID__c) - 3))}&00NA0000004rmFn={!RIGHT(Open_Quotes__c.ERPID__c, 2)}

 

Ok so we got that working, but now I'm sending this to a Visualforce page that mimics standard functionality, and the <label for> Ids are now: j_id0:theForm:thePageBlock:j_id15:j_id17.  So as you may well surmise, it's no longer working.  So I tried to put it the new values into the formula, and it still doesn't work. 

 

Any ideas?

 

Hey all,

 

I'm trying to pass values to a Visualforce Page from another VF page, and when I get to that page, it will automatically assign values of Custom Fields to what is being passed in by System.GetParameters(), and then Automatically call a save, so that the User will only see a pageview, and not the edit functionality. 

 

So to make a bit more simple:

1. User Saves a Record.

2. Parameters get passed into another VF page (by clicking a button) that carries a reference that the first Record needs. 

3. User does some cool stuff on the other page, modifying the reference and sends it back to the first page using a button.

4. Page.edit() opens and automatically dereferences the system.getParameters() and assigns them to values on the page.

5. The system saves the page and goes to Page.view(), firing custom workflow, without any User input.

 

Any ideas?

 

So far this is what I have:

 

 

First Page Controller: 

ublic FirstPage(ApexPages.StandardController stdcontroller) 
    { 
        this.C = (Custom_Object__c)stdController.getRecord(); 
        if(system.CurrentPageReference().getParameters().get('Email') == '1')
        {
            PageReference Test = SaveView();
        }
    }

 

 

So in the controller I look for a field called 'Email' and if it's equal to '1', then call:

 

public PageReference SaveView()
    {
        
        update C;
        PageReference GoBack = new ApexPages.StandardController(C).view();
        GoBack.setRedirect(true);
        return GoBack;
    }

 

 

And on my second page (along with some other data) when I click a button:

 

 

public PageReference SaveAndEmail()
    {
        this.AddCallAttendee();
        Custom_Object__c C = new Custom_Object__c(Id = CA.Call_Report__c);
        PageReference GoBack = new ApexPages.StandardController(C).edit();
        GoBack.getParameters().put('Email','1');
        GoBack.setRedirect(true);
        return GoBack;
    }    
    

 

Since Edit is overridden by the first page, it will keep the values that are saved within the Call Report and pass in EMail = '1'.  When I check the page, it's there, but it doesn't either call SaveView(), or doesn't reference the Email itself.

 

Note: This does Compile and Save, the errors in the code above are the result of my failure to know how to copy and paste.

 

Hi Guys,

          

                    I need to display lookup fields in a Table of VF page. I am getitng Id Instead of Name..Can Anyone Help me on this.

 

Appriciate your help..

Thank You.

Raghu

Ok, so for some reason my Messages aren't being displayed, even though I (Seem to) have everything all set up.

 

VF page setting up the messages:

 

 

<apex:messages rendered="true" style="color:Red;"/>

 

 

Apex Code calling and creating a message:

 

 

 ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.INFO, 'Call Attendees: ' + CallAttendeeSum + 'uploaded'));
            

 

 

I get no compile errors, no errors of any kind at all, the message just does not display. What gives?

Hello there,

 

I'm currently working with a dynamic selectcheckboxes list in Visualforce, and I need to uncheck the checked boxes through Apex whenever a commandbutton is pressed.  I figure it might have something to do with selectOptions list, but I'm not certain. 

Any ideas or help would be appreciated.

Hey all,

 

I am trying to figure out how to use a command button that will save a Visualforce Page, then open a new Visualforce page passing in Parameters for the new page to use. 

 

I know that I would use a controller extension on the first page and include the standard save component, but what would I do afterwards? This is the code for the commandbutton itself and the parameters to pass to the new page

 

 

<apex:pageBlockButtons >
<Apex:commandbutton value="Save and Add Call Attendee" Action="{!save}"><Apex:param name="Account" value="{!Call_Report__c.Account__c}"/><apex:param name="CallReport" value="{!Call_Report__c.Name}"/></apex:commandbutton>
</apex:pageBlockButtons>

 

 

And this is the save component.  How would I open a new page after the save?  Is it a simple PageReference call to the new VF page? Is there something much more complicated? 

 

 

public PageReference save()
    {
        PageReference CRsave = controller.save();
        //I imagine something else would go here...
        return CRSave;
    }

 

 

 

 

 

 

Hey all, this might be a really simple question or it might not.

 

I have a Custom Record that will have multiple Accounts associated with it.  Is there any way to have that Custom Record show up on all the Accounts' related lists?