• Paulo Castro
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 23
    Replies

Hi,

 

 after upload and install my package on my Trialforce Master Org, I'm getting the error bellow when I try to open a VF page: 

Unknown property 'xxx__xxxx__cStandardController.xxxx__c'

What I can see is: after upload and install the managed pack on Trialforce Master Org, SF system change every object reference to his fully qualified name, which includes the namespace. And I don't know why, with this namespace prefix, my VF pages throw this error in every page which has this page tag parameter:

 

standardController="namespace_customobject__c" 

 

 Someone had this same issue before?

 

 Thank you in advance.

 

 Best regards,

 

 Paulo Castro

 

Hi,

 

 I´m trying to install a managed pack on my Trialforce Master Org, but at the end I received this error message bellow without any clue of what is going on:

 

Organization: Vet Work (00DA0000000KMqr)
User: Admin User (005A0000000Nm4N)
Package: Vetwork002 (03380000000AjbC)
Error Number: 490895533-9304 (-423025)

Package Install Failed

An error has occurred during a package install operation.

 

 

 Someone had this same issue before? I opened a support case, but until now they didn't say anything...

 

 Thank you in advance

 

 Paulo Castro

 

Hi,

 

 I have this VF page that uses some AJAX code to send/receive data using JS XMLHttpRequest call. This page exchange JSON data with SF server.

 The issue is when I make the first call to the server address. On the first call I send to SF address:

 

 https://xxx.na6.visual.force.com/apex/MyJSON?core.apexpages.devmode.url=1 

 

 the request, but it redirects me to this other page:

 

 https://na6.salesforce.com/visualforce/session?url=https%3A%2F%2Fxxx.na6.visual.force.com%2Fapex%2Fxxx__MyJSON%3Fcore.apexpages.devmode.url%3D1

 

 and then redirects me again to the original address, to finally show the result. It seems that SF is authenticating me again, even when I'm alredy authenticated.

 

 This redirection is making my JS not work correctly. So, to be able to view the data, first I have to manually call the original address and then refresh my VF page.

 But I can't ask to my users to do this before open this page :)

 

 Anyone knows how to solution it?

 

 Tnx in advance

 

 Best regards

 

 

 PH

 

 

Hey guys,

 

 I'm trying to understand what is going wrong with my custom controller method for about 2 hours and just now I realize that the following code is probably my problem:

 

 

act.Private__c = boolean.valueOf(Apexpages.currentPage().getParameters().get('private'));

 

 Private__c is a checkbox (boolean) field type and I was trying to parse a form field string with a 'false'/'true' value.

 

 The problem here was I didn't get any error messages in any place. I turned on the Apex Debug Log and it shows status 'Sucess' and nothing else more. To find that this line is probably my problem I had to put a System.debug() line after every single code line that I wrote!

 I mean, I can't spend 2 hours to find an error for every problem I have!! And I can't put a System.debug() line for every single code line I have. This way I'll take 100 years to finish my project... :(

 

 Another problem is this thing to have to reset my debug log every 20 time... I'm using a development org, so I'll need it every time. Is there any way to change it?

 

 At last, the debug output is soooo large and difficult to read. I saw that someone developed this tool to filter debug logs output, but it works only in Windows and I use Mac (lucky me :) ). Any tips here?

 

 Thank you in advance for any help!! 

 

 Best regards

 

 PH

 

 

 

Hi,

 

 I know this question sounds stupid, but after search about 2 hours for an answer (without success!) I decided to ask for help.

 

 Im developing a new app using Force.com. After create a new custom object I would like to populate it with a few new records. I don't want/need to create a new tab/page to insert new rows, since this object will not need it. For example, I have this custom object called UserGroup__c and it will have 10 records that will not be available to change/delete or anything by user, so it doesn't need an interface. I will use it just for reference in a option list.

 

 Since it appears that we can't insert records using SOQL, how could I insert a single record in this object? I thought that using Schema Explorer in Force.com IDE I could do it, but it is not possible.

 

 Thank you in advance.

 

 Best regards,

 

 PH

 

Hi guys,

 

 I have this Visualforce Page using an extension controller, and in it's constructor I get the standard controller instance to access the current record, as bellow:

 

public class MyControllerExtension{

    private final Custom_Object__c customRecord;    
    private final Another_Object anotherObject;
    
private final Apexpages.Standardcontroller stdController; public MyControllerExtension(Apexpages.Standardcontroller sc){ stdController = sc; customRecord= (Custom_Object__c)stdController.getRecord(); anotherObject = new Another_Object(customRecord); } }

 

 I have to pass the customRecord instance to this anotherObject, since anotherObject will refer (lookup) it.

 

 So far, so good.

 But I'm using this Visualforce page to create a new record of this object Custom_Object__c. So, when I call stdController.getRecord() it returns a Custom_Object__c instance with Id property = null. And it is ok, since at this time it doesn't have a record yet...

 Then I  created a custom Save() method. this way I could save customRecord and anotherObject when my user click on save button.

 

public class MyControllerExtension{ private final Custom_Object__c customRecord; private final Another_Object anotherObject; private final Apexpages.Standardcontroller stdController; public MyControllerExtension(Apexpages.Standardcontroller sc){ stdController = sc; customRecord = (Custom_Object__c)stdController.getRecord(); anotherObject = new Another_Object(customRecord); } public PageReference save(){ PageReference result = stdController.save(); anotherObject.Save(); return result; } }

 

 

 After the first line execution of this method (PageReference result = stdController.save()) I thought that the customRecord would have his Id updated with some value. But it didn't happen! So, when I called anotherObject.Save(); it didn't created the relationship, because anotherObject have a reference to customRecord with Id = null, even after called the save() method.

 

 Then I tried (using debug) to get another stdController.getRecord() reference after call save() method. And then it worked !! The Custom_Object__c returned had his Id value.

 

 So the only thing I can imagine is when I call save, it creates another Custom_Object__c instance inside the controller class... Am I right? What I'm missing here?

 

 Thanks in advance!

 

 Best regards

 

 PH

Hi,

 

 I want to use selectCheckboxes component, but I can't find wich kind of object the value property could have.

 In the Visualforce documentation the example use a string array object as value, but it says I could assing an object. But what kind of object? Just string arrays?

 

 I'm asking this because I want to implement something like an Order and Items, and I want to display these Items using checkboxes. So if the checkbox is marked it will create a record on Items object, and if it is unmarked it will delete this record on Items obeject. Is it possible?

 

 Tnx.

  

Hi guys,

 

 do you know if exists an example of use selectCheckboxes with a custom object somewhere? The visual pages developer guide show a very simple example, and I'm trying to do something more complex.

 

 In a few words, what I'm trying to do is:

 

 I have an object called Question, another called Answer and another called Result. As you can imagine, for each record on Question object I have some records on Answer object. This way I can add, delete and update my questionnaire always I need.

 I will render these questions and answers on a custom page, using selectCheckboxes, since users can select many answers they want.

 After user fill the questionnaire, I want to save all answers they checked, in Result object.

 The schema is something like this:

 

 Question

  - Description (text) 

 

 Answer

  - Question (Lookup)

  - Description (text)

 

 Result

  - User (Lookup)

  - Answer (Lookup) 

 

 If an user want to see what he did before, I will render all questions and answers and mark the answers that they checked before.

 

 Until this moment I know I'll need to create a custom page, one controller and these 3 custom objects. But do you think I'll need to create a custom class also to make all this work? 

 

 To be able to render all question and answers I think I'll need to create a loop in the custom page to retrieve all questions and for each one render the correspondent answers. Is that correct? Or exists another easy way to do this?

 

 To render the blank questionnaire I think it will be easy. I was wondering how could I render it and check the answers that an User checked before... any ideas?

 

 Any help on insight is very welcome! :)

 

 Thanks!

 

 

  

 

Hi guys,

 

 I'm starting to code my app using Force plataform.

 At this moment I'm creating my custom objects, and one of the fields is a picklist that I want to make required to be chose, but on the other side I don't want to make the first option default.

 So I tryed to use the required attribut equal to true, but I got the following error message:

 

 Can not specify 'required' for a CustomField of type Picklist

 

 How could I handle this?

 

 Tnx in advance.

 

 Best regards,

 

 PH
 

Hi,

I would like to know if is it possible to offer trial version for my future customers without list my app in AppExchange?! I saw I need to pay US$15 for each user of my app (if I choose to not use AppExchange), but when they are not my client yet I'll need to pay this value anyway?
Also I would like to know if is it possible to calculate and charge my clients using other metrics (like used data size) and not the user-based type?!

Thank you very much in advance.

Best regards

Paulo Castro

Hi everyone,

 

   In my appliction i am using picklist field.My requirement is, in picklist i should not be display "-None-" option and it won't accept null values also.if any one knows this plz tell me the solution.

 

Thanks in advance,

anu..

hi..

pageblocksection hide 

 

Message Edited by devamit on 10-13-2009 12:59 AM

Hi,

 

 I have this VF page that uses some AJAX code to send/receive data using JS XMLHttpRequest call. This page exchange JSON data with SF server.

 The issue is when I make the first call to the server address. On the first call I send to SF address:

 

 https://xxx.na6.visual.force.com/apex/MyJSON?core.apexpages.devmode.url=1 

 

 the request, but it redirects me to this other page:

 

 https://na6.salesforce.com/visualforce/session?url=https%3A%2F%2Fxxx.na6.visual.force.com%2Fapex%2Fxxx__MyJSON%3Fcore.apexpages.devmode.url%3D1

 

 and then redirects me again to the original address, to finally show the result. It seems that SF is authenticating me again, even when I'm alredy authenticated.

 

 This redirection is making my JS not work correctly. So, to be able to view the data, first I have to manually call the original address and then refresh my VF page.

 But I can't ask to my users to do this before open this page :)

 

 Anyone knows how to solution it?

 

 Tnx in advance

 

 Best regards

 

 

 PH

 

 

Hey guys,

 

 I'm trying to understand what is going wrong with my custom controller method for about 2 hours and just now I realize that the following code is probably my problem:

 

 

act.Private__c = boolean.valueOf(Apexpages.currentPage().getParameters().get('private'));

 

 Private__c is a checkbox (boolean) field type and I was trying to parse a form field string with a 'false'/'true' value.

 

 The problem here was I didn't get any error messages in any place. I turned on the Apex Debug Log and it shows status 'Sucess' and nothing else more. To find that this line is probably my problem I had to put a System.debug() line after every single code line that I wrote!

 I mean, I can't spend 2 hours to find an error for every problem I have!! And I can't put a System.debug() line for every single code line I have. This way I'll take 100 years to finish my project... :(

 

 Another problem is this thing to have to reset my debug log every 20 time... I'm using a development org, so I'll need it every time. Is there any way to change it?

 

 At last, the debug output is soooo large and difficult to read. I saw that someone developed this tool to filter debug logs output, but it works only in Windows and I use Mac (lucky me :) ). Any tips here?

 

 Thank you in advance for any help!! 

 

 Best regards

 

 PH

 

 

 

Hi,

 

 I know this question sounds stupid, but after search about 2 hours for an answer (without success!) I decided to ask for help.

 

 Im developing a new app using Force.com. After create a new custom object I would like to populate it with a few new records. I don't want/need to create a new tab/page to insert new rows, since this object will not need it. For example, I have this custom object called UserGroup__c and it will have 10 records that will not be available to change/delete or anything by user, so it doesn't need an interface. I will use it just for reference in a option list.

 

 Since it appears that we can't insert records using SOQL, how could I insert a single record in this object? I thought that using Schema Explorer in Force.com IDE I could do it, but it is not possible.

 

 Thank you in advance.

 

 Best regards,

 

 PH

 

I know I've seen posts about this before but the search is failing me. This seems like a really basic question - but is there an array syntax in visualforce for input fields similar to php?

 

For example if i create a series of input fields with name equal to "myInput[]" can I then retrieve the array on the server side in an action with System.getCurrentPageReference().getParameters().get('myInput'); ? 

Hi guys,

 

 I have this Visualforce Page using an extension controller, and in it's constructor I get the standard controller instance to access the current record, as bellow:

 

public class MyControllerExtension{

    private final Custom_Object__c customRecord;    
    private final Another_Object anotherObject;
    
private final Apexpages.Standardcontroller stdController; public MyControllerExtension(Apexpages.Standardcontroller sc){ stdController = sc; customRecord= (Custom_Object__c)stdController.getRecord(); anotherObject = new Another_Object(customRecord); } }

 

 I have to pass the customRecord instance to this anotherObject, since anotherObject will refer (lookup) it.

 

 So far, so good.

 But I'm using this Visualforce page to create a new record of this object Custom_Object__c. So, when I call stdController.getRecord() it returns a Custom_Object__c instance with Id property = null. And it is ok, since at this time it doesn't have a record yet...

 Then I  created a custom Save() method. this way I could save customRecord and anotherObject when my user click on save button.

 

public class MyControllerExtension{ private final Custom_Object__c customRecord; private final Another_Object anotherObject; private final Apexpages.Standardcontroller stdController; public MyControllerExtension(Apexpages.Standardcontroller sc){ stdController = sc; customRecord = (Custom_Object__c)stdController.getRecord(); anotherObject = new Another_Object(customRecord); } public PageReference save(){ PageReference result = stdController.save(); anotherObject.Save(); return result; } }

 

 

 After the first line execution of this method (PageReference result = stdController.save()) I thought that the customRecord would have his Id updated with some value. But it didn't happen! So, when I called anotherObject.Save(); it didn't created the relationship, because anotherObject have a reference to customRecord with Id = null, even after called the save() method.

 

 Then I tried (using debug) to get another stdController.getRecord() reference after call save() method. And then it worked !! The Custom_Object__c returned had his Id value.

 

 So the only thing I can imagine is when I call save, it creates another Custom_Object__c instance inside the controller class... Am I right? What I'm missing here?

 

 Thanks in advance!

 

 Best regards

 

 PH

I am trying to retrieve the XML containing the list of Reports for my Organization using the document available at https://<server>.salesforce.com/servlet/ReportList.servlet

 

The way I'm retrieving this document from inside my VF controller is with this code:

 

Map<String, String> headers = ApexPages.currentPage().getHeaders();
String endpoint = 'https://' + headers.get('Host') + '/servlet/servlet.ReportList';
HttpRequest req = new HttpRequest();
req.setEndpoint(endpoint);
req.setHeader('Cookie','sid=' + UserInfo.getSessionId());
req.setMethod('GET');
Http http = new Http();
HttpResponse res = http.send(req);
reportBody = res.getBody();

parseReportXml(reportBody);
 

This works fine for an Unmanaged VisualForce page ... but when I deploy my VF page in a Managed Package, this breaks down. The issue is that when you access a managed VF page, there is a big long redirection dance that issues you new cookies (and a new Session ID) for the server that the VF page resides at. The URL you finally end up at is a force.com URL (ex. https://<package prefix>.<server name>.visual.force.com/apex/<my page>)

 

So, there are two issues:

 

1) The use of the headers.get('Host') is no longer correct (since I'm no longer at <server>.salesforce.com) ... I can work around that because SF actually gives me a Redirect response if I try to run the above code

 

2) The Session ID inside my VF controller is not a valid SessionID for the <server>.salesforce.com server. This is what I can't figure out a workaround for.

 

Is there some way to have SF issue me a SessionID via some API that would be valid for the <server>.salesforce.com based on the SessionID I have for the visual.force.com domain?

 

Thanks,

Dave

Sorry, my original text is missing for some reason...... (user error I suspect!)
 
I have searched for an answer to this and found no solution.  My understanding is that on a normal SF page, it remembers at the user level if the user wants a section open or closed by default.  This works for me on normal pages.  On VisualForce pages this functionality does not work.
 
But what I would really like is to either set a parameter on my VF page so that permanently sections are closed by default.  Alternatively have it possible to manipulate the state of the section via the controller.


Message Edited by GerhardNewman2 on 11-06-2008 01:57 PM
I have an inputfield of type picklist. The picklist has the following values:
Cancelled
Draft
Pending
Completed
OnHold
 
I need to select one of the values(e.g. Draft) as the default value whenever the new page is opened.
 
I tried marking Draft option as the default value in Picklist values. However it does not work.
 
Please suggest.
  • October 21, 2008
  • Like
  • 0
Hi everyone,

Is that possible to remove None from a picklist?
Is there any way to force a Collapsible PageBlockSection to start in a collapsed mode, when the page is rendered?  I know with standard page layouts, this isn't possible, but Salesforce remembers what a user chooses and uses that in the future to determine the collapsible state when rendering a page.  So far, I have not seen this same behavior with Visualforce pages.  It would be nice to have a parameter on the PageBlockSection that controls the initial behavior of a collapsible PageBlockSection when it it first rendered.
 
Jon Keener


Message Edited by Jon Keener on 02-14-2008 01:06 PM
Hi,
 
I have Master Detail Relationship between two custom objects. I also have apex triggers on both of the custom objects. When I am deleting a record on master object all the records of child object gets deleted because of master detail realtionship but the delete trigger on child object does not get fired in this case.
 
Please suggest me a solution.
 
Thanks