• Pradeep Kumar 213
  • NEWBIE
  • 10 Points
  • Member since 2016
  • Salesforce Developer
  • Infopine

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 0
    Replies
Hi,
  Can anyone help me in getting the drag and drop work in lightning app? I have put div elements withing which I have image elements. I am able to drag and drop the image. But what I want is when I drag and drop one image on other, those two images should get swapped. I have written the javascript code to make work. But I am getting Error as Access Denied.
<div ondrop="{!c.drop}" ondragover="{!c.allowDrop}" id="{!v.appItem.label+'div'}">
<p ondragstart="{!c.drag}" draggable="true" id="{!v.appItem.label}">
<img src="{!v.appItem.logoURL}"  alt="{!v.appItem.altText}" id="{!v.appItem.label+'img'}"/>
</p>
</div>
 
"drag": function(cmp, event, helper){
        var source_paraid = document.getElementById(event.target.id).parentElement.id;
        var sourceHTML = document.getElementById(source_paraid).parentElement.innerHTML;
        var source_divid = document.getElementById(source_paraid).parentElement.id;
        event.dataTransfer.setData("html", sourceHTML);
        event.dataTransfer.setData("divid", source_divid);
    },
    "allowDrop": function(cmp, event, helper){
        event.preventDefault();
    },
    "drop": function(cmp, event, helper){
	event.preventDefault();
    var sourceDivId = event.dataTransfer.getData("divid");
    var target_paraid = document.getElementById(event.target.id).parentElement.id;
    var targetDivId = document.getElementById(target_paraid).parentElement.id;
    var targetObj = document.getElementById(target_paraid);
    var sourceObj = document.getElementById(sourceDivId).children;
    document.getElementById(targetDivId).removeChild(targetObj);
    document.getElementById(targetDivId).appendChild(sourceObj);
    document.getElementById(sourceDivId).removeChild(sourceObj);
    document.getElementById(sourceDivId).appendChild(targetObj);
    }


I am getting that error when I use appendChild method.Error

Please help me out. 

Thanks in advance

We want to Display the report charts in Community pages. 
For that we are using <analytics:reportChart > Component in the VF page. 
In the community page we have added vf page. We are able to access this page as a admin. 
But when we are trying to access this Vf page as Community Plus User we are getting permission issue  As 'You need access to the source report type to view this report chart.'
Note : 1. Reports are present in Custom folder and shared this folder to community users.
       2. Made all the necessary settings in profile and permission sets.

Please advise me what settings needs to be done.

Thanks in advance.
User-added image
Hi I am new to salesforce platform. I am trying to do some new things in Lightning express. I have solved few of the trailheads. I know how to add custom tabs to salesforce1 navigation menu. I just want to know can I add more tabs next to Related and Details tab as shown in the figure. New tab I have highlighted using Red Circle.