• SFDC93 Sf
  • NEWBIE
  • 0 Points
  • Member since 2016
  • Salesforce Administrator and Developer

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 5
    Replies
Hi All, 
Case>new> on case edit page,
I have added a contact but account name NOT populating in lightning. But in classic if you add contact to case edit page, it will populate the account name. 
I dont know wether it is a limitation or something. Any one has any work around or idea how to overcome this? Please suggest me. see below screenshot. 
Thank you in advance
User-added image
Hi All,
I have an issue with a list button on contact (Custom object) of related list of case. When I click that custom button (vf page will open), it opens a new tab/window in lightening console (Works perfect in classic console). But it is opening in two new tabs. I dont know why? 

Expected functionlaity/What I want exactly is: 
When you click that button, opens vf page as new tab/window. There are two lookup field to case and contact(Custom field). And this contact (custom field) prepopulated with the contact number/id. Then you have chance to attach a case to it. once you attach any case and save, it is opening in new tab with updated/attached case to it. Now, am seeing 3 tabs. two tabs has same edit vf page and 3rd tab is details page of contact. 

See below, 
3. 3rd snippet is after attaching case to it. This is detail page of contact. 
2. 2nd snippet is edit tab/window of vf page.
1. 1st snippet also same as 2nd snippet. 
User-added imageUser-added imageUser-added image
VF Page:

<apex:page standardController="Contact__c" extensions="CaseController" recordSetVar="rcV" lightningStylesheets="true">
 <script type="text/javascript">
   function CloseWindow()
    { 
    window.top.close(); 
    UpdateOpener(); 
    }
    </script>

    <apex:form >
     <apex:pageBlock >
        <apex:pageBlockButtons >
          <apex:commandButton value="Save" action="{!doSave}" status="closer"/>
          <apex:actionStatus startText="(Saving...)" stopText="" onStop="CloseWindow();" id="closer"/>
          <apex:commandButton action="{!cancel}" value="cancel" />
        </apex:pageBlockButtons>
       
        <apex:pageBlockSection >
          <apex:inputField value="{!ca.Case__c }"/>
          <apex:inputField value="{!ca.Contact__c  }"/>       
        </apex:pageBlockSection>
     </apex:pageBlock>
    </apex:form>
</apex:page>
      
Apex Class:
      

public class AttachCaseController {
    public Contact__c  ca {get; set;}
     ApexPages.StandardSetController  stdControllerSet = null;
    public String caseId;
 
    public AttachCaseController(ApexPages.StandardSetController  stdController) {
       ca = new Contact__c();
        caseId = ApexPages.currentPage().getParameters().get('id');
       ca.Contact__c = caseId;
       stdControllerSet = stdController;
    }        
    public pageReference doCancel(){
     return stdControllerSet.cancel(); 
    }
    public pageReference doSave(){
        insert ca;
        System.debug('(())))'+ca);
        PageReference Pr = new PageReference('/'+caseId);
         pr.setRedirect(true);
        return pr;
    }
}

Finally, I just need some help to resolve this. Any help appreciaetd.
Thank you.
Please can some one help me to convert this URl type javascript button to lighting??
This is available in related list. 

/a1c/e?DFXXXXXXXXX={!REGULAR_HOURS__c.Name}&DFXXXXXXXXX_lkid={!REGULAR_HOURS__c.Id}&saveURL=%2F{!REGULAR_HOURS__c.Id}&retURL=%2F{!REGULAR_HOURS__c.Id}

Thank you
Hi All, 

Im trying to do the second challenge in App Customization  but am getting some Super badge am getting the error "Challenge Not yet complete... here's what's wrong:  Couldn’t find the 'Volunteer Shift' relationship field or it is not configured correctly."
Please, anyone, can anyone tell me which relationships should be created between these objects? I have created a master-detail relationship between them. 
User-added image

Also, am not clear with this "Shifts with cascading delete and the option of roll-up summary fields." 

Thank you and any help is appreciated.
Thank you in advance. 
Hi Friends, 
I'm struggling with some of the tasks here in the super badge. Please, can you share me a source code? I will start from scratch again. I have created multiple trailhead playgrounds still messed up somehow. Here is my current error "Challenge Not yet complete... here's what's wrong: 
The BoatSearchForm component is missing a lightning
: select component. Double check the requirements and try again." even though I have above component in my code list. 
I will tell you what I did so far for this task.
1. Created mentioned custom objects in the new Trailhead Playground org with the relationships and all. 
2. Developed some of the code. Please check the below code.

--------------------------------------------------------------------
BoatSearch.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" access="global" >
<lightning:card title="Find a Boat" class="slds-m-top_10px" >
     <c:BoatSearchForm />
</lightning:card>    
<lightning:card title="Matching Boats" >
     <c:BoatSearchResults /> 
</lightning:card>
<aura:handler name="formsubmit"
                  event="c:FormSubmit"
                  action="{!c.onFormSubmit}"
                  phase="capture"/>

</aura:component>
--------------------------------------------------------------------

BoatSearchResults.cmp

<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" 
                access="global" controller="BoatSearchResults">
    <aura:handler name="init" action="{!c.doSearch}" value="{!this}"/>
    <aura:attribute name="boatTypeId" type="String" />
    <aura:attribute name="boats" type="Boat__c[]" />  
    <!--<aura:method name="search" description="Sample method with parameter">
        <aura:attribute name="boatTypeId" type="String"  />
    </aura:method>-->
    <!-- set up the aura:method for search -->
    <aura:method name="search" description="accepts boatTypeId
            and executes search that refreshes the boats attribute">
        <aura:attribute name="boatTypeId" type="Id"/>
    </aura:method>
    <!-- Display errors, if any -->
    <!--
    <aura:if isTrue="{!not(empty(v.errorString))}">
        <div class="recordError">
            <ui:message title="Error" severity="error" closable="true">
                {!v.errorString}
            </ui:message>
        </div>
    </aura:if>-->
    <aura:if isTrue="{!not(empty(v.boats))}">
        <lightning:layout multipleRows="true" horizontalAlign="center">
                <aura:iteration items="{!v.boats}" var="boatVar">
                    <lightning:layoutItem flexibility="grow"  class="slds-m-right_small" >   
                        <c:BoatTile boat="{!boatVar}"/>
                    </lightning:layoutItem>
                </aura:iteration>
        </lightning:layout>
         <aura:set attribute="else">
            <div class="slds-align_absolute-center">No boats found</div>
        </aura:set>
    </aura:if>
</aura:component>
----------------------------------------------------------------
BoatSearchForm.cmp

<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" controller="BoatSearchFormController" >
    <aura:handler name="formsubmit"
                  event="c:FormSubmit"
                  action="{!c.onFormSubmit}"
                  phase="capture"/>
    
    <aura:attribute name="searchOptions" type='String[]' default='All'/>
    <aura:attribute name='searchOptionToIdMap' type='Map' default="{All:''}" />
    <aura:attribute name='showNewButton' type='Boolean' default='false'/>

        
    <lightning:layout horizontalAlign="center"   >

       <lightning:layoutItem class="slds-grid_vertical-align-center" >

           <lightning:select aura:id='typeSelect' name='selectItem' label='' onchange=''>
             <aura:iteration items='{!v.searchOptions}' var='option'>
                 <option value='{!option}' text='{!option}'></option>
             </aura:iteration>
         </lightning:select>
       </lightning:layoutItem>

       <lightning:layoutItem class="slds-grid_vertical-align-center" >
         <lightning:button label="Search" variant="brand" onclick='{!c.onFormSubmit}' />
         <aura:if isTrue='{!v.showNewButton}'>
            <lightning:button variant='neutral' label='New' onclick='{!c.createBoat}'/>
        </aura:if>
       </lightning:layoutItem>

    </lightning:layout>

</aura:component>
-------------------------------------------------------------------------------

BoatSearchFormController.js

({    createBoat: function (component,event,helper) {
        var createRecordEvent = $A.get('e.force:createRecord');
        if (createRecordEvent) {
            var typeName = component.find('typeSelect').get('v.value');
            var typeMap = component.get('v.searchOptionToIdMap');
            var typeId = null;
            if (typeName && typeMap && typeMap[typeName]) {
                typeId = typeMap[typeName];
            }
            createRecordEvent.setParams({
                'entityApiName': 'Boat__c',
                'defaultFieldValues': {
                    'BoatType__c': typeId
                }
            });
            createRecordEvent.fire();
        }
    },
    
    onFormSubmit : function(component, event, helper){
        var boatTypeId = component.get("v.selectedType");
        console.log("Search button pressed " + boatTypeId);
        var formSubmit = component.getEvent("FormSubmit");
        formSubmit.setParams({"formData":
                            {"boatTypeId" : boatTypeId}
        });
        formSubmit.fire();
    },   
})
--------------------------------------------------------------
 BoatSearchResults.apxc

public with sharing class BoatSearchResults  {
    @AuraEnabled
     public static List <Boat__c> getBoats(String boatTypeId) {
      if(boatTypeId != '')  {
             return [SELECT id, BoatType__c, picture__c, name,contact__r.Name
                    FROM Boat__c
                    WHERE BoatType__c =:boatTypeId];
      } else {
          return [SELECT id, BoatType__c, picture__c, name,contact__r.Name
                    FROM Boat__c];
      }
         }
         }
------------------------------------------------------------
BoatSearchResultsHelper.js

({
    onSearch : function(component) {
        var action = component.get("c.getBoats");
        action.setParam({"boatTypeId":""});
        action.setCallback(this, function(response){
        var status = response.getState();
            if(status === "SUCCESS"){
             if(! $A.util.isEmpty(response.getReturnValue())){
                    component.set("v.boatTypeId",response.getReturnValue()); 
                } else {
                     component.set("v.recordError","No boats found");
                }
            }
        });
        $A.enqueueAction(action);
    }
})
-----------------------------------------------------------------
 FormSubmit.evt

<aura:event type="COMPONENT" description="Boat Event">
    <aura:attribute name="formData" type="Object"/>
    
</aura:event>
-------------------------------------------------------------------------
BoatSearchController.js

({
    onFormSubmit : function(component, event, helper){
        console.log("event received by BoatSearchController.js");
        var formData = event.getParam("formData");
        var boatTypeId = formData.boatTypeId;
        var BSRcmp = component.find("BSRcmp");
        var auraMethodResult = BSRcmp.search(boatTypeId);
        console.log("auraMethodResult: " + auraMethodResult);
    }
})
---------------------------------------------------------------------------
BoatTile.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes">
 <aura:attribute name="boat" type="Boat__c" />
    <aura:attribute name="selected" type="String" />
 <lightning:button class="tile">
        <div style="{!'background-image:url(\'' + v.boat.Picture__c + '\'); '}" class="innertile">
          <div class="lower-third">
           <h1 class="slds-truncate">{!v.boat.Contact__r.Name}</h1>
          </div>
        </div>
    </lightning:button>
 </aura:component>
--------------------------------------------------------------------------------
Any help much appreciated. I would love to hear some new tips and new techniques with this task. If you share some source code that would greately appreciated. 

Thank you
i just want to customize the domain name and url which will show on the community login page.
for example 
the existing url.-https/for03042019-ppms-clientportal.force.com/PPMSClient
new url-https/ProjMms.com/Client-Login/SouthFlorida
OWD is private, role is at the bottom of the tree, sharing rule-account:account owner = high. If I give Read access to acct, cont and opp.on the profile, user can see all records, but if I remove read access at the profile, they cannot see any accounts, contacts or opportunities. Just need to have the user see only the records they own. 
Hi, I'm just making my way through the Trailhead modules and found a pre-made Leads view that filtered on "Lead Status does not contain 'closed' ".

I removed this filter and attempting to add it again, I can only choose specific values from the Lead Status field, not just type 'closed' as a string so using this view, it might not be future proof if values change in the future (thinking of this for other fields too).

Can front-end users not specify text strings to use with Contain and pick-list fields when editing views? Would this view/filter have been coded in the backend somehow, not created from the users view? Thx.
Hi All, 
Case>new> on case edit page,
I have added a contact but account name NOT populating in lightning. But in classic if you add contact to case edit page, it will populate the account name. 
I dont know wether it is a limitation or something. Any one has any work around or idea how to overcome this? Please suggest me. see below screenshot. 
Thank you in advance
User-added image
Hi All, 

Im trying to do the second challenge in App Customization  but am getting some Super badge am getting the error "Challenge Not yet complete... here's what's wrong:  Couldn’t find the 'Volunteer Shift' relationship field or it is not configured correctly."
Please, anyone, can anyone tell me which relationships should be created between these objects? I have created a master-detail relationship between them. 
User-added image

Also, am not clear with this "Shifts with cascading delete and the option of roll-up summary fields." 

Thank you and any help is appreciated.
Thank you in advance.