• rizwan ahmed 16
  • NEWBIE
  • 50 Points
  • Member since 2016

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 6
    Questions
  • 20
    Replies
I am trying to set up a custom domain in a delevoper edition of Salesforce in conjunction with a trailhead course.  When I click the Check Availability button, I always get the same message.  I have tried many different domain names and always get the same message.  The error is as follows:

Your domain name can include up to 40 characters, numbers, and hyphens. The name can't begin or end with a hyphen.

Any suggestions?  My Domain name does not start or end with a hyphen.  See screen shot below

User-added image
Hi Guys!
I want to create an hierarchy organization chart for my workers and managers i have done visualforce page using google chart library but stuck in lightning
I have tried to acheive the visualization in lightning using d3.js by hardcodeing the data but i want need worker name and supervisor name which is self lookup inside worker from HRMSUS__person__c object.and i need to show the worker and ther manager(HRMSUS__Supervisor__c).here is my sample good
view sourceprint?
<!-- lightning  Component --->

<aura:component access="GLOBAL" controller="WorkerController" implements="flexipage:availableForAllPageTypes,force:hasRecordId,forceCommunity:availableForAllPageTypes">
	
    <!-- Import D3 Library from Static Resourse -->
    <!-- This Lightning component is using the latest D3 V5 -->
   

    <ltng:require scripts="{!join(',', $Resource.D3Library + '/d3.min.js')}" afterScriptsLoaded="{!c.initOrgChart}"/>
    
</aura:component>


//component conttroller:

({
    initOrgChart : function(component, event, helper) {
        console.log('D3 Library Initialization Successful');
        helper.drawOrgChart(component, event, helper);
         var action = component.get("c.getWorkerController");
             action.setCallback(this, function(response){
            var state = response.getState();
            console.log('worker data is:',response.getState());
            if (state === "SUCCESS") {
                console.log('worker data is:', response.getReturnValue());
                component.set("v.Name", response.getReturnValue());//The attribute that you are iterating has to be set here
            }  
          
        });
        $A.enqueueAction(action);
        }
    
})


//component helper:

({
	drawOrgChart : function(component, event, helper) {
	
      var treeData ={
                      "name": "TestS",
                      "children": [
                          { 
                              "name": "BMW",
                              "children": [
                                  { "name": "3 Series" },
                                  { "name": "5 Series" },
                                  { "name": "7 Series" }
                              ]
                          },
                          { "name": "Audi" },
                          { "name": "Toyota"},
                          { "name": "Honda"},
                          { "name": "Suburu"},
                          { "name": "VW",
                            "children" : [
                                { "name" : "Jetta"},
                                { "name" : "Passat"},
                                { "name" : "Tiguan"},
                                { "name" : "Atlas"},
                                { "name" : "Golf"},
                                { "name" : "Beetle"}
                            ] 
                          },
                          { "name": "Hyundai"},
                       ]
                     };
      
                          
                         
     //setting the dimensions and margins of the diagram
     var margin = {top: 40, right:30, bottom:50, left:30};
     var width = 660 - margin.left - margin.right;
     var height = 500 - margin.top - margin.bottom;
        
     //Declare a tree Layout and assign its size
     var treemap = d3.tree()
        	     .size([width, height]);
        
     //Assigns the data to hierarchy using parent-child relationships
     var nodes = d3.hierarchy(treeData, function(d){
            			return d.children;
        		     });
     console.log(nodes);
        
     /*NOTE: This assigns a range of properties to each node including (node.data, node.depth, node.height, node.parent, node.children)
     We are telling the function to use the "children" element from treeData to generate property of the nodes. */
        
     //Map the node data to tree Layout
     nodes = treemap(nodes);
     console.log(nodes);
        
    

     //Append the Map(SVG) to the body of the Lightning Component
     var svg = d3.select("body")   
        	 .append("svg")
        	 	.attr("width", width + margin.left + margin.right)
        	 	.attr("height", height + margin.top + margin.bottom)
        	 .append("g")
        	 	.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
        
     //Add All Links between nodes
     var link = svg.selectAll(".link")
        	   .data(nodes.descendants().slice(1)) //We are not including the main 'root' node as since its drawn from child to parent.
        	   .enter()
        	   .append("path")
        	   .attr("class", "link")
        	   .attr("fill", "none") //Including all the styles directly here as the Style configured is not applied to lighting component.
        	   .attr("stroke", "#ccc")
        	   .attr("stroke-width", "2px")
                   .attr("d", function(d){  //Here Attribute 'd' is used to describe the curve. Using Bezier Curve
            		return "M" + d.x + "," + d.y
                        + "C" + d.x + "," + (d.y + d.parent.y) / 2
                        + " " + d.parent.x + "," + (d.y + d.parent.y) / 2
                        + " " + d.parent.x + "," + d.parent.y
        	    });
     console.log(nodes.descendants());
     console.log(nodes.descendants().slice(1));
        
     //Add Each Node as a Group - Ie, setting up a group
     var node = svg.selectAll(".node")
        		       .data(nodes.descendants())
        		       .enter()
        		       .append("g")
        		            .attr("class", "node node--leaf")
        			    .attr("transform", function(d){
                        		return "translate(" + d.x + "," + d.y + ")";
        			    });
        
     //Add a circle to the node
     node.append("circle")
         .attr("r", 15)
         .attr("fill", "#fff")
         .attr("stroke", "steelblue")
         .attr("stroke-width", "3px");
        
     //Add Text to the node
     node.append("text")
         .attr("dy", ".35em")
         .attr("y", function(d){ return d.children ? -20 : 20;})
         .style("text-anchor", "middle")
         .text(function(d) {return d.data.name; });
       
	
    }
})


//apex controller:
public class WorkerController {
    @AuraEnabled
public static List<HRMSUS__person__c> getWorkerController(){

       return [SELECT Id, Name,HRMSUS__Supervisor__c,HRMSUS__Supervisor__r.name from HRMSUS__person__c];

}
}

It koos like below image:
User-added image
What i need is for eaxmple refer below image
User-added image​​​​​​​
Hi ,
i have custom address field named as "site address" which of type formula. so i want to create a detail page button when clicked should open a google maps with particular site address formula field address. I have created button and in URL i have hard coded " https://www.google.co.in/maps/place/{!FConnect__Service_Order__c.Site_Address__c}" this is my url which i have created.Now when i click button which i have created its not opening exact address iam getting link like this "https://www.google.co.in/maps/place/461+Waukegan+Road_BR_ENCODED_Northbrook,+IL+_BR_ENCODED_United+States/@17.4082444,78.4467633,15z/data=!3m1!4b1" so how can i solve this BR_Encoded  



 
I have Field label as  Lead source which is Formula field  on Quote object .But  now the requirement is insted of formulae they require  Pick list field.So i created a new pick list field and labeld as Lead source .now i want to update all the pick list value by formula field by developer console ananymous window .how to update a record value from developer console. can any one help
Hi ,
i have custom address field named as "site address" which of type formula. so i want to create a detail page button when clicked should open a google maps with particular site address formula field address. I have created button and in URL i have hard coded " https://www.google.co.in/maps/place/{!FConnect__Service_Order__c.Site_Address__c}" this is my url which i have created.Now when i click button which i have created its not opening exact address iam getting link like this "https://www.google.co.in/maps/place/461+Waukegan+Road_BR_ENCODED_Northbrook,+IL+_BR_ENCODED_United+States/@17.4082444,78.4467633,15z/data=!3m1!4b1" so how can i solve this BR_Encoded  



 
Hi at all,
i have a problem with the process builder.
I have a process for a "Order Item".
If i want to add a "Order Item" i have to set some fields. There are:
  • Order
  • Caterer
  • Menu
  • Quantity
  • Net Price
  • Description

Only "Order" is a compulsory field.
I want to add a "Order Item" without anything, so only the "Order" field is filled. But if I fill not the "Menu" field, i get a problem and a "Error Oncurred During Flow" mail send to me:
"An error occurred at element myDecision (FlowDecision).
The flow failed to access the value for SObject.MenuId__r.Name because it hasn't been set or assigned."

In my process I decide between:
  1. "Menu" is null false
  2. "Menu" is null true
If its true (1.) he is going on, if its false, he should do nothing.
This is the place he send ma a error!

Can someone help me?
It should be possible to add an object without any informations. If the "caterer field" is emtpy, this work without problems..but who is the problem with the "Menu Name" field?

Sorry for the bad english ;)

Lisa

 
I am trying to set up a custom domain in a delevoper edition of Salesforce in conjunction with a trailhead course.  When I click the Check Availability button, I always get the same message.  I have tried many different domain names and always get the same message.  The error is as follows:

Your domain name can include up to 40 characters, numbers, and hyphens. The name can't begin or end with a hyphen.

Any suggestions?  My Domain name does not start or end with a hyphen.  See screen shot below

User-added image
I have Field label as  Lead source which is Formula field  on Quote object .But  now the requirement is insted of formulae they require  Pick list field.So i created a new pick list field and labeld as Lead source .now i want to update all the pick list value by formula field by developer console ananymous window .how to update a record value from developer console. can any one help
I'm really struggling with Apex and the code coverage of our org.  I'm not a developer and I'm completely stuck.

We have 74% code coverage in our production org. We also have 4 Apex triggers and 15 Apex classes that are completely redundant and relate to a custom object that is never used.  We want to delete the complete object and all related code.  The Apex classes all fail so getting rid of them would bring our code coverage up to a decent level.

I can't seem to get rid of them. I can't deactivate the triggers in Sandbox and deploy them to production because code coverage is not high enough.  Plus some of our code also has 0% coverage. I've had Eclipse installed but when I try and make one of the unwanted triggers inactive I get errors:

System.QueryException:List has no rows for assignment to SObject
System:Exception:Assertion Failed
System:Exception:Assertion Failed
System:Exception:Assertion Failed
And two 'System.DmlException:Update failed' that trigger a validation rule on the Account in the production org

How do I unravel this so that I can get rid of this code?  Is there a simple way?  I can't deploy anything that requires code changes at the moment so I have to fix it somehow.

Can anyone help explain it in simple terms so that a dummy can understand it please?

Thank you.
Hi all, I am working on the Insecure Remote Site Trailhead and can't seem to get the image to display from a static resource zip file.

I am using this as my code
 
<apex:image url="{!URLFOR($Resource.Challenge_Resources,'Challenge_resources/Castle.png')}" />

Are there any steps I should take, hope it helps.
Apex Basics & Database Unit 5/5

Hello, Community, I am facing problem in solving this challenge, please advise.

Here is the criteria presented: 

With SOSL you can search against different object types that may have similar data, such as contacts and leads. To pass this challenge, create an Apex class that returns both contacts and leads that have first or last name matching the incoming parameter.

The Apex class must be called 'ContactAndLeadSearch' and be in the public scope.
The Apex class must have a public static method called 'searchContactsAndLeads'.
Because SOSL indexes data for searching, you must create a Contact record and Lead record before checking this challenge. Both records must have the last name 'Smith'. The challenge uses these records for the SOSL search.
The return type for 'searchContactsAndLeads' must be 'List<List< SObject>>'
The 'searchContactsAndLeads' method must accept an incoming string as a parameter, find any contact or lead that matches the string as part of either the first or last name and then return those records.

Error received: 

Challenge not yet complete... here's what's wrong: 
Executing the 'searchContactsAndLeads' method failed. Either the method does not exist, is not static, or does not return the expected search results.

Here is my code:

public class ContactAndLeadSearch{
    public static List<List< SObject>> searchContactsAndLead(String name)
    {
        List<List<sObject>> result=[FIND :name IN ALL FIELDS RETURNING Lead(LastName),Contact(LastName)];
                return result;
    }
}


PLEASE ADVISE...Thanks Community!!!
Choosing the profile picture in the developer community salesforce, the picture that we upload is uploading blurred.

I have tried uploading 2mb to 8mb, but still blurred.