• GAURAV SETH
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 0
    Replies
Hi,
I need to show a integrated view page of different components.
I have created separate .cmp files and add to the Record page using "Edit Page" functionality but it is not appearing properly .
I don't need this yellow gaps between grid and component.
I have cerated components with same size.
User-added image

Here is my component code:

<aura:component implements="force:hasRecordId,force:hasSObjectName,flexipage:availableForRecordHome">  
    
    <aura:handler name="init" action="{!c.doInit}" value="{!this}" />
     <lightning:recordViewForm recordId="a034P00000UOdRWQA1"
        objectApiName="Facility__c">
   
    <!-- PAGE HEADER -->
    <lightning:layout horizontalAlign="center">
        <lightning:layoutItem>
            <lightning:icon iconName="standard:scan_card" alternativeText="Facility Information"/>
        </lightning:layoutItem>
        <lightning:layoutItem padding="horizontal-small">
            <div class="page-section page-header  slds-size_2-of-2">
                <h1 class="slds-text-heading--label">Facility Information</h1>
              
            </div>
        </lightning:layoutItem>
    </lightning:layout>
    <!-- / PAGE HEADER -->
    <lightning:layout  horizontalAlign="center">
        <lightning:layoutItem padding="around-small" size="10">
            <div aria-labelledby="caseSearchform" class="slds-align_absolute-left  slds-size_2-of-2">
                <fieldset class="slds-box slds-theme--default slds-container--large">
                    <h1 class="slds-text-heading--medium">Facility Information</h1>
                    <form class="slds-form--stacked">
                        <div class="slds-form__row">
                                <div class="slds-form-element__control">
                      <lightning:outputField fieldName="Name" />
                                     </div>
                          </div>   
                   <div class="slds-form__row">
                            
                                    
                            <div class="slds-form-element__control">
                      <lightning:outputField fieldName="Discharge_Date__c" />
                                     </div>
                          </div>
                        
                        <div class="slds-form__row">
                            
                                       <div class="slds-form-element__control">
                      <lightning:outputField fieldName="Admission_Date__c"  />
                                     </div>
                          </div>
                        
                        
                        <div class="slds-form__row">
                            
                                    
                            <div class="slds-form-element__control">
                      <lightning:outputField fieldName="Person__c"  />
                                     </div>
                          </div>
                       
                        
                            <div class="slds-form__row">
                           
                            <div class="slds-form-element__control">
                      <lightning:outputField fieldName="Provider_Details__c" />
                                     </div>
                          </div>
                       
                        <div align="center">
                        <lightning:button label="View" 
                                          class="slds-m-top--medium"
                                          variant="brand"
                                          onclick="{!c.view}"/>  
                        </div>
                    </form>              
                </fieldset>
            </div>
        </lightning:layoutItem>
    </lightning:layout> 
         </lightning:recordViewForm>
</aura:component>
I need to create a lightning component page to show Person details which is a custom object. I am able to to see the data when putting recordid value directly in lightning component but not able to get record Id value dynamically. here is my code

<aura:component implements="force:hasRecordId,force:hasSObjectName,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome" access="global">
    <aura:attribute name="recordId" type="String" access="public" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <lightning:recordViewForm recordId="{v.getRecordId}"
        objectApiName="Person__c">
    <div class="slds-grid">
        <div class="slds-col slds-size_2-of-3">
            <lightning:outputField fieldName="First_Name__c" />
            <lightning:outputField fieldName="Last_Name__c" />
        </div>
        <div class="slds-col slds-size_1-of-3">
            <lightning:outputField fieldName="Email__c" />
            <lightning:outputField fieldName="Home_Phone__c" />
        </div>
    </div>
</lightning:recordViewForm>
</aura:component>

Controller code:

doInit : function(cmp) {

    var recordId = cmp.get("v.recordId");
    var output = '{"record": "' + recordId + '"}';
    // alert('Recordid' +output);
    cmp.set("v.getRecordId", output);

It is showing record Id with above alert but component is not showing data.
What wrong I am doing ? I need to call this component from my person record page. I added this component by Edit Page.
Help is appreciated

Thanks,
Gaurav
 
I need to create a integrated customer page like attached below.
What will be the best way to create such page?
When we go to one customer record- it should have client demographics on left panel and right panel should show separate tabs with related information like : Family, Admission, Discharge etc.

User-added image
I need to know the best way to do development with each developer having there own dev org. Version Control to be used as Gitlab.
Each Developer can complete the development and push, pull the code to dev org and finally commit it to Gitlab repos.
and How to move final code from Gitlab repos to testing org.

Suggestion needed 
I am migrating my existing projects to dev org using:
https://developer.salesforce.com/blogs/developer-relations/2017/07/migrating-existing-projects-salesforce-dx.html

I have completed the steps till 8 and on Step 9 :
sfdx force:source:push getting few errors:

PS C:\salesforce\AMS\amssrc> sfdx force:source:push
PROJECT PATH  ERROR
────────────  ─────────────────────────────────────────────────────────────────
N/A           Cannot find folder:AMS
N/A           Cannot find folder:AMS
N/A           Cannot find folder:AMS
N/A           Cannot find folder:AMS
N/A           Cannot find folder:AMS
N/A           In field: report - no Report named AMS/Cases_Closed_7wK found
N/A           In field: report - no Report named AMS/New_Cases_Report_sLC found
N/A           In field: report - no Report named AMS/Recent_Cases_qCb found
N/A           In field: report - no Report named AMS/Recent_Cases_qCb found
N/A           In field: report - no Report named AMS/Recent_Cases_HV3 found
ERROR running force:source:push:  Push failed.

AMS is my application name.

Where can I look for folder?
I am trying to check if checkbox is selected by user or not . but I am getting error while fetching the checkbox component. I am using the code like :
Test.cmp code : On load I need to check if value of innerMap.Value[0] is true or not.then disable the checkboc if already true.

<aura:if isTrue="{!innerMap.Value[0]}">
           
            <ui:inputCheckbox aura:id="checkbox1" name="checkbox-89"  disabled="true" value = ""/>
              <label class="slds-checkbox__label" for="checkbox">
                <span class="slds-checkbox_faux"></span>
                <span class="slds-form-element__label">8AM</span>
              </label>
          <aura:set attribute="else">
            <ui:inputCheckbox aura:id="checkbox1" name="checkbox-89" value = "" />
                  <label class="slds-checkbox__label" for="checkbox">
                    <span class="slds-checkbox_faux"></span>
                    <span class="slds-form-element__label">   8AM    </span>
                  </label>
        </aura:set>
    </aura:if>

<td><lightning:button label="Submit" 
                                          class="slds-m-top--medium"
                                          variant="brand"
                                          onclick="{!c.callConfirmation}"/> </td>

TestController.js 

callConfirmation: function(component, event, helper) {
 var checkbox1 = component.find("checkbox1").get("v.value");
}
I am getting below error when I click on Submit Button.
This page has an error. You might just need to refresh it.
Action failed: c:AvailableUsers$controller$callConfirmation [component.find(...).get is not a function]
Failing descriptor: {c:AvailableUsers$controller$callConfirmation}

Can someone please help me ? what wrong I am doing? I try finding the solution but find that people have used same type of code.