• Ravi K
  • NEWBIE
  • 15 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
I have a requirement to capture list of names using Dynamic boxes on VF page. I am using action function for this, but behavior is getting changed based on attribute "Immediate" of action function. if Immediate="true" values are not binding to list showing blanks. if "false" its binding values correctly. But i have to use this with Immediate=true.

Below is my code: Controller:
public with sharing class DynamicTextbox {

public list<AUser> lstuser{get;set;} 

public DynamicTextbox(ApexPages.StandardController controller) {
     lstuser = new list<Auser>();
        lstuser.add(new Auser(''));
    }
    
public void AddName() { 
              lstuser.add(new Auser(''));
    }    
    
 public class Auser{    
    public string name{get;set;}    
        public Auser(string name){
        this.name=name;    
    }
 }
 

}

VF page:
<apex:page standardController="account" extensions="DynamicTextbox"> 
    <apex:form > 
        <apex:actionFunction id="AddAuthorizedUser" name="AddName" action="{!AddName}" reRender="Outpanel" immediate="true"/>
         <apex:outputPanel id="Outpanel" > 
            <apex:actionRegion >
                <apex:repeat value="{!lstuser}" Var="Auser" id="samrr"> 
                    <apex:inputtext value="{!Auser.name}" styleClass="form-control"/>
                </apex:repeat>
                <button type="button" onclick="AddName();">&nbsp;<B>+</b>&nbsp;</button> 
            </apex:actionRegion>
        </apex:outputPanel> 
    </apex:form> 
</apex:page>
 
  • November 01, 2017
  • Like
  • 0
Showing below error when checking challege in Lightning Experience Rollout Specialist challenge 7. I have followed the steps as per the requirements. checked with new trailhead playground as well, but still showing same error.

User-added image
  • October 15, 2017
  • Like
  • 0

I has trying to add opportunity team member using apex.

Here is code snipet.

OpportunityTeamMember otm = new OpportunityTeamMember (OpportunityId = oppid,UserId = userid,TeamMemberRole = role);
 insert otm;
I can see OpportunityTeamMember added to opportunity with access level as readonly. how the access level being set as "readonly", do we have any option to set access as readonly for OpportunityTeamMember. Please help.
I have a requirement to capture list of names using Dynamic boxes on VF page. I am using action function for this, but behavior is getting changed based on attribute "Immediate" of action function. if Immediate="true" values are not binding to list showing blanks. if "false" its binding values correctly. But i have to use this with Immediate=true.

Below is my code: Controller:
public with sharing class DynamicTextbox {

public list<AUser> lstuser{get;set;} 

public DynamicTextbox(ApexPages.StandardController controller) {
     lstuser = new list<Auser>();
        lstuser.add(new Auser(''));
    }
    
public void AddName() { 
              lstuser.add(new Auser(''));
    }    
    
 public class Auser{    
    public string name{get;set;}    
        public Auser(string name){
        this.name=name;    
    }
 }
 

}

VF page:
<apex:page standardController="account" extensions="DynamicTextbox"> 
    <apex:form > 
        <apex:actionFunction id="AddAuthorizedUser" name="AddName" action="{!AddName}" reRender="Outpanel" immediate="true"/>
         <apex:outputPanel id="Outpanel" > 
            <apex:actionRegion >
                <apex:repeat value="{!lstuser}" Var="Auser" id="samrr"> 
                    <apex:inputtext value="{!Auser.name}" styleClass="form-control"/>
                </apex:repeat>
                <button type="button" onclick="AddName();">&nbsp;<B>+</b>&nbsp;</button> 
            </apex:actionRegion>
        </apex:outputPanel> 
    </apex:form> 
</apex:page>
 
  • November 01, 2017
  • Like
  • 0
Showing below error when checking challege in Lightning Experience Rollout Specialist challenge 7. I have followed the steps as per the requirements. checked with new trailhead playground as well, but still showing same error.

User-added image
  • October 15, 2017
  • Like
  • 0

I has trying to add opportunity team member using apex.

Here is code snipet.

OpportunityTeamMember otm = new OpportunityTeamMember (OpportunityId = oppid,UserId = userid,TeamMemberRole = role);
 insert otm;
I can see OpportunityTeamMember added to opportunity with access level as readonly. how the access level being set as "readonly", do we have any option to set access as readonly for OpportunityTeamMember. Please help.