• chris_parx
  • NEWBIE
  • 5 Points
  • Member since 2010

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

Hi,

 

I'm facing a bug on a few of my old interfaces since I guess the new release and I don't find an easy way to fix that.

 

the scenario: the problem appears as soon as you have an apex datatable with a few inputfields and some of them which are tag as required and you want to delete for example one row. The best practice was before to put a button/commandlink or whatever, to make a call to the controller with immediate="true" (because of the empty required inputfields), to delete the row in the controller and to make a rerender on the table. easy. But since the new release, it appears that it's broken. What happens is the following: the row is deleted, the table is refreshed, the row disappears as expected but the data inside the row are not removed - I mean, the table itself looks like it has been refreshed but the data inside the table are not refreshed. Instead, the data of the last row is removed as if we deleted the last row. I checked that the controller did the job right, but not the rendering of the page.

 

my actual solution: I still make the call to the controller to delete physically the row in the controller, but I don't make any rerender (or well a fake one on any id). Instead of that, I call a JS function on the oncomplete event which removes the corresponding row in Javascript ... really horrible ...

 

Is there anyone else facing the same kind of problem?

 

PS: the API Version has not been updated although the behaviour is really different...

I'm doing something simple with FeedItem (API version 23.0)

for(FeedItem fi:[select id from FeedItem]) {

// do something

}

 

and when I want to save, I got this error: "Loop variable must be an SObject or list of FeedItem". !?

 

The same if I want to make something like that:

list<FeedItem> FI = new list<FeedItem>([select id from FeedItem]);

and the error: "Invalid initial value type LIST<FeedItem> for LIST<FeedItem>" .... This does not make much sense!

 

If I indeed use an SObject to init, then it's ok, but getting a blob from a SObject (ContentData field) is impossible...

 

This is obviously a bug.

Hi,

 

I have a webservice which only accepts binary data. However on Salesforce, we get the file encoded in base64 (which can be converted to hexa but that does not help me much). Up to now, I didn't find a way to convert this base64 to literal bytes. Doing a "toString()" to the Blob helps only if the file is a text file, but not a picture, an application or anything else.

May someone point me on the right direction?

 

If it does not work with an apex:inputfile, would it be possible to use the real html component <input type="file" ...> in order to get the real file in binary data and to bypass the Salesforce encoding? But I did not find a way to send the file to the controller :(

 

Any help would be appreciated!

 

Hi,

 

I would like to use fieldset in a VF Page but unfortunately, I don't know the name of my Object at the compilation time but first at the runtime.

 

To use a fieldset, it looks normally like this: {!$ObjectType.Account.FieldSets.MyFieldSet} with MyFieldSet the name of the fieldset and Account the object... But in my case, I have to do something generic and I don't know if it's an Account, or a Contact, or anything else. So I would like to be able to do something like {!$ObjectType.get('Account').FieldSets.MyFieldSet} and to remplace the string 'Account' with a variable from my controller.

 

Anyone has an idea?

 

Thank you!

 

Hello!

 

I'm trying to automate the login from users from our site to the corresponding customer portal. The easiest solution I found is saving the password of the current user in a parameter and writing a URL which looks like this one:

https://cs8.salesforce.com/secur/login_portal.jsp?orgId=XXXXXXXXXXXj&portalId=XXXXXXXXXX&un=XXXXXXXX&pw=XXXXXXXXX

 

But saving the password from page to page, even encoded is not pretty nice... I had hope that using something like the Session Id would allow to perform the login but I'm not able to find how to use it in this way... Has someone maybe an idea ... or another nicer than mine?? the Single Sign-on solution is not really a solution for me because having to implement a webservice and so on is much to much complicate for what I just require: I just would like to use something standard in apex...

 

For some reason, I have to catch the event when a user is leaving a visualforce page (closing the page, clicking on another link, ...) and execute a method of my controller.

The idea was to use something like window.onbeforeunload = function(){ Unload();return false} which should call the function "unload()". It's working pretty well when I replace the "Unload()" with a javascript alert, meaning the function is executed but the aim is to call the controller... So I have a simple actionfunction  <apex:actionFunction action="{!OnUnload}" name="Unload"/> which should call the method "OnUnload" in my controller. Unfortunately, it is not working... It's not the first time I'm using actionfunction called from Javascript but it looks like that the line "actionfunction" is already "unloaded" even on "onbeforeunload" :/

Has someone already been confronted to this problem ?? 

Hello!

 

I'm triing to delete a cookie after a user log out but well, I don't find how to do that. Of course, the cookie is deleted when the browser is closed but if the user log again (and do not close the browser), the cookie is kept, which is not wished.

An alternative would be to store the session Id in the cookie but it appears that the session Id is different  for each page meaning it's not reliable (I thought that the sessionId is the same for the whole "Session" but well, it is not).

 

Finally, what I'm triing to do: a teaser should be showed on the first page when the user log in. If the user clicks on a button, this teaser is hidden for the whole session. But if the user log out and log in again, this teaser should be showed again! It works as intended if the user closes its browser... but only on this condition unfortunately :(

 

any idea how to solve that ?

 

Thank you!!

Hi,

 

I'm facing a bug on a few of my old interfaces since I guess the new release and I don't find an easy way to fix that.

 

the scenario: the problem appears as soon as you have an apex datatable with a few inputfields and some of them which are tag as required and you want to delete for example one row. The best practice was before to put a button/commandlink or whatever, to make a call to the controller with immediate="true" (because of the empty required inputfields), to delete the row in the controller and to make a rerender on the table. easy. But since the new release, it appears that it's broken. What happens is the following: the row is deleted, the table is refreshed, the row disappears as expected but the data inside the row are not removed - I mean, the table itself looks like it has been refreshed but the data inside the table are not refreshed. Instead, the data of the last row is removed as if we deleted the last row. I checked that the controller did the job right, but not the rendering of the page.

 

my actual solution: I still make the call to the controller to delete physically the row in the controller, but I don't make any rerender (or well a fake one on any id). Instead of that, I call a JS function on the oncomplete event which removes the corresponding row in Javascript ... really horrible ...

 

Is there anyone else facing the same kind of problem?

 

PS: the API Version has not been updated although the behaviour is really different...

Hi ,

 

I have a  requirement:
I need to Override 'Save' button on 'Event' to my VF page 'SendSMSToAttendees'.

 

Solution : I have created a VF page 'newEventpage' with the code as below, and override 'New' button of Event with the page.


<apex:page standardController="Event">
    <script>  
        window.top.location.replace("{!URLFOR($Action.Event.New, Event.id, [saveURL='/apex/SendSMSToAttendees', retURL='/apex/SendSMSToAttendees', cancelURL='/'+Event.id], true)}");
    </script>
</apex:page>

 

But I am not able to save the page. I am getting the error :


"Error: Field $Action.Event.New does not exist. Check spelling" .

 

I had a trial with Opportunities with the same logic and was working well.

 

 <apex:page standardController="Opportunity">
    <script>  
        window.top.location.replace("{!URLFOR($Action.Opportunity.New, opportunity.id, [saveURL='/apex/A', retURL='/apex/A', cancelURL='/'+opportunity.id], true)}");
    </script>
</apex:page>


I am not sure why it is not working for Event.

Can anyone help me in this matter?

 

Thanks
Ambily


  

I'm doing something simple with FeedItem (API version 23.0)

for(FeedItem fi:[select id from FeedItem]) {

// do something

}

 

and when I want to save, I got this error: "Loop variable must be an SObject or list of FeedItem". !?

 

The same if I want to make something like that:

list<FeedItem> FI = new list<FeedItem>([select id from FeedItem]);

and the error: "Invalid initial value type LIST<FeedItem> for LIST<FeedItem>" .... This does not make much sense!

 

If I indeed use an SObject to init, then it's ok, but getting a blob from a SObject (ContentData field) is impossible...

 

This is obviously a bug.

Hi,

 

I have a webservice which only accepts binary data. However on Salesforce, we get the file encoded in base64 (which can be converted to hexa but that does not help me much). Up to now, I didn't find a way to convert this base64 to literal bytes. Doing a "toString()" to the Blob helps only if the file is a text file, but not a picture, an application or anything else.

May someone point me on the right direction?

 

If it does not work with an apex:inputfile, would it be possible to use the real html component <input type="file" ...> in order to get the real file in binary data and to bypass the Salesforce encoding? But I did not find a way to send the file to the controller :(

 

Any help would be appreciated!

 

Hi,

 

I would like to use fieldset in a VF Page but unfortunately, I don't know the name of my Object at the compilation time but first at the runtime.

 

To use a fieldset, it looks normally like this: {!$ObjectType.Account.FieldSets.MyFieldSet} with MyFieldSet the name of the fieldset and Account the object... But in my case, I have to do something generic and I don't know if it's an Account, or a Contact, or anything else. So I would like to be able to do something like {!$ObjectType.get('Account').FieldSets.MyFieldSet} and to remplace the string 'Account' with a variable from my controller.

 

Anyone has an idea?

 

Thank you!

 

Hey all,

This is similar to my thread from last night, but the question has changed a bit. So I have a visualforce page with a regular old file input. When the form is submitted, it posts to a visualforce page attached to an apex controller. When the apex controller evaluates the file form field, it gets a reference to a temporary file, like 

/home/sfdc/salesforce/sfdc/jsp/form/form1091191222.tmp

How would I take that file reference and do something with it? Like actually get the contents of it so I can create an attachment. Or extract the name of it? Any thoughts are much appreciated as I am a bit stuck. Thanks ahead of time! 

Problem # 1 is that sortBy attribute of the articleList component stops working after a keyword is specified. For instance, the code below renders the same result regardless of the sorting method:

 

<apex:page >
	<knowledge:articleList articleVar="article"
				sortBy="title"
				keyword="yourKeyword"
			>
				<li >
				<a href="{!URLFOR($Action.KnowledgeArticle.View, article.id) + '&popup=true'}" target="_blank">
				{!article.title}</a>
				</li>
				<apex:variable var="isArticlesResult" value="true"/>
						</knowledge:articleList>
	<br/>
	<knowledge:articleList articleVar="article"
				sortBy="mostViewed"
				keyword="yourKeyword"
			>
				<li >
				<a href="{!URLFOR($Action.KnowledgeArticle.View, article.id) + '&popup=true'}" target="_blank">
				{!article.title}</a>
				</li>
				<apex:variable var="isArticlesResult" value="true"/>
			</knowledge:articleList>
	<br />
	<knowledge:articleList articleVar="article"
				sortBy="lastUpdated"
				keyword="yourKeyword"
			>
				<li >
				<a href="{!URLFOR($Action.KnowledgeArticle.View, article.id) + '&popup=true'}" target="_blank">
				{!article.title}</a>
				</li>
				<apex:variable var="isArticlesResult" value="true"/>
	</knowledge:articleList>                   
</apex:page>

 

 

Whereas if keyword is removed sorting starts working.

 

Problem # 2 is that when keyword is specified, it is unclear what sorting criteria is used (it's not one of the 3 documented)

API version used for testing: 21, 22

Anybody seen this one before?... I have a page with several panelBars on it, and it works fine... until I included jquery in the page.  No other javascript added, just adding this line stops the panelBar items from opening:

 

 

<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"/>

 

 

 

Also seems to break tabPanel...  (both tabPanel and panelBar had switchType="client")

 

Is this a known bug?  Any workarounds?

 

Thanks...

kenny

I have the following SOQL used in a VisualForce page:

 

"Select c.Product__r.PA_Product_Class__c productClass, sum(c.Rolling_12_Current__c) sales from PA_Customer_History__c c where c.Account__c = '{!account.Id}' group by c.Product__r.PA_Product_Class__c"

 

The field Rolling_12_Current__c is a currency field and the records I am querying are all in USD. Our corporate currency is EUR. My user is set up with a currency of USD. When the query is run, the sum() returns back a converted value in EUR instead of USD. According to the documentation at http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_querying_currency_fields.htm, this shouldn't happen: "Currency data is converted to the user's locale and then processed by the aggregate function."

 

My user's currency is in USD, so it should display it properly in USD. As a temporary work around, I've changed our exchange rate to 1. Can someone please let me know how I can get the SOQL aggregate to return the values in my user's currency? I tried using convertCurrency, but I get a malformed query error.

Is it possible to access Answers from Site? I am getting the following message when I send my users to access Answers from my site.

 

The community you are trying to access can't be displayed in a portal.

 

Thanks.

  • June 22, 2010
  • Like
  • 0
I have a managed package which has been published to the AppExchange.  I now want to remove a couple of items from the package and re-publish it.  But when I look at the package detail, most of the items in the package do not have a Remove link next to them.  How can I remove them?