• suvarna vennapusala
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 5
    Replies
Hi guys,
         I have a question. Is it possible to use table structure in lightning components as in Visualforce page?
Thanks
Aruna
Hi
I am trying to enter the Account and Contact Object Fields Details through Visual Force Page but i am getting the below error while adding the contact input field.
Could not resolve the entity from <apex:inputField> value binding '{!Contact.Name}'. <apex:inputField> can only be used with SObjects, or objects that are Visualforce field component resolvable.

Can any one help me?
Below is the code 
VF Page
 
<apex:page controller="AccountController" >
    <apex:form >
        <apex:pageBlock mode="edit">
            <apex:pageMessages />
            <apex:pageBlockSection title="Account Information" Columns="2" collapsible="">
                           <apex:inputField value="{!Account.name}"/>
                <apex:inputField value="{!Account.Type}"/>
                            </apex:pageBlockSection>
            <apex:pageBlockSection title="Contact Information" Columns="2" collapsible="true">
           <apex:inputField value="{!Contact.Name}"/>
            </apex:pageBlockSection>
                        <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>
 
Apex Class

public with sharing class AccountController {
 
    public String Contact { get; set; }
public Account account { get; private set; }
 
    public AccountController() {
        Id id = ApexPages.currentPage().getParameters().get('id');
        account = (id == null) ? new Account() :
            [SELECT Name, Phone, Industry,Type,(SELECT Name, Email FROM Contacts)  FROM Account WHERE Id = :id];
           
         
    }
 
    public PageReference save() {
        try {
            upsert(account);
        } catch(System.DMLException e) {
            ApexPages.addMessages(e);
            return null;
        }
        //  After Save, navigate to the default view page:
        return (new ApexPages.StandardController(account)).view();
    }
}
 

my page consists one picklist and three textboxes for one  enter a text(related picklist) and one for start date and enddate and also one search button

picklist contains(account number,account name,fax,phone,employees)

if select account number and enter text as 123(suppose)

and set start date and end date and click a search button

 

when i click search button those related records display in pageblock

Hi 

 

Is there a way that all the users who are not logged in for 90 days be auto matically de-activated and we should exempt couple of users from it.

 

FYI 

i already tried using workflows but unfortunately we cannot do much on the User object with workflows.

 

Thanks.

  • March 26, 2012
  • Like
  • 0
Hello everybody.

I wish to get the value of a parameter on a tag <li> but I d'ont know how to make.
I tried with "event.getsource" or "event.target.value" but unsuccessfully.

Can you help me.


Component
<aura:component controller="MEIKO_99_Account_Search_Controller">   
    
    <lightning:button name="myButton" onclick="{!c.Select}"/>
    
    <!-- CREATE ATTRIBUTE/VARIABLE-->
    <aura:attribute name="searchResult" type="List" description="use for store and display account list return from server"/>
    <aura:attribute name="searchKeyword" type="String" description="use for store user search input"/>    
    
    <div style="height: 15rem;">
        <div class="slds-form-element">
            <div class="slds-form-element__control">
                <div class="slds-combobox_container">
                    <div class="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click slds-is-open" aria-expanded="false" aria-haspopup="listbox" role="combobox">
                        <div class="slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right" role="none">
                            <lightning:input name="Input_SearchText"
                                             label="Compte Client"
                                             value="{!v.searchKeyword}"
                                             placeholder="Search..."
                                             class="slds-input slds-combobox__input"
                                             onchange="{!c.Search}" />
                        </div>
                        <div id="listbox-id-1" class="slds-dropdown slds-dropdown_length-with-icon-7 slds-dropdown_fluid" role="listbox">
                            <ul class="slds-listbox slds-listbox_vertical" role="presentation" id="AccountList">
                                <aura:iteration items="{!v.searchResult}" var="acc" indexVar="count">
                                    <li role="presentation" class="slds-listbox__item" onclick="{!c.Select}" name="test">
                                        <div id="{!'Option' + count + 1}" class="slds-media slds-listbox__option slds-listbox__option_entity slds-listbox__option_has-meta" role="option">
                                            <span class="slds-media__figure">
                                                <span class="slds-icon_container slds-icon-standard-account">
                                                    <lightning:icon iconName="standard:account" size="x-small" alternative-text="Account"/>
                                                </span>
                                            </span>
                                            <span class="slds-media__body" >
                                                <span class="slds-listbox__option-text slds-listbox__option-text_entity">{!acc.Name}</span>
                                                <span class="slds-listbox__option-meta slds-listbox__option-meta_entity">Account • {!acc.Phone}</span>
                                            </span>
                                        </div>
                                    </li>
                                </aura:iteration>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</aura:component>

​Controller
Select: function(component, event, helper) {
        var value = event.target.value;
        //event.getSource().get("v.name")
        alert(value);
    }