• Kishor Ambekar 11
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hello everyone,

I am working on step 10 of Lightning Component Framework Specialist and getting an error saying We can't find the Map component in the right column of the Friends with Boats Lightning page.when I click on check challenge, can anybody help me here.

Thank you

BoatSerachFormController.js

({
    doInit : function(component, event, helper){

        helper.loadBoatTypes(component);
    },

    handleChange : function(component, event, helper){
        console.log(component.find("boatTypes").get("v.value"));
        component.set("v.selectedType", component.find("boatTypes").get("v.value"));
    },

    search : function(component, event, helper){
        var selectedType = component.get("v.selectedType");
        console.log("Search button pressed " + selectedType)
    },

    newBoat : function(component, event, helper){
        var boatTypeId = component.get("v.selectedType");
        console.log("New button pressed " + boatTypeId);
        var requestNewBoat = component.getEvent("launchNewBoatForm");
        requestNewBoat.setParams({"boatTypeId": boatTypeId});
        requestNewBoat.fire();
    },

    handleNewBoatForm: function(component, event, helper){
        console.log("handleNewBoatForm handler called.")
        var boatTypeId = component.get("v.selectedType");

        console.log(boatTypeId);
        var createNewBoat = $A.get("e.force:createRecord");
        createNewBoat.setParams({
            "entityApiName": "Boat__c",    
        })
        if(! boatTypeId==""){
            createNewBoat.setParams({
                "defaultFieldValues": {'BoatType__c': boatTypeId}
           })
        }
        createNewBoat.fire();
    },
   
})
Hey all,

I was hoping to get something confirmed. I'm stumped by an issue whereby sharing rules don't seem to be being implemented in a test class.
  • For Contacts, we have a criteria based sharing rule that shares Contacts with a particular group of users if the contact is a particular record type
  • The user group that is shared to is based upon roles within the hierarchy
  • I've written a test class that creates a Contact with the specified record type and runs as a user within the already mentioned group (they have the right role)
  • When running the test as the user, I realised that the user couldn't see the Contacts
  • After trouble-shooting, I queried for the ContactShare records of the Contact and found that the criteria based sharing hasn't been implemented when the Contact was created
Is this a commonly known behaviour?
- If so, that's frustrating as I need to run the test as the user in-order to test other behaviours. Is there a workaround?
- If not, then there may be a problem in my code and I'll double/triple/quadruple check my code to see why the shares aren't being implemented.

With thanks,
Andy