• JK84
  • NEWBIE
  • 90 Points
  • Member since 2013

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

Please tell me the code  for  page refreshment after saving a record in visualforce page.

 

 

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}

I have a custom button in communities and on click of that this javascript method file get called..

 

And below code is not working.. it is giving undefined//

alert ("{!$User.CustomField__c}")

 

However, it is working fine for the standard field..For e.d below code is working fine .. I am able to see the Id but same thing is not working for the Custom field.

alert ("{!$User.Id}")

 

 

Thank you for the help in advance.

 

Regards,

Paddy

Hello,

Is there a way to report on who viewed our knowledge articles on our customer portal and how many times? I see reports which give Total views for articles, but don't see a way to relate it to our customer portal users or to accounts to understand the article usage.

If not through standard or custom reports, is there a way to find this information through any API's?

Thanks
JK
  • January 08, 2015
  • Like
  • 0
Hello,

We have a PHP-Salesforce integration in our Org and this uses Force.com PHP tool kit. I understand from the documentation that the tool kit uses SSL and as salesforce is disabling SSL3.0, just wanted to know the way out. Are we going to receive a new tool kit which is capable of using TLS protocol instead of SSL 3.0. Any suggestions on how to deal with our case? (PHP sends an inbound request to salesforce).

Thanks
JK
  • November 04, 2014
  • Like
  • 0

Hi,

 

We want to integrate ckEditor to one of our VF pages, but ckEditor doesn't provide browse file functinality and it has to be custom built or use plugins available.

 

All the plugins are written in PHP, and we have to provide the path of 2 PHP files in the config file of ckEditor. When tried open the ckEditor plugin running on PHP, browser simply downloads the source file rather than rendering it as HTML?

 

Any suggestions on what can be done !!

 

Thanks

JK

  • November 12, 2013
  • Like
  • 0

Hi,

 

We want to integrate ckEditor to one of our VF pages, but ckEditor doesn't provide browse file functinality and it has to be custom built or use plugins available.

 

All the plugins are written in PHP, and we have to provide the path of 2 PHP files in the config file of ckEditor. When tried open the ckEditor plugin running on PHP, browser simply downloads the source file rather than rendering it as HTML?

 

Any suggestions on what can be done !!

 

Thanks

JK

  • November 12, 2013
  • Like
  • 0

Hi,

 

I have a VF page with the following JS code :

 

<script type="text/javascript">

window.onbeforeunload = function jfunction()
 {
 
             call to a apex method
      
 };
       
 </script>

 

This works fine in Mozilla Firefox, but in IE, the apex method call is working only if I add a "return" statement in the "onbeforeunload" function and the return statement is causing an alert message to pop-up whenever the user is trying to navigate to another page, which is irritating to them.

 

Is there a way to supress the alert message in IE ?

 

Thanks !

  • October 09, 2013
  • Like
  • 0

Hi,

 

Is there a way we can have a script executed or a method called in Apex when a Salesforce user closes the browser ? I tried calling the event "window.onbeforeunload" in Javascript, but this event is not supported by all browsers.

 

I want to capture the logout time of my SF users, but some of them directly close the browser instead of logging out, so is there a way I can have an apex called when the browser is closed and have the apex update a record in the backend ?

 

Thanks !!

  • October 01, 2013
  • Like
  • 0

Hi,

 

I have a custom setting in which I have about 4 field's api names.

 

Now, based on some logic, I would have to update one of the fields with a value, so I would know the field name only in run time, so how do I write the code for it in Apex ?

 

Sample code

----------------

 

List<AuditObjects__c> lstObj = [select ObjectName__c,ObjectPrefix__c from AuditObjects__c where ObjectPrefix__c=:keyPrefix LIMIT 1];

 

String lookupRelationship = lstObj[0].ObjectName__c;


 auditRecord.lookupRelationship = recordId;  // This is where I want to dynamically bind the field name.

 

update auditRecord;

  • September 30, 2013
  • Like
  • 0

Hi,

 

I have a site which displays a welcome page first, with 2 buttons to either sign up as a new user and search for existing user details.

 

When search button is clicked, the user is asked to enter few details which are validated and only if he is allowed to search the search options page is displayed.

 

Now,  how do I restrict the user from directly accessing the search options page? If someone knows the URL of the search options page, there could be chance of accessing the page directly without going through the normal flow.

 

Do I have to use the referrer URL or is there any way built in force.com sites which restricts users from directly acessing the pages in a random order.

  • September 26, 2013
  • Like
  • 0

Hi,

 

I've written a simple home page component and the component is calling a VF page, which inturn calls an apex controller.

 

The issue is that the code in the home page component is getting executed twice when opened in Chrome 28.0, while its working perfectly in Mozilla firefox and IE.

 

The homepage component has an iFrame which calls a VF page and the VF page calls a custom controller.

 

Any idea if this is a known issue ? I couldn't find it in the list of known issues, so was wondering where I was going wrong..... (I've taken off all the code and retained just a system.debug statement in the apex controller and even now the code is getting executed twice)

 

Home page component code

 

<iframe id="myIframe" src="/apex/NewAuditor" frameborder="0" height="0" width="0"> </iframe>

 

VF Page

 

<apex:page controller="NewAuditController" action="{!updateData}">
 
</apex:page>

 

Apex controller

 

This just has the action method with a single system.debug statement.

  • August 19, 2013
  • Like
  • 0

Hi,

 

I'm trying to get the title of the page in a VF page using Javascript (code is as follows) :

 

But, the alert is only displaying "Salesforce.com - Developer Edition", although I can see that the title in the "view Source" of the page is "<title>Candidates: Home ~ salesforce.com - Developer Edition</title>"

 

Any suggestions on where am I going wrong ?

 

<script type="text/javascript">

window.onload =  function jfunction()
 {
        
       var pageTitle =  document.getElementsByTagName("title")[0].innerHTML;
       alert('page Title '+document.title);

}

</script>

 

  • August 13, 2013
  • Like
  • 0
Hello,

We have a PHP-Salesforce integration in our Org and this uses Force.com PHP tool kit. I understand from the documentation that the tool kit uses SSL and as salesforce is disabling SSL3.0, just wanted to know the way out. Are we going to receive a new tool kit which is capable of using TLS protocol instead of SSL 3.0. Any suggestions on how to deal with our case? (PHP sends an inbound request to salesforce).

Thanks
JK
  • November 04, 2014
  • Like
  • 0

Please tell me the code  for  page refreshment after saving a record in visualforce page.

 

 

I have a custom button added to case detail layout. i have also created Last_RequestUpdate__c(is a date/time field)  on case object.

My question: when the user clicks on the custom button, date/time field should capture the last time the Custom button was clicked.

My try: i have a javascript writtin on custom button/link .

{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/22.0/apex.js")}

var caseId = '{!Case.Id}';
var resultSet = sforce.connection.query("SELECT Last_RequestUpdate__c FROM Case WHERE Id = '" + caseId + "'");
var caseObj = resultSet.records;
caseObj.Last_RequestUpdate__c = "{!NOW()}";

alert(caseObj.Last_Update_Requested__c);
var result = sforce.connection.update([caseObj]);

 

 My Problem is: alert(caseObj.Last_Update_Requested__c); shows me datetime "10/18/2013 4:09 AM"

           then i am getting this error: {faultcode:'soapenv:Client', faultstring:''10/18/2013 4:09 AM' is not a valid value for the type xsd:dateTime', }

Could you please help me how to store the value in  Last_RequestUpdate__c field?

 

 

  • October 18, 2013
  • Like
  • 0

Hi, I want to create a CUSTOM clone button which will clone the record in edit mode and user want can change some value and save the record.pease help me.

  • October 18, 2013
  • Like
  • 0

I want auto increment number in account field. format is first four letter from account name next two digits from number. i got it but the problem i have 1000 of accounts i want the number increament upto 99 and again i want to regenerate from 1. but it goes 100, 101, 102...... 

 

       example:  UPPER(LEFT(Name, 4))+AutoId__c

 

AutoId__c  i gave display format like this   {00}. i want regenerate from 1 after it reached 99.

 

 

 

  • October 18, 2013
  • Like
  • 0

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}

I have a custom button in communities and on click of that this javascript method file get called..

 

And below code is not working.. it is giving undefined//

alert ("{!$User.CustomField__c}")

 

However, it is working fine for the standard field..For e.d below code is working fine .. I am able to see the Id but same thing is not working for the Custom field.

alert ("{!$User.Id}")

 

 

Thank you for the help in advance.

 

Regards,

Paddy

Hi all,

 

I am receiving the following error when trying to load a rather complex Visualforce page: 

"Maximum view state size limit (135KB) exceeded."

 

I've done some research on the various causes that can be behind this issue and verily, my page is guilty of most of them, however what's throwing me for a loop is this - I only exceed my view state size on my full sandbox. For the exact same page (both Visualforce page and it's respective Controller), and the exact same inputs, my view state on Sandbox is roughly 2.5x as large. On Production, I'll average a view state of 50kb - 60kb, while on sandbox with all but the most trivial of inputs I'll be anywhere from 130kb - 190kb. This is a huge impediment for 2 reasons:

 

1) It's really hard to develop on my sandbox when I can't view the outputs

 

2) This is a mission critical vf page. If this issue starts appearing on prod it's going to be bad news bears

 

So, my question is, what can influence the size of View State beyond the vf page and controller (which in my case are identical in both environments)? 

 

Cheers,

Kevin

 

  • October 17, 2013
  • Like
  • 0

Hi gurus,

 

I have a visualforce page that uses standard list controller for mass updating.  I modelled it after the example from here: http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_sosc_list_views.htm

 

The problem is any time the validation rule is set off it shows a general message at the top of the page but the user has no idea which record the error is applying to.  Is there a way to indicate, which record on the page set off the validation rule?

 

http://img36.imageshack.us/img36/4855/nfy7.jpg

 

Thank you guys for your time.

Hi,

 

I have a VF page with the following JS code :

 

<script type="text/javascript">

window.onbeforeunload = function jfunction()
 {
 
             call to a apex method
      
 };
       
 </script>

 

This works fine in Mozilla Firefox, but in IE, the apex method call is working only if I add a "return" statement in the "onbeforeunload" function and the return statement is causing an alert message to pop-up whenever the user is trying to navigate to another page, which is irritating to them.

 

Is there a way to supress the alert message in IE ?

 

Thanks !

  • October 09, 2013
  • Like
  • 0

HI,

    I am having invoices object in that a  field called Balance due when i enter amount in that field and click on save ,  at that time the record   have to move from invoices object to amount object how can i achieve this.

How do i track the origin source of Site URL from where it was originated.For e.g a job portal lists our jobs.So if user is coming from that job portal to our website, is there any way from which i can track origin of request? 

How to change the Font-size in <apex:iframe>   ??

Hi,

 

Is there a way we can have a script executed or a method called in Apex when a Salesforce user closes the browser ? I tried calling the event "window.onbeforeunload" in Javascript, but this event is not supported by all browsers.

 

I want to capture the logout time of my SF users, but some of them directly close the browser instead of logging out, so is there a way I can have an apex called when the browser is closed and have the apex update a record in the backend ?

 

Thanks !!

  • October 01, 2013
  • Like
  • 0

Hi All,

 

Ours is a managed package. We have installed the app in customer org. But the system admin is able to view the VF page code.

 

Is there any possible way how we can restrict this?

 

Regards,

Kiran