• BigThor
  • NEWBIE
  • 0 Points
  • Member since 2013

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

Hello,

 

I have a trigger for validate EAN code, and I need show error message in page layout, how I can ?

 

Thanks for all

 

Saludos !

Hi,

 

anyone have the code for validate IBAN, SWIFT and EAN-13 ? or any website with the code ?

 

Thanks for all

 

Saludos !!

Hello,

 

I have the next error in VF

 

Attempt to de-reference a null object

Error is in expression '{!iniQuestionsResponsesLB}' in component <apex:page> in page deal_questions_and_responses_lb

An unexpected error has occurred. Your development organization has been notified.     

 

My class is:

 

/**
* Victor
 */
@isTest
public without sharing class QuestionsResponsesLB {
    
    List<Deal_Screening_Question_Response__c> questions;
    List<Deal_Screening_Questions__c> origiQuestions;
    List<Deal_Screening_Question_Response__c> conRespuestas;
    public String sId {get; set;}
    public Boolean inEdit {get; set;}
    
    /*
    *
    */
    public List<Deal_Screening_Question_Response__c> getQuestions(){
        PageReference p = ApexPages.currentPage();
        sId = p.getParameters().get('id');
        
        Opportunity myOppo = [SELECT Deal_Category__c FROM Opportunity WHERE Id = :sId];
        
        questions = [SELECT Category__c,Concept__c,Country__c,language__c,Name,Publish__c,Question_Number__c,Question__c,Sub_Category_2__c,Sub_Category__c FROM Deal_Screening_Question_Response__c WHERE Category__c = :myOppo.Deal_Category__c ORDER BY Question_Number__c];
        return questions;
    }
    
    /*
    *
    */
    public void iniQuestionsResponsesLB(){
        PageReference p = ApexPages.currentPage();
        sId = p.getParameters().get('id');
        
        conRespuestas = [SELECT Category__c,Concept__c,Country__c,language__c,Name,Publish__c,Question_Number__c,Question__c,Sub_Category_2__c,Sub_Category__c FROM Deal_Screening_Question_Response__c WHERE Opportunity__c = :sId];
        if(questions.size() > 0){ //Tenemos respuestas por lo que las mostramos
        	inEdit = true;
        }
        else{//Caso en el que no tenemos respuestas
        	String cat;
        	String idioma;
        	
        	Opportunity myOppo = [SELECT Deal_Category__c FROM Opportunity WHERE Id = :sId];
        	origiQuestions = [SELECT Category__c,Concept__c,Country__c,language__c,LB__c,Name,Publish__c,Question_Number__c,Question_Type__c,Question__c,Sub_Category_2__c,Sub_Category__c FROM Deal_Screening_Questions__c WHERE Category__c = :myOppo.Deal_Category__c ORDER BY Question_Number__c];
        	
        	if(origiQuestions.size() > 0){//Si para esta categoria tenemos preguntas entonces las gruardamos en la tabla preguntas/respuestas
        		//Creamos una lista de preguntas/respuestas
        		List<Deal_Screening_Question_Response__c> forInsert = new List<Deal_Screening_Question_Response__c>();
        		//Por cada una de las preguntas crearemos su pregunta respuesta
        		for(Deal_Screening_Questions__c q : origiQuestions){
        			forInsert.add(new Deal_Screening_Question_Response__c(Question_Number__c = q.Question_Number__c,Category__c = q.Category__c,Sub_Category__c = q.Sub_Category__c,Question__c = q.Question__c,Opportunity__c = sId,language__c = q.language__c,Publish__c = q.Publish__c));
        			if(forInsert.size() > 0){
        				insert forInsert;
        			}
        		}
        	}
        	else{
        		inEdit = false;
        	}
        }
    }
    
    
    /*
    *
    */
    public PageReference CloseUp(){
        PageReference pr = New PageReference('/'+ sId);
        pr.setRedirect(true);
        return pr;
    }
}

 My page is

 

<apex:page controller="QuestionsResponsesLB" tabstyle="Opportunity" action="{!iniQuestionsResponsesLB}" showHeader="true" sidebar="true">
    <apex:pageBlock title="Questions">
    <apex:form >
        <apex:pageBlockSection columns="1" rendered="true">
            <apex:pageblocktable value="{!Questions}" var="question" id="list">
                <apex:column headerValue="Preguntillas">
                    <apex:outputText value="{!question.Question__c}"/>
                </apex:column>
                <apex:column headerValue="Respuestas">
                    <apex:inputText size="100"/>
                </apex:column>
            </apex:pageblocktable>
        </apex:pageBlockSection>
        <apex:pageBlockSection >
            <apex:commandButton value="Cancel" action="{!closeUp}"/>
        </apex:pageBlockSection>
    </apex:form>
    </apex:pageBlock>
</apex:page>

  When I remove action={!iniQuestionsResponsesLB} the page work well

 

Whats is happening ? Any idea of the error ?

 

Thanks for all

 

Hi,

 

anyone have the code for validate IBAN, SWIFT and EAN-13 ? or any website with the code ?

 

Thanks for all

 

Saludos !!

Hello,

 

I have the next error in VF

 

Attempt to de-reference a null object

Error is in expression '{!iniQuestionsResponsesLB}' in component <apex:page> in page deal_questions_and_responses_lb

An unexpected error has occurred. Your development organization has been notified.     

 

My class is:

 

/**
* Victor
 */
@isTest
public without sharing class QuestionsResponsesLB {
    
    List<Deal_Screening_Question_Response__c> questions;
    List<Deal_Screening_Questions__c> origiQuestions;
    List<Deal_Screening_Question_Response__c> conRespuestas;
    public String sId {get; set;}
    public Boolean inEdit {get; set;}
    
    /*
    *
    */
    public List<Deal_Screening_Question_Response__c> getQuestions(){
        PageReference p = ApexPages.currentPage();
        sId = p.getParameters().get('id');
        
        Opportunity myOppo = [SELECT Deal_Category__c FROM Opportunity WHERE Id = :sId];
        
        questions = [SELECT Category__c,Concept__c,Country__c,language__c,Name,Publish__c,Question_Number__c,Question__c,Sub_Category_2__c,Sub_Category__c FROM Deal_Screening_Question_Response__c WHERE Category__c = :myOppo.Deal_Category__c ORDER BY Question_Number__c];
        return questions;
    }
    
    /*
    *
    */
    public void iniQuestionsResponsesLB(){
        PageReference p = ApexPages.currentPage();
        sId = p.getParameters().get('id');
        
        conRespuestas = [SELECT Category__c,Concept__c,Country__c,language__c,Name,Publish__c,Question_Number__c,Question__c,Sub_Category_2__c,Sub_Category__c FROM Deal_Screening_Question_Response__c WHERE Opportunity__c = :sId];
        if(questions.size() > 0){ //Tenemos respuestas por lo que las mostramos
        	inEdit = true;
        }
        else{//Caso en el que no tenemos respuestas
        	String cat;
        	String idioma;
        	
        	Opportunity myOppo = [SELECT Deal_Category__c FROM Opportunity WHERE Id = :sId];
        	origiQuestions = [SELECT Category__c,Concept__c,Country__c,language__c,LB__c,Name,Publish__c,Question_Number__c,Question_Type__c,Question__c,Sub_Category_2__c,Sub_Category__c FROM Deal_Screening_Questions__c WHERE Category__c = :myOppo.Deal_Category__c ORDER BY Question_Number__c];
        	
        	if(origiQuestions.size() > 0){//Si para esta categoria tenemos preguntas entonces las gruardamos en la tabla preguntas/respuestas
        		//Creamos una lista de preguntas/respuestas
        		List<Deal_Screening_Question_Response__c> forInsert = new List<Deal_Screening_Question_Response__c>();
        		//Por cada una de las preguntas crearemos su pregunta respuesta
        		for(Deal_Screening_Questions__c q : origiQuestions){
        			forInsert.add(new Deal_Screening_Question_Response__c(Question_Number__c = q.Question_Number__c,Category__c = q.Category__c,Sub_Category__c = q.Sub_Category__c,Question__c = q.Question__c,Opportunity__c = sId,language__c = q.language__c,Publish__c = q.Publish__c));
        			if(forInsert.size() > 0){
        				insert forInsert;
        			}
        		}
        	}
        	else{
        		inEdit = false;
        	}
        }
    }
    
    
    /*
    *
    */
    public PageReference CloseUp(){
        PageReference pr = New PageReference('/'+ sId);
        pr.setRedirect(true);
        return pr;
    }
}

 My page is

 

<apex:page controller="QuestionsResponsesLB" tabstyle="Opportunity" action="{!iniQuestionsResponsesLB}" showHeader="true" sidebar="true">
    <apex:pageBlock title="Questions">
    <apex:form >
        <apex:pageBlockSection columns="1" rendered="true">
            <apex:pageblocktable value="{!Questions}" var="question" id="list">
                <apex:column headerValue="Preguntillas">
                    <apex:outputText value="{!question.Question__c}"/>
                </apex:column>
                <apex:column headerValue="Respuestas">
                    <apex:inputText size="100"/>
                </apex:column>
            </apex:pageblocktable>
        </apex:pageBlockSection>
        <apex:pageBlockSection >
            <apex:commandButton value="Cancel" action="{!closeUp}"/>
        </apex:pageBlockSection>
    </apex:form>
    </apex:pageBlock>
</apex:page>

  When I remove action={!iniQuestionsResponsesLB} the page work well

 

Whats is happening ? Any idea of the error ?

 

Thanks for all