• sslodhi87
  • NEWBIE
  • 195 Points
  • Member since 2014

  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 84
    Replies
Hi,

I am using force:inputField in my lightning component. It is displaying all fields types including lookup if component is opened from Lightning component tabs.

But if the same component is used in VF includeLightning, it is not displaying Lookup fields.

Can any one help me in this?

Thanks

Hello,

I have a VisualForce page with the select element:

<apex:selectList value="{!StyleGuide}" size="1" styleClass="SlectBox" id="styleguideSelect">
  <apex:selectOptions value="{!StyleGuideOptions}"/>
  <apex:actionSupport event="onchange" onComplete="resetItems()" rerender="dropdownpanel, guidelines, imagespanel, result-count" action="{!doSearch}"/>
</apex:selectList>

Here is a compiled HTML:
 
<select id="j_id0:j_id60:dropdownpanel:generationTypes" name="j_id0:j_id60:dropdownpanel:generationTypes" class="SlectBox " size="1" onchange="A4J.AJAX.Submit('j_id0:j_id60',event,{'similarityGroupingId':'j_id0:j_id60:dropdownpanel:j_id64','oncomplete':function(request,event,data){resetItems()},'parameters':{'j_id0:j_id60:dropdownpanel:j_id64':'j_id0:j_id60:dropdownpanel:j_id64'} } )" style="display: none;"> 
  <option value="Generation 3" selected="selected">Generation 3</option>
  <option value="Generation 2">Generation 2</option>
  <option value="Generation 1">Generation 1</option>
</select>

It works perfectly fine in Chrome, Firefox, Safari and IE Edge. Doesn't work in IE up to 11. Selecting an option do nothing.

The error which I'm getting when page is loaded:

[Error] Could not retrieve a valid progID of Class: Microsoft.XMLDOM. (original exception: ReferenceError: Can't find variable: ActiveXObject)
It is thrown from Sarissa.js

The error when I'm selecting the option element:
TypeError: undefined is not an object (evaluating 'A4J.AJAX.Submit')

Is there any solution to fix that?
Thank you!
 
For example, Object A has 2 record types: RTX, RTY.
Is it possible to create a field F only for RTX, it means this field cannot be selected by RTY, such as layout or somrthings else.
Hi guys,

Can we display a related list based on some picklist value. Like i have opportunity standard object and equipment as a custom object.
In opportunity picklist i have three values. i want to display equipment related list on selection of a particular value. How can we do that?
I'm bit confused with this terms, when should I go for list<sobject> and when for sobject only? Can you please explain when to use list<list<set>>?
Suppose I've a list of fruits like 
List<string> fruits = new List<string> {'mango','papaya','orange','mango'};

then how can I assign this values to set?

for(integer i =0; i<fruits.size(); i++)

set<string> fruits1 = fruits[i];
}

The above code declaration is correct?
Hello 

I'm getting the error Attempt to de-reference a null object, for a vfp test class. There is no line number or another information. Having a tough time trying to debug the issue.

Thank you.
I have a wrapper class which have a boolean value for checkbox and an identifier class, in Identifier class, there is a lookup field attribute_value__c. It seems that I can not get the picked value for attribute_value__c field in controller, always return null value. any clues?

 <apex:pageBlockTable id="tblIden" value="{!IdentifiersList}" var="i">
                    <apex:column width="25px">                       
                            <apex:inputCheckbox value="{!i.selected}" />                               
                    </apex:column>
                    <apex:column value="{!i.identifier.Identifier_Type__c}" headerValue="Type"/>  
                    <apex:column value="{!i.identifier.name}" headerValue="Name"/>  
                    <apex:column >
                        <apex:facet name="header">Attribute Value</apex:facet>
                        <apex:inputField value="{!i.identifier.Attribute_Value__c }" rendered="{!IF(i.identifier.Identifier_Type__c='Attribute','True','False')}"/>                     
                    </apex:column>
                </apex:pageBlockTable>
In controlling access to records module(Data Security), one of the sharing model mentioned is "controlled by parent" and the description mentioned is:

"A user can perform an action (such as view, edit, or delete) on a contact based on whether he or she can perform that same action on the record associated with it". 

How is this set up? And in which situation is this applicable?
I wrote this code
 i am getting error Attempts to de reference to null object


public class sample2 {

    public List<AggregateResult> Result {get;set;}    
    public List<Summary> SummaryList {get;set;}
    public List<Account> AcctList;
    public Map<Id, Account> IdAccount;
    List<Id> Ids;
    
    public void show() {
        SummaryList = new List<Summary>();
        Result = new List<AggregateResult>();
        Ids = new List<Id>();
        AcctList = new List<Account>();
        IdAccount = new Map<Id, Account>();
        
        Result = [SELECT Count(Id) Total , AccountId FROM Contact GROUP BY AccountId];               
        
        for(AggregateResult a : Result) {   
            Ids.add((Id)a.get('AccountId'));
        }
        
        AcctList = [SELECT Name FROM Account WHERE Id IN : Ids];
        
        System.debug('Account List' + AcctList);
        
        for(Account a : AcctList) {
            IdAccount.put(a.Id, a);            
        }
        
        System.debug('Ids and Accounts are ' + IdAccount);
                
        for(AggregateResult a : Result) {
            Account TempAcct = new Account();            
            tempacct= IdAccount.get((Id)(a.get('AccountId')));
          
            system.debug('Account Name is ' + TempAcct.acctName);
            SummaryList.add(new summary(a));                
        }    
    }
    
    public class Summary {
        public Integer Total {get;set;}
        public string AcctName {get;set;}
        
        public Summary(AggregateResult a, string AccountName) {
            Total =  (Integer)a.get('Total');
            AcctName = AccountName;
        }
    }

}
Hi,
I want to load 20000 accounts and 20000 contacts in my developer org but I get: 
storage limit exceeded error ..
I deleted all the other data present in the org and still have this issue
is there a way to have this amount of data ( 20000 accounts and 20000 contacts) 
in a developer org  please ?
Here I have one Account (standard) object and Opportunity(custom )
Eg:   HP(Account) have 1000 oppotunity 
In VF page I want to see How Many Records Are crewatd In last week ,This week,Last month,This month  how to display Based On calender wise.
I have a problem where on a custom object the cancel button takes you back to the incorrect record.

To get this I have a related list within a ticket and I press New which takes me in from a reference 00012 I then press cancel and it will take me back to a reference 00001. Is there a way of making the cancel button take you back to the correct ticket.

The buttons I am using is a custom button so it populates some fields automatically.
I have created an search functionality in lightning which fetches records and display it in table format(6 columns).
In iPhone 5,6,6+ this table is displaying only 3-4 columns and I want to show all columns.If I decrease table's font size then in Ipad/Desktop it looks bad. Please guide.

Thanks
Shoyab
I have ceated to fields Mobile Number and SMS Description using VF Page. I'm able to create the task, When I click the button submit, these to field details added to activities in account. How to do it.Please anybody help me on this.
 
Hi,

Im trying to solve a problem for days please help. I would like to make my phone numbers on that contact page "clickable". When someone click on the number it should go to a link:

tel://contact.mobile number

(We use Cisco Jabber,any number in the browser typed in the format tel:// will be dilalled.)

Im tired with the HYPERLINK funkcton but i still cant. Anibody have any idea how to solve this?
V

Hi,

While calling out other system's webservices from salesforce org. This 401 invalid seesion id  error is being prompted. Even though i had mentioned Username and password in header of HttpRequest. Is there any workaround to fix it.

Code snippet has been attached below.


Http h = new Http();
Httprequest request = new Httprequest();
request.setEndpoint('https://ap2.salesforce.com/services/apexrest/Accounts/0012800000XNqPO/contacts');
request.setMethod('GET');
String username = 'xxxxx';
String password = 'xxxx';
Blob headerValue = Blob.valueOf(username + ':' + password);
String authorizationHeader = 'Basic ' + EncodingUtil.base64Encode(headerValue);
request.setHeader('Authorization', authorizationHeader);
Httpresponse response = h.send(request);
System.debug(response.getBody());




Any help, would be appreciate.

Thanks,
Abhi

Hi folks...
  Here is my vf page code and controller code. But I am getting an error called Unknown property 'ContactgivenId.con. I have defined getter and setter in my controller. Any help will be appreciated.. Thanks in advance..
Vf page code_______________________
<apex:page id="pgId" controller="ContactgivenId">
    <Apex:form>
        <apex:pageBlock>
            <Apex:pageblockSection title="Accounts">
                <apex:pageBlockTable value="{!acct}" var="account">
                    <Apex:column headervalue="Account id">
                        <Apex:outputPanel >
                            <Apex:outputText value="Click" />
                            <apex:actionSupport event="onclick" action="{!getContact}" rerender="contactBlock" >
                                <Apex:param name="accountId" assignTo="{!acctId}" value="{!account.Id}"/>
                            </apex:actionSupport>
                                   
                        </apex:outputPanel >
                    </apex:column>
                    <Apex:column headervalue="Account name">
                        <Apex:outputField value="{!account.Name}" />
                    </apex:column>
                </apex:pageBlockTable>
            </Apex:pageblockSection>
        </apex:pageBlock>
       
        <apex:pageBlock id="contactBlock">
            <Apex:pageblockSection title="Contacts">

                <apex:pageBlockTable value="{!con}" var="contact">
                    <Apex:column headervalue="Contact id">
                        <Apex:outputField value="{!contact.Id}"/>
                    </apex:column>
                    <Apex:column headervalue="Contact name">
                        <Apex:outputField value="{!contact.firstName}" />
                    </apex:column>
                </apex:pageBlockTable>
            </Apex:pageblockSection>

        </apex:pageBlock>

    </apex:form>
</apex:page>
___________________________________________Controller________________________________
public class ContactgivenId {
    public List<Account> acct{get; set;}
    public List<Contact> cont{get; set;}
    public String acctid{get; set;}
    public ContactgivenId(){
        acct=new List<Account>();
        cont= new List<Contact>();
        acct=[select id,name from account LIMIT 10];
        
    }
    public void getContact(){
        cont=[select firstname, lastname, phone from contact where account.id= :acctid];
    }
}