• movie apk
  • -2 Points
  • Member since 2020

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 6
* Create Calander object with two fields event start date and event end date(both are date data types) insert any 5 records and Display all records data in calander view.
Hi all and Happy new year.

I had this task to create a custom Related list on the Account Page Layout with Visualforce and it all works fine. I've got all the records that i need and all the required fields and of course "New Project" button.

New Project button

However the only issue is that when i added the "New BD Project" button, when the new page is opened and the user change his mind and press "Cancel" it returns to the Visualforce page only, not to the Account Page Layout.


I tried different solution, but i could not make it work.
Here is the commandlink button
<div style="margin-left: 30%;">
<apex:commandLink value="New BD Project" action="       {!URLFOR($Action.BD_Project__c.New)}" target="_parent"     styleClass="btn" style="text-      decoration:none;padding:4px;"/>

I found the whole Visualforce page and Controller in another solution which was for Contact Related list and i modified it to fit my requirements. The only change is that in the working Contact solution(where when you press cancel it returns you to the previous page) is that the code for the New Object is in the Controler:
public pageReference newContact()
pageReference pageRef = new pageReference(URL.getSalesforceBaseUrl().toExternalForm() + '/003/e?&retURL=' + accounts.id);
return pageRef;

Did any of you guys had a similar issue and found a solution.

Kind regards,

Here is the controller and the Visualforce that i'm using.:

Hey guys anyone have idea about how can i show and hide my accordion row at a time using SLDS
here is my component and controller
            <aura:attribute name="showEditable" type="Boolean" default = "false"/>
            <aura:attribute name="showReadable" type="Boolean" default = "true"/>

    <aura:attribute name="accountList" type="Account[]"/>
        <aura:attribute name="isexpanded" type="Boolean"/>

    <aura:handler name="init" value="{! this }" action="{! c.doInit }"/>

      <lightning:card title = "Account Accordian" variant = "narrow">
          <ul class="slds-accordion">
              <aura:iteration items="{!v.accountList}" var="account">
                      <div class="slds-page-header" style="cursor: pointer;" id="{!account.Id}"  data-record="{!idx}" onclick="{!c.expand}" >
                          <section class="slds-clearfix">
                              <div class="slds-float--left ">
                                  <div class="slds-m-left--large">{! account.Name}</div>
                          <div class="slds-hide slds-p-around--medium"  id="{!account.Id}" aura:id="{!account.Id}">
                              Account details
                              <aura:if isTrue="{! v.showReadable}">
                                  <c:AccountDetailsComponent recordId="{! account.Id}"/>
                                  <lightning:button variant="brand" label="Edit" onclick="{! c.EditShow }" />
                              <aura:if isTrue="{! v.showEditable}">
                                  <c:editableRecordLDS recordId="{! account.Id}"/>
    expand : function(component,event) {
         var currentElementId = event.currentTarget.getAttribute("id");;  
        console.log("Element Id-> ",currentElementId);
        var acc = component.find(currentElementId.toString());
	  var acc1 = document.getElementById(currentElementId);

           /* for(var cmp in acc1) {
        	$A.util.toggleClass(acc[cmp], 'slds-show');  
        	$A.util.toggleClass(acc[cmp], 'slds-hide');  
             $A.util.toggleClass(acc1, 'slds-is-open');
    doInit : function(component, event, helper) {
        var action=component.get('c.getAccountList');
            var state = response.getState();
            console.log('state ='+state);
            if (component.isValid() && state === "SUCCESS") {
                component.set("v.accountList", response.getReturnValue());
  EditShow : function(component, event, helper) {




I have a Custom DataSourceConnection class (that extends DataSource.Connection) to retrieve related records for contacts from my server API. I need the record ID for the current contact to make my query, but haven't found a way to retrieve it (ApexPages won't work because it's not using Visualforce).

How can I get the record ID from my DataSourceConnection class?

Thanks for the help!
Im new to "SOQL". And I had to interdgete website with salsforce. 
I need to get data in one query like that.
"select id,name, (select id,name,student__c,(SELECT Id,Name FROM student__r) from Sponsorships__r) from contact WHERE RecordTypeId='0126A000000MAV6QAO'"

My question is, in this query "student__c" related to the "Account" object. I need to get that account detail and after again inside I need to get that account related "Contact" table data.

another way to explain
1. need to get "contact" data  RecordTypeId='0126A000000MAV6QAO'
2. with that I need to get "SponsorshipNEW__c" related data. Re.ship.name ="Sponsorships__r"
3. and "SponsorshipNEW__c" object have an Id "student__c" this is Related to the "Account" object. I need to get that account Object also.
4. Next to that particular Account have the "Contact" table Id. I need to get that too.
Please give me is that posible to do. 
Need to get as an outer join query
Hi everyone!

I need to add new account custom fields to the account page layout. Are there any ways to do that? Is it possible to modify page layout using REST API?