• Altran
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 9
    Replies

 

Hi,

 

How to parse in javascript an apex  List<List<String>> returned by a webservice method?

 

Thanks,

Altran

  • November 28, 2012
  • Like
  • 0

Hi,

 

Why document.getElementById('{!$Component.ZoomName}') is always returning null?

 

We have an apex page where an outputText (id="ZoomName") is defined. In javascript we want to change the value of ZoomName, but {!$Component.ZoomName} is always returning null.

 

 

<apex:outputText value="30 dias" id="ZoomName" styleClass="chronoline-zoom-text"/ >

....

 

 <script type="application/javascript">

.....

    function loadZooms(){
       
        var zoomRecord = new Object();
        var zoomArray = new Array();
       
        zoomRecord.Id = 0;
        zoomRecord.Name= "60 dias";
        zoomRecord.visibleSpan= 5184000000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        zoomRecord = new Object();
        zoomRecord.Id = 1;
        zoomRecord.Name= "30 dias";
        zoomRecord.visibleSpan= 2592000000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        zoomRecord = new Object();
        zoomRecord.Id = 2;
        zoomRecord.Name= "15 dias";
        zoomRecord.visibleSpan= 1296000000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        zoomRecord = new Object();
        zoomRecord.Id = 3;
        zoomRecord.Name= "7 dias";
        zoomRecord.visibleSpan= 604800000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        zoomRecord = new Object();
        zoomRecord.Id = 4;
        zoomRecord.Name= "1 dia";
        zoomRecord.visibleSpan= 86400000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        if (document.getElementById('{!$Component.ZoomName}') != null) {
            document.getElementById('{!$Component.ZoomName}').value = zoomArray[defaultZoom].Name;
        }
       
       
        return zoomArray;      
   
    }

..........

 

    zooms = loadZooms();
    buildChronoline();

  </script>

 

Many Thanks,

Altran

  • November 26, 2012
  • Like
  • 0

Hi,

 

We are getting the error below in a visualforce page because we have exceeded the API limit.

How can we use/visualize the page again? Should we contact salesforce support?

 

 

Uncaught {faultcode:’sf:REQUEST_LIMIT_EXCEEDED’, faultstring:’REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.’, detail:{UnexpectedErrorFault:{exceptionCode:’REQUEST_LIMIT_EXCEEDED’, exceptionMessage:’TotalRequests Limit exceeded.’, }, }, }

 

 

Many Thanks,

Altran

 

 

 

  • November 20, 2012
  • Like
  • 0

Hi,

 

Is it possible to call a Javascript/JQuery function in the "action" attribute of apex:actionSupport?

What we need is to call Javascript/JQuery function when the value of a field is changed, that means an event occurs. How can we do this?

Can someone help? This is an urgent issue for us.

 

Many Thanks,

Altran

  • November 06, 2012
  • Like
  • 0

Hi,

 

We are using JQuery 1.9.1 in a VisualForce page importing it with the following tags:

 

<apex:includeScript value="{$Resource.JQuery_ui_1_9_1_custom_min}"/>
<apex:includeScript value="{$Resource.JQuery_ui_1_9_1_custom}"/>
<apex:includeScript value="{$Resource.JQuery_1_8_2}"/>

<script type="text/javascript" >

....

 

 

In Google's Chrome Developer´s Console we get the warning "Resource interpreted as Script but transferred with MIME type text/html:" and the error "Uncaught SyntaxError: Unexpected token <"

 

The Force.com Static Resources have MIME type application/javascript, why are they being transferred with MIME type text/html?

The javascript stops due to this error and the page is not working the way we want.

 

Can someone please help us with this issue. We have found some similar posts on the net but can´t find any solution.

 

Many Thanks,

Altran 

 

 

 

 

 

  • November 02, 2012
  • Like
  • 1

Hi,

 

We are using the function ApexPages.currentPage().getParameters().get('_CONFIRMATIONTOKEN') in a Apex class controller with no success because it is returning null value?

 

Can someone please help us why the function is returning null? It's for us an urgent issue to solve.

 

Many Thanks,

Altran

  • October 31, 2012
  • Like
  • 0

Hi,

 

We have an urgent issue to solve.

We have created an VF page in which the email template is displayed in drop down .User can select one of the email template and when they select any template a link " template Preview " appears.

After clicking this link a new VF page must be open with the preview of the template only. We do not want the standard Email template preview but an URL that shows only the template.

Is this possible? What URL should we use?

 

Many thanks,

Ana

  • October 29, 2012
  • Like
  • 0

Hi,

 

How can I get user info (username, first and last name) in a javascript detail button?

 

 

Thanks,

Ana

  • October 18, 2012
  • Like
  • 0

Hi,

 

 

We've created an email template which references fields of a custom object named Intervention.

Intervention object has a  detail button that must send  email using that template. We are receiving the error "Invalid whatId" when we try to send email.

In javascript implemented in the button we have assigned the field Name (standard ID field ) of Intervention to property whatId of SingleEmailMessage.  

 

Can someone help us what is the problem with whatId?

 

A excerpt of our code below:

 

.....

var req = new sforce.SingleEmailMessage();
req.orgWideEmailAddressId = [orgWideEmailAddresstId ];
req.ccAddresses =[ ccSupervisao, ccSuporte ];
                       
//Sender will receive a copy of the mass e-mail sent
req.bccSender=true;
                                                                                
req.emailPriority='High';
req.replyTo=targetAddress;

req.targetObjectId=targetObjectId;
req.saveAsActivity=false;
var name = {!Intervention__c.Name};
req.whatId = name;

 

// Query template ID
var templateName = "{!Intervention__c.Modelo_de_Email__c}";
var queryEmailTemplate = sforce.connection.query("select Id from EmailTemplate where name ='" + templateName + "'");
var templateId = queryEmailTemplate.getArray("records")[0].Id;

req.templateId=templateId;

.....

 

Many thanks,

Ana

  • October 17, 2012
  • Like
  • 0

Hi,

 

We need to populate a picklist dynamically  in a custom object. When button New is clicked we want the picklist to be populated using SOQL.

 

Is this possible? How?

 

Many Thanks,

Ana

  • October 03, 2012
  • Like
  • 0

Hi,

 

How can we make a custom field be visible but not editable depending on the value of another field in same page?

 

 

Many thanks,

Ana

  • September 26, 2012
  • Like
  • 0

Hi,

 

It is possible to associate triggers or automatism that are executed when the value of the editable field is changed? In other words, what we want is a trigger to be fired when the focus leaves the field.
 
Many thanks,
Ana


  • September 26, 2012
  • Like
  • 0

Hi,

 

We are using JQuery 1.9.1 in a VisualForce page importing it with the following tags:

 

<apex:includeScript value="{$Resource.JQuery_ui_1_9_1_custom_min}"/>
<apex:includeScript value="{$Resource.JQuery_ui_1_9_1_custom}"/>
<apex:includeScript value="{$Resource.JQuery_1_8_2}"/>

<script type="text/javascript" >

....

 

 

In Google's Chrome Developer´s Console we get the warning "Resource interpreted as Script but transferred with MIME type text/html:" and the error "Uncaught SyntaxError: Unexpected token <"

 

The Force.com Static Resources have MIME type application/javascript, why are they being transferred with MIME type text/html?

The javascript stops due to this error and the page is not working the way we want.

 

Can someone please help us with this issue. We have found some similar posts on the net but can´t find any solution.

 

Many Thanks,

Altran 

 

 

 

 

 

  • November 02, 2012
  • Like
  • 1

Hi,

 

Why document.getElementById('{!$Component.ZoomName}') is always returning null?

 

We have an apex page where an outputText (id="ZoomName") is defined. In javascript we want to change the value of ZoomName, but {!$Component.ZoomName} is always returning null.

 

 

<apex:outputText value="30 dias" id="ZoomName" styleClass="chronoline-zoom-text"/ >

....

 

 <script type="application/javascript">

.....

    function loadZooms(){
       
        var zoomRecord = new Object();
        var zoomArray = new Array();
       
        zoomRecord.Id = 0;
        zoomRecord.Name= "60 dias";
        zoomRecord.visibleSpan= 5184000000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        zoomRecord = new Object();
        zoomRecord.Id = 1;
        zoomRecord.Name= "30 dias";
        zoomRecord.visibleSpan= 2592000000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        zoomRecord = new Object();
        zoomRecord.Id = 2;
        zoomRecord.Name= "15 dias";
        zoomRecord.visibleSpan= 1296000000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        zoomRecord = new Object();
        zoomRecord.Id = 3;
        zoomRecord.Name= "7 dias";
        zoomRecord.visibleSpan= 604800000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        zoomRecord = new Object();
        zoomRecord.Id = 4;
        zoomRecord.Name= "1 dia";
        zoomRecord.visibleSpan= 86400000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        if (document.getElementById('{!$Component.ZoomName}') != null) {
            document.getElementById('{!$Component.ZoomName}').value = zoomArray[defaultZoom].Name;
        }
       
       
        return zoomArray;      
   
    }

..........

 

    zooms = loadZooms();
    buildChronoline();

  </script>

 

Many Thanks,

Altran

  • November 26, 2012
  • Like
  • 0

Hi,

 

We are getting the error below in a visualforce page because we have exceeded the API limit.

How can we use/visualize the page again? Should we contact salesforce support?

 

 

Uncaught {faultcode:’sf:REQUEST_LIMIT_EXCEEDED’, faultstring:’REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.’, detail:{UnexpectedErrorFault:{exceptionCode:’REQUEST_LIMIT_EXCEEDED’, exceptionMessage:’TotalRequests Limit exceeded.’, }, }, }

 

 

Many Thanks,

Altran

 

 

 

  • November 20, 2012
  • Like
  • 0

Hi,

 

We are using the function ApexPages.currentPage().getParameters().get('_CONFIRMATIONTOKEN') in a Apex class controller with no success because it is returning null value?

 

Can someone please help us why the function is returning null? It's for us an urgent issue to solve.

 

Many Thanks,

Altran

  • October 31, 2012
  • Like
  • 0

Hi,

 

It is possible to associate triggers or automatism that are executed when the value of the editable field is changed? In other words, what we want is a trigger to be fired when the focus leaves the field.
 
Many thanks,
Ana


  • September 26, 2012
  • Like
  • 0

Anytime you try to delete a record in salesforce there is a _CONFIRMATIONTOKEN parameter, I was thinking this was the $Api.Session_Id global variable, but its completely different.

 

 

Is there any way of generating this? Thanks