• Eduardo Deslandes
  • NEWBIE
  • 15 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 8
    Replies
Hi, I trying to put an action on my custom object list view layout, but the action not appearing as an option, and when I created one from the layout edit page not worked too. I'm using lightning, some one please help me?

Hi,

after the Spring '17 update, the users of some profile are not able to access some fields(custom list option fields) of OpportunityLineItems. I have verified many configurations(profiles, field accessibility, roles...) but the fields continue not accessible. I don't know more what to do, before Spring '17 update all was working perfectely, it seems like a bug...

Hi, I trying to create a visualforce page to insert OpportunityLineItems, but it's not working, when I click "Salvar" (save) nothing happens, anyone could help me please?

page:

<apex:page controller="ProdOpController">
    <apex:form >
        <apex:pageBlock title="Novo Produto da Oportunidade">
            <apex:pageBlockSection title="Informações do Produto">
                <apex:inputField value="{!prodop.OpportunityId}"/>
                <apex:inputField value="{!prodop.Quantity}"/>
                <apex:inputField value="{!prodop.UnitPrice}"/>
                <apex:selectList multiselect="false" size="1" value="{!prodop.Product2Id}">
                    <apex:selectOptions value="{!prodOptions}"/>
                </apex:selectList>
            </apex:pageBlockSection>
        <apex:pageBlockButtons >
            <apex:commandButton action="{!salvar}" value="Salvar"/>
        </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>

controller:
 
public class ProdOpController {
    
    public OpportunityLineItem prodop{ get; private set; }
    
    public ProdOPController(){
        prodop = new OpportunityLineItem();
        System.debug('Entrei no construtor');
    }
    
    public PageReference salvar(){
        System.debug('Entrei em salvar');
        try{
            insert prodop;
        }
        catch(System.DMLException e){
        	System.debug('insert prodop falhou');
            System.debug(e);
            ApexPages.addMessages(e);
            return null;
        }
        PageReference redirectSuccess = new ApexPages.StandardController(prodop).view();
        return (redirectSuccess); 
    }

    public List<SelectOption> getProdOptions(){
        List<PricebookEntry> prods = Database.query(
        	'SELECT Id, name FROM PricebookEntry'
        );
        List<SelectOption> options = new List<SelectOption>();
        for(PricebookEntry p : prods){
            options.add(new SelectOption(p.Id, p.Name));
        }
        System.debug('listei as opcoes de produtos');
        return options;
    }
}

 
Hi, I'm developing a visualforce page to insert a new OpportunityLineItem, but the inputField above is not working:
<apex:inputField value="{!OpportunityLineItem.Product2Id}"/>

It shows only the label.

Anyone could help me?

Hi, I have done all steps in the Housekeeping topic and all steps exactly how is in the challenge, but I'm still getting the error: "Could not find an Entitlement Template named 'Trailhead Standard Web Support' with a term of 90 days and of type 'Web Support'", anyone could help me, please?
Hi, I trying to put an action on my custom object list view layout, but the action not appearing as an option, and when I created one from the layout edit page not worked too. I'm using lightning, some one please help me?

Hi,

after the Spring '17 update, the users of some profile are not able to access some fields(custom list option fields) of OpportunityLineItems. I have verified many configurations(profiles, field accessibility, roles...) but the fields continue not accessible. I don't know more what to do, before Spring '17 update all was working perfectely, it seems like a bug...

Hi, I trying to create a visualforce page to insert OpportunityLineItems, but it's not working, when I click "Salvar" (save) nothing happens, anyone could help me please?

page:

<apex:page controller="ProdOpController">
    <apex:form >
        <apex:pageBlock title="Novo Produto da Oportunidade">
            <apex:pageBlockSection title="Informações do Produto">
                <apex:inputField value="{!prodop.OpportunityId}"/>
                <apex:inputField value="{!prodop.Quantity}"/>
                <apex:inputField value="{!prodop.UnitPrice}"/>
                <apex:selectList multiselect="false" size="1" value="{!prodop.Product2Id}">
                    <apex:selectOptions value="{!prodOptions}"/>
                </apex:selectList>
            </apex:pageBlockSection>
        <apex:pageBlockButtons >
            <apex:commandButton action="{!salvar}" value="Salvar"/>
        </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>

controller:
 
public class ProdOpController {
    
    public OpportunityLineItem prodop{ get; private set; }
    
    public ProdOPController(){
        prodop = new OpportunityLineItem();
        System.debug('Entrei no construtor');
    }
    
    public PageReference salvar(){
        System.debug('Entrei em salvar');
        try{
            insert prodop;
        }
        catch(System.DMLException e){
        	System.debug('insert prodop falhou');
            System.debug(e);
            ApexPages.addMessages(e);
            return null;
        }
        PageReference redirectSuccess = new ApexPages.StandardController(prodop).view();
        return (redirectSuccess); 
    }

    public List<SelectOption> getProdOptions(){
        List<PricebookEntry> prods = Database.query(
        	'SELECT Id, name FROM PricebookEntry'
        );
        List<SelectOption> options = new List<SelectOption>();
        for(PricebookEntry p : prods){
            options.add(new SelectOption(p.Id, p.Name));
        }
        System.debug('listei as opcoes de produtos');
        return options;
    }
}

 
Hi, I'm developing a visualforce page to insert a new OpportunityLineItem, but the inputField above is not working:
<apex:inputField value="{!OpportunityLineItem.Product2Id}"/>

It shows only the label.

Anyone could help me?

Hi, I have done all steps in the Housekeeping topic and all steps exactly how is in the challenge, but I'm still getting the error: "Could not find an Entitlement Template named 'Trailhead Standard Web Support' with a term of 90 days and of type 'Web Support'", anyone could help me, please?