• Salvatore Paracuollo
  • NEWBIE
  • 30 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 3
    Likes Given
  • 5
    Questions
  • 6
    Replies
Hello, I have a doubt on this question:

which code block returns the listview of an Account object using the following debug statement?
system.debug(controller.getListViewOptions());
 
A. ApexPages.StandardSetController controller = new Apexpages.StandardSetController([SELECT id FROM Account LIMIT 1]);
B. ApexPages.StandardController controller = new ApexPages.StandardController(Database.getQueryLocator('select id from account limit 1')).
C. ApexPages.StandardController controller = new ApexPages.StandardController([SELECT id FROM Account LIMIT 1]);
D. ApexPages.StandardSetController controller = new ApexPages.StandardSetController(database.getQueryLocator('select id from Account Limit 1'))


The correct answer seems to be D, but I didn0t understand why D and not A (trying by dev console, both worked): can anyone help me, please?
Hi all,
I'm trying to rerender a visualforce dynamic component in my visualforce page on the onclick button event: I tried with a remote action on a button tag element (I'd like to avoid the form element on Vf page for view state problems) and it didn't work; so I tried with an apex button element, too, but no luck: can anyone help me? thanks

This is the code:

- Controller:
public class provaController{
    public boolean var{get; set;}    
    public integer count;
    
    public provaController(){
        var = false;
        count = 0;
    }
    
    public void add(){
        var = true;
    }
    
    public Component.Apex.OutputText getThePanel() { 
        system.debug('****panel');
        count++;       
        String stringaFinale = '<p>first call</p>';                 
        if(count>1) stringaFinale = stringaFinale +  '<p>second call</p>';
        
        Component.Apex.OutputText outTextGlobal = new Component.Apex.OutputText();
        outTextGlobal.value = stringaFinale;
        outTextGlobal.escape = false;

        stringaFinale = null;
        return outTextGlobal;
    }
         
    @RemoteAction
    global static void click() {
        system.debug('****remote');
    }
}

- Vf page:
<apex:page controller="provaController" id="idController" >   
    <div  id="provaDiv" >
        <apex:dynamicComponent componentValue="{!thePanel}" invokeAfterAction="true"/>   
    </div>
    
    <apex:form >
        <apex:commandButton action="{!add}" value="button" id="theButton" reRender="idController,provaDiv"/>
    </apex:form>  
</apex:page>
Hi all,
I'm trying to load a set of knolewdge article from sandbox to production environment (using the import articles), but I have a problem with the special characters: I found the articles uploaded correctly, but in the description field (reach text) I found special characters corroded.
I also tried to use different encoding parameters (UTF8,ISO8859_15_FDIS) in the import.properties file, but no luck!

Can anyone help me please? 
Hi all,
I'm trying to rerender a field set based on the selected picklist value, so I thougth to use a script, but I have the following problem: I tried to use a class to refer every field in the set, but the lable don't diappear: so I have to refer each element in order to delete the field label, but I'd like to use the class so I can use just one instruction (tried with ). I show you the code: can anyone helpe me?
  • Vf page:


    <apex:selectList label="Seleziona tipologia" id="tiporecord" value="{!type}" multiselect="false" size="1" required="true" onchange="mostraCampoAggiuntivo(this.options[this.selectedIndex].value)" >
        <apex:selectOption itemValue="" itemLabel="- Seleziona un valore -"/>
        <apex:selectOption itemValue="Domanda" itemLabel="Domanda"/>
        <apex:selectOption itemValue="Risposta" itemLabel="Risposta"/>
        <apex:selectOption itemValue="Avviso" itemLabel="Avviso"/>
        <apex:selectOption itemValue="Soluzione" itemLabel="Soluzione"/>
        <apex:selectOption itemValue="Conclusione" itemLabel="Conclusione"/>
        <apex:actionSupport event="onchange" action = "{!returnType}" reRender="topPanel"/>
    </apex:selectList>               
    <apex:outputText value="Pending" label="Stato" />
    <apex:inputField value="{!Troubleshooting__c.Testo__c}"  style="width: 100%" required="true"/>
    <apex:outputField value="{!parentTS.Testo__c}" label="Nodo padre"/>
    <apex:inputField value="{!Troubleshooting__c.Testo_Aggiuntivo__c}" label="Testo Aggiuntivo" id="TestoAggiuntivo" style="display: none"/><br/>  

    
    
    <apex:inputField value="{!Troubleshooting__c.Azione__c}" label="Azione" id="Azione" style="display: none" styleClass="flag"/>
    <apex:inputField value="{!Troubleshooting__c.Tracciamento__c}" label="Tracciamento" id="Tracciamento" style="display: none" styleClass="flag" />
    <apex:inputField value="{!Troubleshooting__c.FlagEsigenza__c}" label="Flag esigenza" label="FlagEsigenza" style="display: none" styleClass="flag" /><br/><br/>                      
    <apex:inputCheckbox value="{!Troubleshooting__c.Richiesta_Login__c}" label="Richiesta Login" label="RichiestaLogin" style="display: none" styleClass="flag"/>
    <apex:inputCheckbox value="{!Troubleshooting__c.Autorizzazione_Swap_Materiale__c}" label="Autorizzazione Swap Materiale" label="AutorizzazioneSwapMateriale" style="display: none" styleClass="flag" /> 
    <apex:inputCheckbox rendered="false" /> 
    <apex:inputCheckbox value="{!Troubleshooting__c.DigitalKey__c}" label="DigitalKey"  id="DigitalKey" style="display: none" styleClass="flag" />
    <apex:inputCheckbox value="{!Troubleshooting__c.Aggiornamento_Servizi_DTT__c}" label="Aggiornamento Servizi DTT" label="AggiornamentoServiziDTT" style="display: none" styleClass="flag" />
    <apex:inputCheckbox value="{!Troubleshooting__c.Decoder__c}" label="Decoder" id="Decoder" style="display: none" styleClass="flag" /> 
    <apex:inputCheckbox value="{!Troubleshooting__c.Reset_PIN__c}" label="Reset PIN" id="ResetPIN " style="display: none" styleClass="flag" />
    <apex:inputCheckbox value="{!Troubleshooting__c.SmartCard__c}" label="SmartCard" id="SmartCard" style="display: none" styleClass="flag" />
    <apex:inputCheckbox value="{!Troubleshooting__c.Reset_SMC__c}" label="Reset SMC" label="ResetSMC " style="display: none" styleClass="flag" />                
    <apex:inputCheckbox value="{!Troubleshooting__c.Telecomando__c}" label="Telecomando" label="Telecomando" style="display: none" styleClass="flag" /> 

                         
 
  • Script:
 
    if(selected=='Conclusione'){
        console.log('*********selected: '+selected);
        $("[class$=flag]").css('display', 'block');
        $("[for$='Reset']").css('display','block');
        $("[for$='ResetPIN']").css('display','block');
        $("[for$='DigitalKey']").css('display','block');
        $("[for$='Telecomando']").css('display','block');
        $("[for$='SmartCard']").css('display','block');
        $("[for$='Decoder']").css('display','block');
        $("[for$='AutorizzazioneSwapMateriale']").css('display','block');
        $("[for$='AggiornamentoServiziDTT']").css('display','block');
        $("[for$='RichiestaLogin']").css('display','block');
        $("[for$='FlagEsigenza']").css('display','block');
        $("[for$='Tracciamento']").css('display','block');
        $("[for$='Azione']").css('display','block');             
    }
Hi,
I am newbie on sfdc: I'm trying to show an icon image when my Vf page is loading: I think I can do it using an action status, but I just founded examples with apex button,how can apply this example to my case? can anyone help me?

thanks : )
Hi all,
I'm trying to rerender a field set based on the selected picklist value, so I thougth to use a script, but I have the following problem: I tried to use a class to refer every field in the set, but the lable don't diappear: so I have to refer each element in order to delete the field label, but I'd like to use the class so I can use just one instruction (tried with ). I show you the code: can anyone helpe me?
  • Vf page:


    <apex:selectList label="Seleziona tipologia" id="tiporecord" value="{!type}" multiselect="false" size="1" required="true" onchange="mostraCampoAggiuntivo(this.options[this.selectedIndex].value)" >
        <apex:selectOption itemValue="" itemLabel="- Seleziona un valore -"/>
        <apex:selectOption itemValue="Domanda" itemLabel="Domanda"/>
        <apex:selectOption itemValue="Risposta" itemLabel="Risposta"/>
        <apex:selectOption itemValue="Avviso" itemLabel="Avviso"/>
        <apex:selectOption itemValue="Soluzione" itemLabel="Soluzione"/>
        <apex:selectOption itemValue="Conclusione" itemLabel="Conclusione"/>
        <apex:actionSupport event="onchange" action = "{!returnType}" reRender="topPanel"/>
    </apex:selectList>               
    <apex:outputText value="Pending" label="Stato" />
    <apex:inputField value="{!Troubleshooting__c.Testo__c}"  style="width: 100%" required="true"/>
    <apex:outputField value="{!parentTS.Testo__c}" label="Nodo padre"/>
    <apex:inputField value="{!Troubleshooting__c.Testo_Aggiuntivo__c}" label="Testo Aggiuntivo" id="TestoAggiuntivo" style="display: none"/><br/>  

    
    
    <apex:inputField value="{!Troubleshooting__c.Azione__c}" label="Azione" id="Azione" style="display: none" styleClass="flag"/>
    <apex:inputField value="{!Troubleshooting__c.Tracciamento__c}" label="Tracciamento" id="Tracciamento" style="display: none" styleClass="flag" />
    <apex:inputField value="{!Troubleshooting__c.FlagEsigenza__c}" label="Flag esigenza" label="FlagEsigenza" style="display: none" styleClass="flag" /><br/><br/>                      
    <apex:inputCheckbox value="{!Troubleshooting__c.Richiesta_Login__c}" label="Richiesta Login" label="RichiestaLogin" style="display: none" styleClass="flag"/>
    <apex:inputCheckbox value="{!Troubleshooting__c.Autorizzazione_Swap_Materiale__c}" label="Autorizzazione Swap Materiale" label="AutorizzazioneSwapMateriale" style="display: none" styleClass="flag" /> 
    <apex:inputCheckbox rendered="false" /> 
    <apex:inputCheckbox value="{!Troubleshooting__c.DigitalKey__c}" label="DigitalKey"  id="DigitalKey" style="display: none" styleClass="flag" />
    <apex:inputCheckbox value="{!Troubleshooting__c.Aggiornamento_Servizi_DTT__c}" label="Aggiornamento Servizi DTT" label="AggiornamentoServiziDTT" style="display: none" styleClass="flag" />
    <apex:inputCheckbox value="{!Troubleshooting__c.Decoder__c}" label="Decoder" id="Decoder" style="display: none" styleClass="flag" /> 
    <apex:inputCheckbox value="{!Troubleshooting__c.Reset_PIN__c}" label="Reset PIN" id="ResetPIN " style="display: none" styleClass="flag" />
    <apex:inputCheckbox value="{!Troubleshooting__c.SmartCard__c}" label="SmartCard" id="SmartCard" style="display: none" styleClass="flag" />
    <apex:inputCheckbox value="{!Troubleshooting__c.Reset_SMC__c}" label="Reset SMC" label="ResetSMC " style="display: none" styleClass="flag" />                
    <apex:inputCheckbox value="{!Troubleshooting__c.Telecomando__c}" label="Telecomando" label="Telecomando" style="display: none" styleClass="flag" /> 

                         
 
  • Script:
 
    if(selected=='Conclusione'){
        console.log('*********selected: '+selected);
        $("[class$=flag]").css('display', 'block');
        $("[for$='Reset']").css('display','block');
        $("[for$='ResetPIN']").css('display','block');
        $("[for$='DigitalKey']").css('display','block');
        $("[for$='Telecomando']").css('display','block');
        $("[for$='SmartCard']").css('display','block');
        $("[for$='Decoder']").css('display','block');
        $("[for$='AutorizzazioneSwapMateriale']").css('display','block');
        $("[for$='AggiornamentoServiziDTT']").css('display','block');
        $("[for$='RichiestaLogin']").css('display','block');
        $("[for$='FlagEsigenza']").css('display','block');
        $("[for$='Tracciamento']").css('display','block');
        $("[for$='Azione']").css('display','block');             
    }
Hi all,
I'm trying to load a set of knolewdge article from sandbox to production environment (using the import articles), but I have a problem with the special characters: I found the articles uploaded correctly, but in the description field (reach text) I found special characters corroded.
I also tried to use different encoding parameters (UTF8,ISO8859_15_FDIS) in the import.properties file, but no luck!

Can anyone help me please? 
Hi all,
I'm trying to rerender a field set based on the selected picklist value, so I thougth to use a script, but I have the following problem: I tried to use a class to refer every field in the set, but the lable don't diappear: so I have to refer each element in order to delete the field label, but I'd like to use the class so I can use just one instruction (tried with ). I show you the code: can anyone helpe me?
  • Vf page:


    <apex:selectList label="Seleziona tipologia" id="tiporecord" value="{!type}" multiselect="false" size="1" required="true" onchange="mostraCampoAggiuntivo(this.options[this.selectedIndex].value)" >
        <apex:selectOption itemValue="" itemLabel="- Seleziona un valore -"/>
        <apex:selectOption itemValue="Domanda" itemLabel="Domanda"/>
        <apex:selectOption itemValue="Risposta" itemLabel="Risposta"/>
        <apex:selectOption itemValue="Avviso" itemLabel="Avviso"/>
        <apex:selectOption itemValue="Soluzione" itemLabel="Soluzione"/>
        <apex:selectOption itemValue="Conclusione" itemLabel="Conclusione"/>
        <apex:actionSupport event="onchange" action = "{!returnType}" reRender="topPanel"/>
    </apex:selectList>               
    <apex:outputText value="Pending" label="Stato" />
    <apex:inputField value="{!Troubleshooting__c.Testo__c}"  style="width: 100%" required="true"/>
    <apex:outputField value="{!parentTS.Testo__c}" label="Nodo padre"/>
    <apex:inputField value="{!Troubleshooting__c.Testo_Aggiuntivo__c}" label="Testo Aggiuntivo" id="TestoAggiuntivo" style="display: none"/><br/>  

    
    
    <apex:inputField value="{!Troubleshooting__c.Azione__c}" label="Azione" id="Azione" style="display: none" styleClass="flag"/>
    <apex:inputField value="{!Troubleshooting__c.Tracciamento__c}" label="Tracciamento" id="Tracciamento" style="display: none" styleClass="flag" />
    <apex:inputField value="{!Troubleshooting__c.FlagEsigenza__c}" label="Flag esigenza" label="FlagEsigenza" style="display: none" styleClass="flag" /><br/><br/>                      
    <apex:inputCheckbox value="{!Troubleshooting__c.Richiesta_Login__c}" label="Richiesta Login" label="RichiestaLogin" style="display: none" styleClass="flag"/>
    <apex:inputCheckbox value="{!Troubleshooting__c.Autorizzazione_Swap_Materiale__c}" label="Autorizzazione Swap Materiale" label="AutorizzazioneSwapMateriale" style="display: none" styleClass="flag" /> 
    <apex:inputCheckbox rendered="false" /> 
    <apex:inputCheckbox value="{!Troubleshooting__c.DigitalKey__c}" label="DigitalKey"  id="DigitalKey" style="display: none" styleClass="flag" />
    <apex:inputCheckbox value="{!Troubleshooting__c.Aggiornamento_Servizi_DTT__c}" label="Aggiornamento Servizi DTT" label="AggiornamentoServiziDTT" style="display: none" styleClass="flag" />
    <apex:inputCheckbox value="{!Troubleshooting__c.Decoder__c}" label="Decoder" id="Decoder" style="display: none" styleClass="flag" /> 
    <apex:inputCheckbox value="{!Troubleshooting__c.Reset_PIN__c}" label="Reset PIN" id="ResetPIN " style="display: none" styleClass="flag" />
    <apex:inputCheckbox value="{!Troubleshooting__c.SmartCard__c}" label="SmartCard" id="SmartCard" style="display: none" styleClass="flag" />
    <apex:inputCheckbox value="{!Troubleshooting__c.Reset_SMC__c}" label="Reset SMC" label="ResetSMC " style="display: none" styleClass="flag" />                
    <apex:inputCheckbox value="{!Troubleshooting__c.Telecomando__c}" label="Telecomando" label="Telecomando" style="display: none" styleClass="flag" /> 

                         
 
  • Script:
 
    if(selected=='Conclusione'){
        console.log('*********selected: '+selected);
        $("[class$=flag]").css('display', 'block');
        $("[for$='Reset']").css('display','block');
        $("[for$='ResetPIN']").css('display','block');
        $("[for$='DigitalKey']").css('display','block');
        $("[for$='Telecomando']").css('display','block');
        $("[for$='SmartCard']").css('display','block');
        $("[for$='Decoder']").css('display','block');
        $("[for$='AutorizzazioneSwapMateriale']").css('display','block');
        $("[for$='AggiornamentoServiziDTT']").css('display','block');
        $("[for$='RichiestaLogin']").css('display','block');
        $("[for$='FlagEsigenza']").css('display','block');
        $("[for$='Tracciamento']").css('display','block');
        $("[for$='Azione']").css('display','block');             
    }
Hi,
I am newbie on sfdc: I'm trying to show an icon image when my Vf page is loading: I think I can do it using an action status, but I just founded examples with apex button,how can apply this example to my case? can anyone help me?

thanks : )
Hi,
It is not a question, I share my experience because I spent hours on this...
on my visualforce page, chrome kept telling me (in the Javascript console):
XMLHttpRequest cannot load https://eu3.salesforce.com/_ui/common/request/servlet/JsLoggingServlet.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'https://c.eu3.visual.force.com' is therefore not allowed access.
Browsing the net, I didn't find info on this error.
At the end, It appears this was due to a call to the "alert" javascript box just before the call to an "<apex:actionFunction". See below,
Javascript is:
function jsRemoveLineItemCatBtn() {
alert( 'CURRENT ID ' + vLICInProgressNum );
afRemoveLineItemCatBtn( String(vLICInProgressNum) );
}
where afRemoveLineItemCatBtn is the name of my action function.
Since I commented the call to alert, I don't have the error message anymore...
Hope to help few to save time.
 
I have created a VF Page to set the Finish Location for my Flow.  However, when I attempt to use the button, I am receiving an error - URL No Longer Exists.  Any ideas?

<apex:page id="theTransferPage" standardcontroller="SCMC__Sales_Order__c">
    <apex:variable var="theReplacementTransfer" value="{!SCMC__Sales_Order__c.Id}"></apex:variable>
    <div style="float: left; width: 600px; padding: 10px;">
            <flow:interview name="ReplacementTransferRequest" finishLocation="{!URLFOR('/'+theReplacementTransfer)}" >
                    <apex:param name="varSalesOrderID" value="{!SCMC__Sales_Order__c.Id}"/>
                    <apex:param name="varOwnershipID" value="{!SCMC__Sales_Order__c.SCMC__Ownership__c}"/>
                    <apex:param name="varComments" value="{!SCMC__Sales_Order__c.SCMC__Sales_Representative_Instructions__c}"/>
            </flow:interview>
        </div>
</apex:page>
Hi,

I'm trying to delete a knowledge article version record using apex, in details what I try to do is:
        string t = (string that holds the Id of the article)
        KnowledgeArticleVersion articleToRemove = [SELECT Id FROM KnowledgeArticleVersion WHERE Id = :t];
        delete articleToRemove ;


When I try to save the class I recieve the following error message:
DML operation DELETE not allowed on KnowledgeArticleVersion

Same error messagge if I use the article type insted of KnowledgeArticleVersion (FAQ__kav articleToRemove = [SELECT Id FROM FAQ__kav WHERE Id = :t])
Any suggestion? I found this in the documentation 
  • To create, update, or delete a Knowledge article version, use the call on ArticleType_kav, where ArticleType is the name of the article’s type. For example, to delete use ArticleType_kav.delete(). (see http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_knowledgearticleversion.htm)
but I don't know how to use it.
Thank you for your help.