• Luke@TWS
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 64
    Replies

I'm looking to build a data cleansing app. For this I need to process all records so using batch apex would be handy and mean I could build the app entirely on the force.com platform. However, I need to make a webservice request, either for each record or each batch, to actually check the record and retreive any corrections.

 

Adding a web service call into a batch apex class just seems to make it fail every time. Is this just not possible to do? or is there some specific way in which the request needs to be made?

 

I'm building a VF page, part of it requires some javascript to run some client side UI functionality which requires information from another object. Is there any way to access the data in the controller directly using Javascript? should I be making hidden fields and populating these with the data? or should I get the session ID and use AJAX to get the data separately?
I have a sidebar component which gets some data from a custom object. Works fine on normal pages but I get an "Invalid Session ID found in SessionHeader: Illegal Session" error from the component when it loads up on a visual force page.

Any ideas?
I want take the user to another VF page when they click new or edit on an item in a related list view in my VF page.

It's possible to override the standard buttons and links for any object. This works great but you can't package it yet. Vote if you want it.

There seems to be no way to edit the related list to run different actions to the standard either. Is the only option from here to make a custom component which looks and acts exactly like the related list with the exception of the override?
Probably very simple but I couldn't find anything about this in the documentation.

How do I get user infomation in the controller of a vf page?
I have an page for an object which should always have a record. If it does not have a record then I want to create a new one using a vf page.

What would be the best way to do this?

Thought about checking for the existance of the record and then redirecting them to the other page if it does not exist, but not sure how to do this. Could also have two page sections, one displays if there is a record present and one if not, but would this be the best way?
I have a component that has a value passed into it from a VF page. The attribute is then passed into the components controller where the value needs to change. Is there any way to get this value back to the main page?
I have a VF Page with a custom controller. It contains a string with get and set methods. This value is passed as a String to a component. The attribute has an assignTo referencing a public string with {get;set;) in the components controller. The value is not available (is null) when acessed in the components constructor but is available shortly after within a command button action. I need the value within the constructor. Any ideas?
I have a component which has a selectList in, having an attribute of type String[] taking the selectoptions from the main page works fine to populate the list. I want to be able to add options to the list so I need access to the options in the code behind but I get errors when trying to use assignTo with it.

Can't have an attribute of LIST:System.SelectOption
Setter can't just take the list of strings to use, like the list does, without compile error.
Changing component controller to store a List<String> gives you a Visualforce on the setter method as its being given a List:System.SelectOption

Any ideas?


Looking to create a component, similar to the salesforce dual select list. Basically two select lists with buttons to move options between the two and also move them up and down the order in the list, plus a few other options.

I have tried constructing the component with the lists, options passed through in attributes and some javascript to move them about but I would need some way of getting the items in the list back in apex, not just the ones that are selected (highlighted).

Any ideas?

Otherwise looks like I'm going to have to do it all server side and reload both of the lists every time which is going be very slow.


Message Edited by Luke@TWS on 09-30-2008 09:18 AM
Getting the error:

System.CalloutException: IO Exception: Exceeded max size limit of 100000 with response size 100697

When calling my web service to bring in all of the cities/towns in Texas. Can't think of any way to make the list any smaller, having problems with a few other lists too. Anyone know of a work around for large amounts of data?



I have a custom VF component with a custom controller. I have an attribute in the component that I wish to access in my custom controller code. How would I go about doing this?
Code:
List<SelectOption> options = new List<SelectOption>();
SelectOption option = new SelectOption('code','description');
option.style.fontWeight = 'bold';
options.add(option);

 Trying to implement something similar to the above code but it throws the error:

Compile Error: Expression of type System.SelectOption has no member named style

and also does the same for the other properties. How do you set the properties like style?
Having a little problem with the page editor, if i'm adding a little javascript like

Code:
    for (i=0; i<categories.length;i++)
{
var option = document.createElement("Option");
option.value = boundaries[i];
option.text = categories[i];
option.style.fontWeight = "bold";
try { lstA.add(option,null); }
catch (e) { lstA.add(option); }
}

the page gets generated with:

Code:
        for (i=0; i<categories fontWeight="bold" .length;i++)
{
var option = document.createElement("Option");
option.value = boundaries[i];
option.text = categories[i];
option.style.;
try { lstA.add(option,null); }
catch (e) { lstA.add(option); }
}

 
 



Message Edited by Luke@TWS on 07-23-2008 07:14 AM
I've heard there's a sensible way of doing this. Basically I want to pull in some data from a webservice, based on the value in one field, to populate the values of other fields after a little processing. This really needs to be on the standard account/contact/lead edit pages, it involves standard fields, and needs to look as integrated as possible.

At the moment the only way I can see to do this is by hacking in a bit of javascript from a sidebar component, this works fine, but I'm looking for a more salesforce friendly approach if possible (Apex/Visualforce etc)
Ive been developing a custom button using javascript, I'd like to pull out the address but using {!Lead.Street} for example, when the street is more than one line, will break the javasacript. Is there any easy way around this? I could go down the route of using API calls but I'd like to avoid it if possible.
Im writing an apex trigger and test class. Trigger seems to function perfectly but I'm having problems with the test class. The line to query a users ID from the Name does not seem to work if the name has an accent in it, for example ñ

Is this a known problem? Has anyone else run into it?
Hi,

I've been having a play around trying to setup a new app in Visual Force. I have a settings object which will probably only have one set of settings, so I would like to skip the object selection selection as I already know which one I wish to make the subject. I would also ideally like to keep the standard controller functionallity as this makes alot of other things easier. It is possible to use a controller extension to tell the standard controller which object it should be looking at?

I know you can use object = standardController.getSubject(); to tell the extension which object we're looking at, but can you do it the other way around?

object = [select Id from setting limit 1]
standardController.setSubject(object)

or something similar.

I have a VF controller that grabs the "current" record using the getRecord call:

 

        this.controller = stdController;
        this.theQuote = (SFDC_520_Quote__c)stdController.getRecord();

 

Now i'm writing the test class, but when I run it i'm getting an error:

 

System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: SFDC_520_Quote__c.Discount_Type__c

 

However I am referencing this field in my VF page, (see below), so I should have access to it from Apex, right?  (That's how I read the documentation, at least.)  Also note that it works when walking through the app normally - it only fails in the test method.  I even added a hidden input to my VF page to try to resolve this (again, per the documentation) - so it's actually referenced twice.

 

What am I doing wrong?

 

                <apex:inputField value="{!SFDC_520_Quote__c.Discount_Type__c}" />   
 

 Thanks for your time

chris

 

Hi,

 

If I create a custom component, is there any way to update a value on the parent controller? Let's say as a parameter passed into the custom component, I gave a value like {!value}. Can the controller behind the custom component modify that variable that's on the main page's custom controller? In java you might do this with a shared bean or session variable. What about in apex?

 

I have several VF tabs on my page. Each tab is a different business function. I end up re-using code on multiple VF pages so it would be great to make each tab a component so I can re-use thm elsewhere.  Right now it's monolithic. But a link on one tab may cause the VF page to jump you to another tab and use a commandlink parameter.

 

So if we were to break this up into custom components, we would need to somehow pass data between them. Is that possible somehow? It looks like variables only flow one way or maybe we just don't know how to do it?

 

Any thoughts?

 

Thank you,

DSL

  • April 12, 2009
  • Like
  • 0
I have a sidebar component which gets some data from a custom object. Works fine on normal pages but I get an "Invalid Session ID found in SessionHeader: Illegal Session" error from the component when it loads up on a visual force page.

Any ideas?
We are creating a form with input fields, and we want the ability to display the hover over help text for every input field. We are currently defining the input field within the <table> tag enveloped in a <pageBlock> but have not been able to display the help text using this method.
 
However, we also tried using <Page Block Section> to envelope the input fields and were able to display the hover over text, but were limited to using only two columns per section and were unable to define custom labels for the input fields. This forced us to switch to the <table>tag. 
Is there a way for us to display the hover over text while using custom labels and having more than two columns?
Consider the following data:
 
Name1:GroupA
Name2:GroupA
Name3:GroupB
Name4:GroupB
Name5:GroupB
 
I need to have a multiselect picklist having data based on the Group selected in some other picklist. e.g. if GroupB is selected then the multiselect picklist should show the values Name3, Name4, Name5.
 
I was thinking of creating a separate object having two columns Name and Group. This object would then be used to create a lookup field. I then create a selectList and then filter the values in the selectList based on the Group selected. However I want the selectList to look like a multiselect picklist (having the Available and Selected boxes with the arrows in between). Is that possible ?
 
Please let me know how to achieve this or is there any other method on doing this ?
  • October 23, 2008
  • Like
  • 0
Hi,

I'd like to create my own Lookup Page. This page has now been created with Visualforce Page.

The Problem is how can I make the lookup button to link to this page. The lookup button alweays open the standard lookup page /_ui/common/data/LookupPage.

Is it  possible to overwrite some fuctions in the file functions.js, so that the lookup button does not open this standard LookupPage but my own custom page? If not, is there any other solution for that?


Thanks for any answer.

Regards
Zhengdao
  • October 23, 2008
  • Like
  • 0
Probably very simple but I couldn't find anything about this in the documentation.

How do I get user infomation in the controller of a vf page?
I have one custom object. only one record will be there in that custom object.
Now there is one Visual force page for my custom object which i need to open on the click of Tab of the object but with that value in all inputText and other inputComponent.

i.e. If there is no record found in the object then "save" button will insert the new record else update the existing one.

How can i do this?

Thanks in Advance
I have a component that has a value passed into it from a VF page. The attribute is then passed into the components controller where the value needs to change. Is there any way to get this value back to the main page?
I have two custom objects with master-detail relationships.
Detail custom object's New button has overrided with the Visual force page.
now, I want to access Master's Record Id to set in Detail's Field in "Save" method in EXTENSION class. This method is to insert the detail record . 
 
How can i Do this?
 
Thanks in Advance.
 
 
Shwetal
 
I have a VF Page with a custom controller. It contains a string with get and set methods. This value is passed as a String to a component. The attribute has an assignTo referencing a public string with {get;set;) in the components controller. The value is not available (is null) when acessed in the components constructor but is available shortly after within a command button action. I need the value within the constructor. Any ideas?
I have two custom objects, Setting and Customisation (British spelling). Customisation has a Master-Detail(Setting) field and
Child Relationship Name is Customisations. However
 
Code:
<apex:relatedList list="Customisations" title="Profiles" subject="{!SettingId}"/>

 Causes an error: 'Customisations' is not a valid child rationship name for entity Setting. The name right and I think I have the objects setup right. SettingId is the Id of the setting record I am using to store the information and the customisation record is related to the correct one. Seems to be moaning about the right object so I doubt its a custom controller problem.
I am working on an AJAX application with S-controls which reference third party javascript libraries and images from a folder on the documents tab.

It works fine but when I upload my application to AppExchange and someone installs the application the file ids in the download urls change

"https://na1.salesforce.com/servlet/servlet.FileDownload?file=015300000005Gll"
"https://emea.salesforce.com/servlet/servlet.FileDownload?file=015300000006846"

Even the server name changes from n1.salesforce.com to emea.salesforce.com. How can I resolve this ?

Is this good practice or should I host the libraries and images on our own website.

I looked into the "Sforce Explorer" s-control and it includes javascript files from "http://sandbox.sforce.com/ajax/sforceExplorer/". What other options do I have in salesforce to upload files.

Thanks,

Juergen