• Michał Zadrużyński 2
  • NEWBIE
  • 55 Points
  • Member since 2016

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 19
    Replies
Hello,

I would like to migrate a visualforce page to lightning experience. i could implement it using quick action in account object but the VF page open in pop up.
Do you know if it exist a way to open vf from an record in a new page in lightning experience ?

Thanks,
Antoine  
Hi ,

I development some "framework reusable" components in a salesforce environment.

I would like to import then in a new environment.

I tried to use Force.com Eclipe plugin the following way :
- Source env project: refresh from server . Components are well downloaded.
- Source env projet: Export components as files
- Destination env project: Import components ( from export file): they well appear in the explorer
- Destination env project: Save to server

I always have the same error : unable to save resources: Filepath and/or project can not be null.

I could do hundreds of copy-pastes in the developer console but ... i'm sure there is a 3 clicks way to do that.

Please can you help me ?

Many thanks & best regards

 
Hi,

  I am creating component dynamicaly usning code as below :
 
$A.createComponent(
                "c:M",yComponent",
                {},
                function(newCmp){
                    if (component.isValid()) {
                        var content = component.find("content");
                        content.set("v.body", newCmp);
                    }
                }
            );

Now i have couple of resources placed in app as below :
 
<!-- Bootstrap -->
    <ltng:require styles="/resource/resource/lib/bootstrap/css/bootstrap.min.css"/>
    
    
    <!-- Main CSS -->
    <ltng:require styles="/resource/resource/css/font.css"/>
    <ltng:require styles="/resource/resource/css/jquery.ui.css"/>
    <ltng:require styles="/resource/resource/css/jqtransform.css"/>
    <ltng:require styles="/resource/resource/css/screen.css"/>
    
    <!-- jQuery library -->
    <ltng:require scripts="/resource/resource/js/jquery-2.1.4.min.js,/resource/resource/js/jquery-ui.js,/resource/resource/js/hammer.min.js,/resource/resource/js/jquery.tablesorter.min.js,/resource/resource/js/jquery.jqtransform.js,/resource/resource/lib/bootstrap/js/bootstrap.min.js,/resource/scriptjs" />

When the component gets created in dom it's not able to use the script.It seems while the components gets created it can not use the scripts which are already loaded as part of app load.Any help will be great .
I am a newbie in Lightning. When I try to click on "Lightning App Builder" in my settings, i get the following error:
User-added image

I have already configured My Domain and deployed in to users. Can someone please help me out with this?
I have a task to export data for about 60 Salesforce users then to edit them and import it back again. I am not allowed to use specialised web sites for data export/import where you provide user/pass because data is too sensitive. I intend to create Java client application and to use Bulk API.

Is there any way to create some kind of super user which will access data for 60 users through Bulk API?

Thank you in advance
Can sombody explain why I get 'null' in my component's controller when trying to find child component by aura:id within aura:iteration
Here are markup and controller code example:
<aura:component>
  <aura:attribute name="someObjs" type="Object[]" />
  <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    
  <div class="wrapper">
    <ui:button label="Click me" press="{!c.changeObjectTxt}" />

    <aura:iteration items="{!v.someObjs}" var="obj">
      <c:SimpleChildComponent someText="{!obj.txt}" aura:id="item_{!obj.id}" />
    </aura:iteration>
  </div>
</aura:component>
({
    doInit: function(cmp, event, helper) {
        var objs = [
                {id: 11, txt: 'First object'},
                {id: 12, txt: 'Second object'},
                {id: 13, txt: 'Third object'}
            ];
        
        cmp.set('v.someObjs', objs);
    },
    
    changeObjectTxt: function(cmp, event, helper) {
        var chCmp = cmp.find('item_12');
        
        console.log(chCmp);
    }
})


 
Hi,
                  I am creating the lightning component with a leaflet map and access via Visualforce page. In that page created the drop down with contact list. Based on list value i select what are records set the Location ( Latitude and Longitude ) the map will refresh.

I have doubt how to pass the parameter of the list values into the lightning component. Guide me how to achieve this

This Error I got Using the 'Firing Lightning Events from Non-Lightning Code ' Method:

Uncaught SecurityError: Blocked a frame with origin "https://lightnapp-dev-ed--c.ap2.visual.force.com" from accessing a frame with origin "https://lightnapp-dev-ed.my.salesforce.com". Protocols, domains, and ports must match.

My Code:
==========

<apex:page showHeader="false" controller="ContactLocatorController">
<apex:includeLightning />
<div id="lightning" >
<script>
var myExternalEvent;
if(window.opener.$A && (myExternalEvent = window.opener.$A.get("e.c:ContactsSelected"))) {
       myExternalEvent.setParams({});
       myExternalEvent.fire();
}

var visualForceFunction = function(event) {
      var EventData = event.getParam("contact");
      console.log('::::::::::',EventData);
};
$Lightning.use("c:ContactLocatorApp", function()  {
       $Lightning.createComponent("c:ContactLocator",
        { },
         "lightning",
          function(cmp) {
               $A.eventService.addHandler({ "event": "c:ContactsSelected", "handler" : visualForceFunction});
               //alert('handler test');
         });
});
</script>
<apex:form >
<apex:outputText label="You Have Selected : " value="{!selectedContact}"/>
<apex:selectList size="1" value="{!selectedContact}">
<apex:selectOptions value="{!ContactsList}" />
<!-- <apex:actionSupport event="onchange" oncomplete="function(this)"/>-->
</apex:selectList><br/>
</apex:form> </div>
</apex:page>

Advance Thanks

Hello good people.

I don't have skills in apex or anything. I am here unfortunatley because when we are capturing leads from a landing page which sends us date in the format: "02/12/2016". This doesn't go into our date field which is of date type.

We also edit/update dates ourselves.

I ended up on apex and now want a solution that when a lead is created, the date field should be checked, if it is of date type (manual entries) then ignore but if it is text "02/12/2016" then convert it to date type and assign to our date field.

What will the code for that?

Thank you alot!

Is it possible to create a MAP<Field1, Field2> directly using SOQL [SELECT Field1, Field2 from Obj_Test] without iterating over LIST returned by SOQL.

For example, if I have an Employee object and want to create a MAP<Emp_Id, Emp_Salary> by using SOQL- SELECT Emp_Id, Emp_Salary FROM Employee__c; I know we can achieve it by using for loop over List returned by SOQL and put these two fields in a map.

Can anyone please let me know if is there another way to do this?

Thanks,
Rajneesh
Were trying to create a record from Lead to Contacts where it takes all the fields off the leads and creates a Contact record with them. Were are getting this error when trying to create the record. ANY help would be much appreciated.

An error occurred at element myRule_1_A1 (FlowRecordCreate).
The flow failed to access the value for myVariable_current.clientname__r.City__c because it hasn't been set or assigned.


This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange.


Flow Details
Flow Name: Referral_to_contact
Type: Workflow
Version: 3
Status: Active


Flow Interview Details
Interview Label: Referral_to_contact-3_Lead
Current User: Suman Mothukula (005J0000005kqMv)
Start time: 2/9/2016 10:31 AM
Duration: 0 seconds


How the Interview Started
Suman Mothukula (005J0000005kqMv) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = null
myVariable_current = 00QJ000000AlO5uMAF


ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "2/9/2016 10:31 AM"



Please and thank you in advance. we are really stuck
HI,

I am new to apex and having ago at my first trigger.

We have a set of support contracts that need new opportunities each year and I would like to try and automate this so once an opporuntity is set to closed won, a new opportunity, with the type of 'renewal', creates a new opportunity and eventually a quote also...

I have tried my first trigger and test class as below and getting an error that no rows are found so think I maybe missing a select statement or somethign obvious: -

trigger NewOppAndQuote on Opportunity (After Insert, After Update) {

    List<Opportunity> ListOpp = New List<Opportunity>();
    for(Opportunity o  : Trigger.new)
    {
        If(o.Opportunity_Type__c == 'Contract Renewal' &&
           o.StageName == 'Won' &&
           o.Remaining_Opportunity_Days__c == 73) 
     {
     
     Opportunity OppNew = New Opportunity();
     OppNew.Name = 'Opportunity.Account + TODAY()';
     OppNew.StageName = 'Pipeline';
     OppNew.AccountId = o.AccountId;
     OppNew.Opportunity_Type__c = 'Contract Renewal';
     OppNew.Estimated_Value__c = 100;
     OppNew.Opportunity_Submission_Date__c = Date.TODAY();
     OppNew.CloseDate = Date.TODAY() + 365;
     OppNew.Probability__c = '80-100%';
     OppNew.Solution_Summary__c = 'Maintinence';
     OppNew.Description = 'Renewal Contract for the next financial year';
     OppNew.Outcome_Status__c = 'Bid Submission Approved';
     
         ListOpp.add(OppNew);
          }
       }
     if (listOpp.size() > 0)
     insert listOpp;
}

test class which errors no rows are found: -

@IsTest

Private Class testNewOppAndQuote {
    static testMethod void testNewOppAndQuote(){
    
    Account a = [select Id from Account];
    Opportunity o = new Opportunity();
    
    o.AccountId = a.Id;
    o.StageName = 'Pipeline';
    o.Name = 'Opportunity.Account + TODAY()';
    o.Opportunity_Type__c = 'Contract Renewal';
    o.Estimated_Value__c = 100;
    o.Opportunity_Submission_Date__c = Date.TODAY();
    o.CloseDate = Date.TODAY() + 365;
    o.Probability__c = '80-100%';
    o.Solution_Summary__c = 'Maintinence';
    o.Description = 'Renewal Contract for the next financial year';
    o.Outcome_Status__c = 'Bid Submission Approved';
    
    insert o;
    
}

}

Any help appreciated and also any useful books or sourced to learn this a bit more is also good as although this is not workingI am enjoying doing it
Thanks
  • February 09, 2016
  • Like
  • 0
Saw a similar issue, but not quite the same, so here goes.  We have a bunch of custom web forms feeding leads into SF.  We worked with a developer to make these.  Not quite straightforward as they not only include standard "Name", "Email" and "Message" fields, but also take a WooCommerce shopping cart and dump the contents into a custom SF field.

The developer we worked with went as far as getting those forms into SF as leads.  But there is no checking to see if a contact with the same email address already exists. Here's what I'd like to be able to do:
  1. A lead comes into SF from our website and is assigned by default to our Sales Manager (this happens now)
  2. SF checks to see if that email address already exists as a Contact's email address
  3. If it finds a match, it changes the Lead Owner to match the Contact owner and sends an email to that owner
We can take care of the duplicates when converting Lead to Opportunity.  Is there a way to do this? 
Ok so i am making a application that pulls up a list of Accounts and Contacts. the problem is that when i try to load the tab it goes  "We're still working on your requast.. please wait." its being doing that for 2 days now and i have gone through my components  and  there seems to be nothing  wrong in my code. does anyone have a idea why its doing that?
Hello,

Please, could you help me to determine which is the issue in this code? I am trying to update a list of records related (through a lookup field) to the object which is being modified.
 
public class HandlerResources {
    public static void handleAfterInsert(List<Resource__c> ResourceList) { 
        List <Project__c> ProjectsToUpdate = new List<Project__c>();
            for (Resource__c currentResource : ResourceList) {
                if (currentResource.Project__c != '') {
                    for (Project__c Project : currentResource.Project__c.Id) {
                    Project.Hours__c = Project.Hours__c + currentResource.Hours__c;
                	ProjectsToUpdate.add(Project);
                    }
                }
            }
        Database.update(ProjectsToUpdate);
    }
}

Thank you very much!
Jesus
Hello
I am trying to find a way to open a case each time a custom record is edited to only meet certain criteria. I have the process setup in a manner that when certain criteria is met, a case is opened - the tircky part is for a case to open only when a certain field value is changed:
For example -
  1. Order ABC is created and the necessary criteria is met - Action: Open the case. (this part works)
  2. Order ABC is modified and only irrelevant fields are changed - Action: Do not open a Case (need help)
  3. Order ABC is modified and value in field XYZ is updated - Action Open new Case (need help).
    • ​​#3 should continue to open new cases as long as the value in field XYZ is changed.
Help please!!
Hi,

I have try to sum the iteration text box values from child component into parent component. I can able to get the child values from child component via application & component events. Pls guide me how to push those child values in new array and sum it.

Parent Component:
----------------------------
<aura:component >     
    <aura:attribute name="arrvals" type="integer[]" default="1,2,3,4,5"/>    
    <aura:registerEvent name="sum" type="c:SumAppEvent"/>     
    <aura:handler name="sumres" event="c:SumCompEvent" action="{!c.sumVal}"/>
    <aura:attribute name="myResults" type="integer[]" />
    <aura:iteration var="num" items="{!v.arrvals}" aura:id="ipv" indexVar="index">
        <c:myListComponent />         
    </aura:iteration>
     
    <ui:button aura:id="addbtn" label="Calculate" press="{!c.calculate}" /><br/>
    Sum of the Value : <ui:outputNumber aura:id="totalValue" value="{!v.totalValue}" />    
</aura:component>

Parent Controller:
------------------------
sumVal : function(component, event, helper) {
            
            var txtval = event.getParam("resval");            
            console.log('got value from child',txtval);                              
            var val = component.getEvent("sum");
            val.setParams({"myResults" : txtval});
            console.log('val******',val);
            for (var total = 0, i = 0; i <txtval; i++) {
                  val.push({ value: txtval });                 
                 //total += parseInt(txtval);
            } 
            console.log('sum +++++++',val);   
        
           },                     
    
        calculate : function(component, event, helper)  {              
                $A.get("e.c:SumAppEvent").fire();                
        } , 
})

Advance Thanks
Siva
 
Hello, 
I have a requirement like this.
Create a Visualforce page:
Enter Role Id: [Input Field]
"Go" button
User enters a RoleId, and clicks on Go button. This will display the Sub Ordinate role Ids under the Role Id that was entered in the page. And the Users that are under each SubOrdinate Role.

Roles:
       RoleId1
               UserId1
               UserId2
       RoleId2
               UserId1
               UserId2
       RoleId3
               UserId1
               UserId2
Please helpme on this.

Thanks,
Niyathi
 
Hello,

I would like to migrate a visualforce page to lightning experience. i could implement it using quick action in account object but the VF page open in pop up.
Do you know if it exist a way to open vf from an record in a new page in lightning experience ?

Thanks,
Antoine