• Akansha Rangari
  • NEWBIE
  • -1 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 8
    Replies

Hi, Could you please help me written validation rule.

I'm having object 'Vehicle' which is having field 'Lock'. And there is another object name as 'CLIN' having lookup relationship to Vehicle, also there is self relationship between CLIN object.

Validation is written on 'CLIN' object. If 'Vehicle' record is locked , can not create/Update CLIN record.

Also After trigger is working on 'CLIN' object, which rollups fields to the same parent record.
Currently, I'm creating CLIN selecting self lookup relationship field and that selected CLIN's Vehicle is locked. So, when I'm creating this record I am getting validation error.

I need a validation that checks only Current CLIN's Vehicle is locked excluding the self lookup CLIN's Vehicle record is either locked or not.

Thanks in advance

Hello,
I have component where I am selecting color by color picker and I want to show the text in that selected color code without using Style tag. How to acheive this in lightning component or is there any other way to do so.

Thanks in Advance!
I have List Button of URL type when I am clicking on it , it is showing 'refused to connect' error. On URL redirection I have used lightning component and also checked for clickjack from session setting , checking and unchecking clickjack options not worked for me.

Can any one help me with this issue.
I am getting this issue in Win'21 pre release org 

 
I have overrided Standard Opportunity 'New' button with lightning component for Mobile and Lightning Override when I am creating New Opportunity from Account relatedlist and getting the URL in doinit of my component
I am unable to get Parent Account Id in the URL. 

For Desktop it's working fine but it's not working for Salesforce 1 Mobile App.  Is there any way to get Parent id in salesforce 1 Mobile App.

Thanks in Advance!
I have overrided Standard Opportunity 'New' button with lightning component for Mobile and Lightning Override when I am creating New Opportunity from Account relatedlist and getting the URL in doinit of my component
I am unable to get Parent Account Id in the URL. 

For Desktop it's working fine but it's not working for Salesforce 1 Mobile App.  Is there any way to get Parent id in salesforce 1 Mobile App.

Thanks in Advance!
I am using http callouts to get data its working fine and giving status code 'OK' while executing from anonyms window but not working in apex class its giving error 401 status code and unauthorize.
I need override action details like component/vf page name or id on standrad button in apex. 
I have overrided Standard Opportunity 'New' button with lightning component for Mobile and Lightning Override when I am creating New Opportunity from Account relatedlist and getting the URL in doinit of my component
I am unable to get Parent Account Id in the URL. 

For Desktop it's working fine but it's not working for Salesforce 1 Mobile App.  Is there any way to get Parent id in salesforce 1 Mobile App.

Thanks in Advance!
I have overrided Standard Opportunity 'New' button with lightning component for Mobile and Lightning Override when I am creating New Opportunity from Account relatedlist and getting the URL in doinit of my component
I am unable to get Parent Account Id in the URL. 

For Desktop it's working fine but it's not working for Salesforce 1 Mobile App.  Is there any way to get Parent id in salesforce 1 Mobile App.

Thanks in Advance!
I have written my own custom lead conversion by adding separate button and its working fine, but from lead status path button it is still working as default. I want to remove this "convert" option from the lead status path. Please suggest me to resolve the issue.

I have a hierarchy lightning component and I'm using https://github.com/dabeng/OrgChart as a static resource to generate the hierarchy chart.  For the most part it works great.  However I am running into an issue with drag and drop functionality that I can't seem to figure out.  That library has a section of code to generate a drag image when the user has panned the chart due to some older browsers (and Safari) not handling the transform correctly.  The problem is that when used in a lightning component on Salesforce it throws an error.  It seems like dataTransfer.setDragImage(img, xOffset, yOffset) doesn't work.  I even tried simplifying the code in the library to one of the most basic examples in this tutorial and was still running into issues.  The error I keep seeing is "[Argument 1 ('image') to DataTransfer.setDragImage must be an instance of Element]" however if I debug and look at the element that it's trying to use everything seems fine with it.  Does anyone know if something in Locker Service is interfering with this or have any ideas what else may be going on?

Here's the function that is having issues:

createGhostNode: function (event) {
      var $nodeDiv = $(event.target);
      var opts = this.options;
      var origEvent = event.originalEvent;
      var isFirefox = /firefox/.test(window.navigator.userAgent.toLowerCase());
      if (isFirefox) {
        origEvent.dataTransfer.setData('text/html', 'hack for firefox');
      }
      var ghostNode, nodeCover;
      if (!document.querySelector('.ghost-node')) {
        ghostNode = document.createElementNS("http://www.w3.org/2000/svg", "svg");
        ghostNode.classList.add('ghost-node');
        nodeCover = document.createElementNS('http://www.w3.org/2000/svg','rect');
        ghostNode.appendChild(nodeCover);
        $nodeDiv.closest('.orgchart').append(ghostNode);
      } else {
        ghostNode = $nodeDiv.closest('.orgchart').children('.ghost-node').get(0);
        nodeCover = $(ghostNode).children().get(0);
      }
      var transValues = $nodeDiv.closest('.orgchart').css('transform').split(',');
      var scale = Math.abs(window.parseFloat((opts.direction === 't2b' || opts.direction === 'b2t') ? transValues[0].slice(transValues[0].indexOf('(') + 1) : transValues[1]));
      ghostNode.setAttribute('width', $nodeDiv.outerWidth(false));
      ghostNode.setAttribute('height', $nodeDiv.outerHeight(false));
      nodeCover.setAttribute('x',5 * scale);
      nodeCover.setAttribute('y',5 * scale);
      nodeCover.setAttribute('width', 120 * scale);
      nodeCover.setAttribute('height', 40 * scale);
      nodeCover.setAttribute('rx', 4 * scale);
      nodeCover.setAttribute('ry', 4 * scale);
      nodeCover.setAttribute('stroke-width', 1 * scale);
      var xOffset = origEvent.offsetX * scale;
      var yOffset = origEvent.offsetY * scale;
      if (opts.direction === 'l2r') {
        xOffset = origEvent.offsetY * scale;
        yOffset = origEvent.offsetX * scale;
      } else if (opts.direction === 'r2l') {
        xOffset = $nodeDiv.outerWidth(false) - origEvent.offsetY * scale;
        yOffset = origEvent.offsetX * scale;
      } else if (opts.direction === 'b2t') {
        xOffset = $nodeDiv.outerWidth(false) - origEvent.offsetX * scale;
        yOffset = $nodeDiv.outerHeight(false) - origEvent.offsetY * scale;
      }
      if (isFirefox) { // hack for old version of Firefox(< 48.0)
        nodeCover.setAttribute('fill', 'rgb(255, 255, 255)');
        nodeCover.setAttribute('stroke', 'rgb(191, 0, 0)');
        var ghostNodeWrapper = document.createElement('img');
        ghostNodeWrapper.src = 'data:image/svg+xml;utf8,' + (new XMLSerializer()).serializeToString(ghostNode);
        origEvent.dataTransfer.setDragImage(ghostNodeWrapper, xOffset, yOffset);
      } else {
        origEvent.dataTransfer.setDragImage(ghostNode, xOffset, yOffset);
      }
    }


I also tried simplifying it down to this code and it still throws the same error:

createGhostNode: function (event) {
      var $nodeDiv = $(event.target);
      var origEvent = event.originalEvent;
      var ghostNode = document.createElement('img');
      ghostNode.classList.add('ghost-node');
      ghostNode.setAttribute('width', 50);
      ghostNode.setAttribute('height', 50);
      ghostNode.setAttribute('background-color', 'red');
      $nodeDiv.closest('.orgchart').append(ghostNode);
      origEvent.dataTransfer.setDragImage(ghostNode, 0, 0);
    }
I am verifying Lightning Components Basics Trailhead and getting thsi error in first challenge. I have verified that all fields are created properly and have all permissions for system admin. Please help