• mohith_shrivastava
  • SMARTIE
  • 645 Points
  • Member since 2011
  • Salesforce MVP
  • CodeScience


  • Chatter
    Feed
  • 22
    Best Answers
  • 0
    Likes Received
  • 3
    Likes Given
  • 3
    Questions
  • 224
    Replies
What is the recommended approach by Salesforce for mobile application authentication?
 - SAML based authentication?
 - OAuth User-Agent flow?
 - OAuth Username-Password Flow?
 - Session Id flow?

Here is my understanding:
SAML seems out question, because it involves identity provider and in most cases we don't utilize an ID provider.

In User-Agent flow we need a connected app and don't have to provide password at all and access token is sent to pre-defined callback URL. Which is not happening in all of the mobile applications available, such Salesforce1.

Salesforce1 app seems close to OAuth Username-Password Flow but we don't have to provide security token. We can login to any instance with a valid username and password and our IP is not white listed either. How can we authenticate without a security token? I believe there is a browser plugin running in the Salesforce1 app and we have to tap 'Allow' access after login and have to provide verification code as well (one time only). Tapping 'Allow' and verification code is alternative to security token?

I don't know anything anout session Id flow and didn't find any details.

I am NOT looking for code, just a general opinion about the best approach from the four option above.

Thanks in advance.

Usman
I have the following method returning a changed owner id when a person selects a new value from lightning component. I want to use this ownerId in a method of some other class. The value of the ownerId is available in this method. I am unable to use this return ownerId in a different class. It looks trivial but I don't know how to do it.
    @AuraEnabled
    public static Id getNewRecordOwner(Id ownerId) 
    { 
        System.debug('The value of Owner ID'+ownerId);
        
        leadConvertController lctr = new leadConvertController(ownerId);
        lctr.ownerIdChanged=ownerId;

        return ownerId; 
    }
How can I conditionally render a lightning component/app in my VF page based on a button click ? I have a lightning lookup component which I want to render when I click a search button on my VF page.
I am going through the premiere online course for Lightning Components right now and saw something I was curious about.  

The particular module that I am watching is showing how tag attributes can by dynamically set using expression syntax.  Nothing ground breaking there but what I found interesting was at instead of using a standard IF statement it used a ternary IF statment.  At first I thought it was just a style preference by the developer who wrote the example, but I am also curious if there is some sort of efficiency gain in the lightning framework by doing so.  

Basically he used:
class="{!(v.expenseSum != v.approvedSum ? 'alert-danger' : 'alert-success')}

Instead of:
class="{! IF(v.expenseSum != v.approvedSum , 'alert-danger' , 'alert-success')}

I totally understand they are the exact same thing, but from an efficiency standpoint is there any benefit to doing it this way? 
Hi,

Can you please give me a technical difference for using Lightning over Angular. What are the pros and cons in each of the implementaion and How is lighting different from angular. 

I am not looking for general difference like lighinging is new and angular is tested etc., but more technical understanding of how lightning makes it easier compared to the same implementation done in Angular. what feature do we have in lightning componenets that are not in Angular etc., 

Any insight on this will be really helpful. Thanks!
Hi Hive,

I am using Salesforce Communities (Napili template) and created a custom Community page for custom use

I want to have a page with some parameters as standard topic detail page having  (/topic/:topicId/:topicName) 

I want my page url to be like /customPage/:param1/:param2, but while creating page there is no option to set parameters.

Is there any way or work around for it ?

I already tried by setting  query parameters (/customPage?param1=value&param2=value) through javascript and read it in controller js but in this case these parameters are always there, they are not going away when we navigate to any other pages.
Hi  Folks,

I am new to this salesforce  as am trying to  work on trailhead project Battle Station App

Then   in the process flow  while i am creating the  Post to Chatter step then  its not showing select This Record. Its showing only user and chatter Group.  Pleae help me out   to solve this problem.

 
In a lightning component, I am trying to use the values in 1 array to set the values for a field in a second array. But for whatever reason I always end up with the last value of my array as the field value.

Here is the component:
<aura:attribute name="spaceTypeList" type="string[]" default="Conference/Focus Room,Copy Area,Kitchenette,Loading Dock,Electrical Room,Exterior Building,Janitorial Closet,Mothers Room,Office Area,Parking Garage,Restrooms/Locker Rooms,Stairs/Elevators,Carpet Spots/Vacuuming/Flooring,Lobbies/Corridors"/>
    <aura:attribute name="detailRecord" type="Inspection_Area_Detail__c" 
                        default="{'Inspection_Area__c':'',
                                 'Space_Subset__c':'',
                                 'Rating__c':'0',
                                 }"/>
    <aura:attribute name="detailList" type="Inspection_Area_Detail__c[]"/>
    
    <ui:button label="loop test" press="{!c.loop}"/>
    
    <aura:iteration items="{!v.detailList}" var="det">
        <p> Space {!det.Space_Subset__c}</p>
    </aura:iteration>



And here is the controller:

    
({
        loop: function(component, event, helper) {
            
            var spaceList = component.get("v.spaceTypeList");
            var detail = component.get("v.detailRecord");
            var List =component.get("v.detailList");
            
            for(i in spaceList){
                var space =spaceList[i];
                detail.Space_Subset__c = space;
                console.log("detail space subset "+detail.Space_Subset__c);
                List.push(detail);
                
            }
            component.set("v.detailList",List);
            
        },
    })





Thank you for your help.
HI, i've a problem to complete the "Build a Conference Management App", pat Creating Apex triggers. All steps are completed, functionaltiy works as it should be, but receives this error.

Step not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, The speaker is allready booked at that time: [] 
Note: you may run into errors if you've skipped previous steps.

What I'm doing wrong ?
Hey Guys,
I am trying to implement google map using lighting. I really don't have much idea about lighting.
My requirement is to show all nearby accounts on google map. 

Apex Class

public class accController { 
    @AuraEnabled
    public static List<Account> getAccounts() {
        return [select id, Account.BillingStreet, Account.BillingPostalCode, Account.BillingCity,sandbox__Geolocation__Longitude__s,sandbox__Geolocation__Latitude__s, Account.BillingState, Account.BillingCountry from Account where sandbox__Geolocation__Latitude__s != null];
 
    }
 
}
 
Component 

<aura:component implements="force:appHostable" controller="accController">
 
    <ltng:require styles="/resource/leaflet/leaflet.css" />   
    <ltng:require scripts="/resource/leaflet/leaflet.js"
             afterScriptsLoaded="{!c.jsLoaded}" />
 
    <div class="map" id="map"></div>
 
</aura:component>
 
Controller 

({
jsLoaded: function(component, event, helper) {
    debugger;
    var accs = component.get("c.getAccounts");
                debugger;
    accs.setParams({
        "sandbox__Geolocation__Longitude__s": component.get("v.sandbox__Geolocation__Longitude__s")
    });
    debugger;
    setTimeout(function() {

/*Not Working-- this line */
        // var map = L.map('map', {zoomControl: false}).setView([sandbox__Geolocation__Longitude__s,sandbox__Geolocation__Latitude__s], 14);
       
var map = L.map('map', {zoomControl: false}).setView([25.509637,71.091645], 14);
        L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}',
            {
                attribution: 'Tiles © Esri'
            }).addTo(map);
 
        // Add marker
        L.marker([sandbox__Geolocation__Longitude__s,sandbox__Geolocation__Latitude__s]).addTo(map)
            .bindPopup('Simplion Technologies Pvt Ltd');
        });
}
})
 
The problem I am facing is to get dynamic longitude and latitude values from account object. As you can see I have commented out the line. 
If I hardcode the longitude (i.e. 25.509637) and latitude (i.e. 71.091645) values then it works fine for me. 
So I want to make this dynamic. So that it takes automatically longitude and latitude value from the account records.
If anyone can help me on this or give some ideas. It will be really helpful.
 
 
 
  • July 10, 2015
  • Like
  • 0
Hi,

I'm wondering if I made a connection through Lightning connect if I could use that to provide the products that people could pick from in an opportunity.

Is this possible?]

Thanks

I'm working on My First REST Service (soon to be released), leveraging all of the howTo's that I can find, starting with Apex REST Basic Code Sample.

I created the MyRestResource class using the example, brought up curl, and was stopped abruptly on this line:

  • Replace sessionId with the <sessionId> element that you noted in the login response.

There isn't anything preceding this line ^ that describes how to get that initial login response that contains the session Id.

 

Trying a different tack, I reviewed the article Setting Up Authentication with OAuth 2.0, installed the OAuth Playground, and set up the Connected App with the OAuth settings that would be used to access my service.

 

Can someone point me to

  1. An Apex code sample for a method that can access an Apex REST service, using the Consumer Key and Secret (or whatever their OAuth 2.0 labels are now) created in the Connected App
  2. An Apex code sample (if different from 1., above ^) that can retrieve and make use of the sessionId described in the REST Basic Code sample
  3. The Salesforce Request Token URL (for the OAuth Playground)
  4. The Salesforce Access Token URL (for the OAuth Playground)

Any and/or all of the above will be greatly appreciated.

 

Thanks!

 

Duncan

(initially posted under Apex -- moving to API discussion thread)

Hi,

 

I want to notify the case owner whenever a new case comment is being added to the case through a Site that has login enabled for customer portal users. Salesforce has a Support Setting for this particular feature which seems to work when we create case comments normally but not through apex code.

 

Can anyone tell me why this isn't working?

Hi 

 

I am playing around with the streaming api and am looking for some documentation on how to update a pushtopic and delete a pushtopic. I am having a little difficulty finding the right info. Any info would be appreciated. 

 

Thanks

Hi,

          I have a problem with Json parsing and getting a particular value.Please help me how to get. First time I am working on this Json in salesforce.

 

In my controller I wrote a code like this

 

 

string url='http://maps.googleapis.com/maps/api/distancematrix/json?origins='+EncodingUtil.urlEncode(add1,'UTF-8')+'&destinations='+EncodingUtil.urlEncode(add2,'UTF-8')+'&mode=driving&language=en&sensor=false&units=imperial';
Http h = new Http();
HttpRequest req = new HttpRequest();

req.setHeader('Content-type', 'application/x-www-form-urlencoded');
req.setHeader('Content-length', '0');
req.setEndpoint(url);
req.setMethod('POST');

HttpResponse res = h.send(req);
String responseBody = res.getBody();

JSONParser parser =System.JSON.createParser(responseBody);

 

// Here I am unable to parse and get the values using Json.
while (parser.nextToken() != null) {
if ((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&
(parser.getText() == 'text')) {
System.debug('##########'+parser.getText());
parser.nextToken();

}
}

 

=============================================

In Response Body I am getting the Output of Json Like

 

{
"destination_addresses" : [ "Vijayawada, Andhra Pradesh, India" ],
"origin_addresses" : [ "Hyderabad, Andhra Pradesh, India" ],
"rows" : [
{
"elements" : [
{
"distance" : {
"text" : "173 mi",
"value" : 278118
},
"duration" : {
"text" : "4 hours 33 mins",
"value" : 16386
},
"status" : "OK"
}
]
}
],
"status" : "OK"
}

 

 

From the above I have to get the Distance --Text value i.e '173 mi'

 

How to get the Distance value.Can any one Guide me please.

  • February 19, 2013
  • Like
  • 0

hi,

I have following error , my org id is 00Db0000000IqV1,Please let me know ,how to activate ,and its develper edition 

 

Error: call to URL https://eu2.salesforce.com/services/data/v20.0/sobjects/Account/ failed with status 403, response [{"message":"The REST API is not enabled for this Organization.","errorCode":"API_DISABLED_FOR_ORG"}],

We use EmailToCase and are looking to enhance it a bit. Each account has a specific technical consultant assigned to it and they are supposed to handle Tier 1 support for the account, so we would like the case to be owned by them as soon as it is submitted. It seems that the only way of accomplishing this is via an Apex trigger, which I've been trying to write for the past couple of days. I've successfully written one previously and this one seems conceptually simple, but there seem to be some nuances that I'm just not getting. My rudimentary stab at it currently looks like this:

 

trigger AssignTechnicalConsultantToCase on Case (before insert) {
	for (Case c : trigger.new) {
		if (c.AccountId != null) {
			c.Owner = [SELECT Technical_Consultant__c FROM Account WHERE Id =: trigger.new[0].AccountId];
		}
	}	
}

 The current problem (aside from the whole approach possibly being completely wrong) is with the query. I've tried multiple iterations, none of which have compiled without an error of some sort, the latest of which doesn't even make sense to me:

 

Save error: Illegal assignment from LIST<Account> to SOBJECT:Name

I had been trying to reference the "Name" field on account and that error sort of made sense then, but now I don't know what it's trying to tell me. Technical_consultant__c is a lookup field to User on Account.

 

I also question whether this can be a "before insert" trigger -- does the account for EmailToCase cases get looked up before insert, or is it a post insert operation? Obviously if the account hasn't been assigned until after the case is inserted then I'll have to change the trigger type and I'll have more work to do. I'm going to keep pounding my head against this today, but if anyone can offer any suggestions on just how completely wrong I am, I'd appreciate it.

 

Thanks,

Matt

i  create one new custome setting (JobApplication).Any Possible way to create  trigger & Workflow  for custom setting .

Hi Team,

 

I have an issue while updating the User record.

 

Scenario: When a new User is created or updated with ProfileId =00eE0000000MyhV then a new record should be created in Custom__c object with User__c(Lookup)= New/Updated user id.

 

Condition: No duplicate User records should be created in Custom__c object.

 

The below trigger works when a new User is created but when a user is updated with new Profile (00eE0000000MyhV), I get this error message:

 

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger CreateNewCustomRecord caused an unexpected exception, contact your administrator: CreateNewCustomRecord: execution of BeforeUpdate caused by: System.DmlException: Insert failed. First exception on row 0; first error: MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): Custom__c, original object: User: []: Trigger.CreateNewCustomRecord: line 12, column 1

 

 

trigger CreateNewCustomRecord on User (After insert, After update) {
        for(User us : Trigger.new)
        {
           if(us.IsActive==TRUE && us.profileId == '00eE0000000MyhV')
           {
                    List<Custom__c> CountRec=[Select id from Custom__c where User__c=:us.id ];
                     if(CountRec.size() <1)
                     {
                         try
                         {
                             Custom__c CreateRec=new Custom__c(Name=''Test Record,User__c=us.id );
                             insert CreateRec;
                         }
                         catch(Exception ex)
                         {
                             throw ex;
                         }
                     }
           }
        }
}

 

Thanks,

Madhan Raja M

 

Hi There is a dropdown values in which user slects any of the drop down value and hit search button and the values will be displayed. I am writing my code to get the user information whenever a user hits the search button for reporting purpose.
For the first time when a user selects a value from the drop down and hit search button my code is working fine. For the second time on the same page when the user hits the search button it is throwing the error. If i refresh the page and do the search it is working. Here is the error it is throwing. i am pasting the code. Please have a look and apprepiate your help.
Record ID: cannot specify Id in an insert call
Apex controller.
public String getSearchColumnNames(String strName){
if(strName.equals('GAN')) return 'GAN__c';
searchreport();
if(strName.equals('BTN')) return 'BTN_Phone__c';
searchreport();
if(strName.equals('Order Number')) return 'BTN_Phone__c';
searchreport();
if(strName.equals('Trouble Ticket Number')) return 'BTN_Phone__c';
searchreport();
if(strName.equals('Circuit ID')) return 'Circuit_id__c';
searchreport();
if(strName.equals('CLLI')) return 'CLLI__c';
if(strName.equals('Product')) return 'BTN_Phone__c';
if(strName.equals('USI')) return 'BTN_Phone__c';
if(strName.equals('Summary Master TN')) return 'Summary_master_phone__c';
searchreport();
if(strName.equals('Customer Name')) return 'Name__c';
searchreport();
if(strName.equals('WTN')) return 'WTN__c';
searchreport();

return null;
}
public PageReference searchReport() {

if(linkSelected != null && linkSelected != '') {
system.debug('###### '+linkSelected);
tool.Search_by_BTN__c = 'linkselected';
}

if(strSearchByValue != null && strSearchByValue != '')
{
if(strSearchByValue.equals('BTN')){
tool.Search_by_BTN__c = 'Search By BTN';
}

else if(strSearchByValue.equals('GAN')) {
tool.Search_by_BTN__c = 'Search By GAN';
}
else {
tool.Search_by_BTN__c = strSearchByValue;
}
if(strSearchByValue.equals('Summary Master TN')){
tool.Search_by_BTN__c = 'Search by Summary Master TN';
}
if(strSearchByValue.equals('customer Name')){
tool.Search_by_BTN__c = 'Search by Customer Name';
}
if(strSearchByValue.equals('WTN')){
tool.Search_by_BTN__c = 'Search by WTN';
}
if(strSearchByValue.equals('Circuit ID')){
tool.Search_by_BTN__c = 'Search by Circuit ID';
}
if(strSearchByValue.equals('Order Number')){
tool.Search_by_BTN__c = 'Search by Order Number';
}
if(strSearchByValue.equals('Trouble Ticket Number')){
tool.Search_by_BTN__c = 'Search by Trouble Ticket Number';
}

}
system.debug('###### '+tool.Search_by_BTN__c);
cnt = [SELECT COUNT() FROM Users_of_Tool__c WHERE User_Record_Id__c = :Userinfo.getUserId()];

if(cnt == 0) //not existing yet
{
ulist.add(new Users_of_Tool__c(User_Record_Id__c = Userinfo.getUserId()));
try{
Database.SaveResult saveResult = Database.Insert(uList[0], false);

System.debug('************* New List_of_User__c Id: ' + saveResult.getId());

tool.Users__c = saveResult.getId();
insert tool;


}catch(System.DMLException de){
System.debug('************insert of new tools used to NEW user FAILED:'+'\n'+ de.getMessage());
}
}else{
//get the current user record Id
uList = [SELECT Id, User_Record_Id__c FROM Users_of_Tool__c WHERE User_Record_Id__c = :Userinfo.getUserId() Limit 1];
tool.Users__c = uList[0].Id;
try{
insert tool;
update uList[0];

}catch(System.DMLException de){
System.debug('************insert of new tools used to EXISTING user FAILED: '+'\n'+ de.getMessage());
}
}
return null;
}

Here is the vf page
<apex:outputLink target="_blank" onclick="callCon('DST');" value="https://www3.onlinefinancialdocs.com/tf/FANMedia?tx=Startup&cz=c060413270517141319080417&cmd=logon_&doctype=list&qta=verify">DST</apex:outputLink>

<apex:outputLink target="_blank" value="https://www3.onlinefinancialdocs.com/tf/FANMedia?tx=Startup&cz=c060413270517141319080417&cmd=logon_&doctype=list&qta=verify">DST</apex:outputLink>-->
<apex:actionFunction name="callCon" onComplete="callCon1();">
<apex:param name="firstParam" value="" assignTo="{!linkSelected}"/>
</apex:actionFunction>
<apex:actionfunction name="callCon1" action="{!searchReport}"/>

https://developer.salesforce.com/trailhead/visualforce_mobile_salesforce1/visualforce_mobile_salesforce1_layouts_cards

I am working on above challenge and code is working in my org and is as below
 
<apex:page standardController="Opportunity"> <apex:outputText value="{!IF(Opportunity.StageName="Prospecting", 'Teststs', IF(Opportunity.StageName="Proposal/Price Quote", 'Teststs', IF(Opportunity.StageName="Proposal/Price Quote", 'Teststs', IF(Opportunity.StageName="Proposal/Price Quote", 'Teststs','Teststs'))))}"/> </apex:page>


I am getting an error as below 

User-added image

Let me know if i am doing anything wrong .
I am attempting challenge in trialhead 

https://developer.salesforce.com/trailhead/lightning_components/lightning_components_events_handle

I am gettting below error 

User-added image

I checked my code and I have tags properly written as below
 
<aura:component >
    <aura:registerEvent name="phevent" type="mohrcks:PhoneNumberEvent"/>
    <ui:inputPhone aura:id="phone" label="phone" />
    <ui:button label="Show Phone" press="{!c.send}"/>
</aura:component>
Also for output I have handler defined as well
 
<aura:component >
    <aura:attribute name="number" type="String" default="No Phone Number"/>
    <ui:outputText aura:id="phone" value="{!v.number}"/>
    <aura:handler event="mohrcks:PhoneNumberEvent" action="{!c.answer}"/>
</aura:component>

My events that is created is as follows
 
<aura:event type="APPLICATION" description="Event template">
    <aura:attribute name="phone" type="String"/>
</aura:event>

My handler ctrl class for input is as below
({
	send : function(component, event, helper) {
		var phone = component.find("phone").get("v.value");
        console.log(phone);
        $A.get("event.mohrcks:PhoneNumberEvent").setParams({
            phone: phone
       }).fire();
	}
})

For output My handler class is 
 
({
	answer : function(component, event, helper) {
		var text = event.getParam("phone");
        component.set("v.number", text);
	}
})

I am able to see this working in my org ,I still get the issue as seen below

User-added image

Is this is a bug in Trailhead ?


 
Hello All,

I tried submitting my work by clicking Check Challenge on "Trialhead" with my developer edition .It keeps spinning and dont show success or dont allocate any points .Is this a bug ?

Thanks
What is the recommended approach by Salesforce for mobile application authentication?
 - SAML based authentication?
 - OAuth User-Agent flow?
 - OAuth Username-Password Flow?
 - Session Id flow?

Here is my understanding:
SAML seems out question, because it involves identity provider and in most cases we don't utilize an ID provider.

In User-Agent flow we need a connected app and don't have to provide password at all and access token is sent to pre-defined callback URL. Which is not happening in all of the mobile applications available, such Salesforce1.

Salesforce1 app seems close to OAuth Username-Password Flow but we don't have to provide security token. We can login to any instance with a valid username and password and our IP is not white listed either. How can we authenticate without a security token? I believe there is a browser plugin running in the Salesforce1 app and we have to tap 'Allow' access after login and have to provide verification code as well (one time only). Tapping 'Allow' and verification code is alternative to security token?

I don't know anything anout session Id flow and didn't find any details.

I am NOT looking for code, just a general opinion about the best approach from the four option above.

Thanks in advance.

Usman
HI,
I have a simple requirement, get a list of custom object records from client side controller and display it on the page. Below is my code

I have a wrapper object created and used in the component attribute as type.

Wrapper Class:
public class DemoWrpClass {
    
    @AuraEnabled 
    public String compName;
    
    @AuraEnabled
    public String compType;
    
    public DemoWrpClass() {
    }
    
}

Component:
<aura:component >
    <aura:attribute name="items" type="DemoWrpClass[]" />
    
    <ui:button label="Press" press="{!c.onPress}" />
    
    <aura:iteration items="{!v.items}" var="item">
        <p>{!item.compName}</p>
        <p>{!item.compType}</p>
        <br />
    </aura:iteration>
    
</aura:component>

Controller:
({
    onPress : function(component) {
        var items = [];
        for(var i=0;i<5;i++){
            var item = [];
            item.compName = "Name"+i;
            item.compType = "Type"+i;
            items.push(item);
        }
        component.set("v.items", items);
    }
})

I am the getting the result when Locker Service is disabled, below is the image
Expected Output
But when the Locker service is enabled I am not getting any output, result is blank. Through Lightning CLI I got to know the error is Invalid SecureWindow API, now I dont understand how to implement SecureWindow in my code here. I want the expected output when Locker service is enabled. Please help. Thanks in advance.
Hi All,

How to deploy the Lightning components and Lightning Pages(Inside Community Builder) from Sandbox to Prod ?

Thanks & Regards
Abhilash

 
I have the following method returning a changed owner id when a person selects a new value from lightning component. I want to use this ownerId in a method of some other class. The value of the ownerId is available in this method. I am unable to use this return ownerId in a different class. It looks trivial but I don't know how to do it.
    @AuraEnabled
    public static Id getNewRecordOwner(Id ownerId) 
    { 
        System.debug('The value of Owner ID'+ownerId);
        
        leadConvertController lctr = new leadConvertController(ownerId);
        lctr.ownerIdChanged=ownerId;

        return ownerId; 
    }
How to navigate between Lightning components and pass value between them? Please explain with example.
I develop managed package, and I pack lightning page and lightning components into package. I have Mydomain established. It uploads successfully, but when I install it in target org, I get an error:
(MyLightningPage) Validation Errors While Saving Record(s) There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "We couldn't retrieve the Mymanespace:Mycomponent component in the main region.".
I can install package with lightning page without that Mycomponent successfully. Component has only two inputs and button and it sends and receives data from Apex controller.
In development org component works absolutely alright.
How can I conditionally render a lightning component/app in my VF page based on a button click ? I have a lightning lookup component which I want to render when I click a search button on my VF page.
I am going through the premiere online course for Lightning Components right now and saw something I was curious about.  

The particular module that I am watching is showing how tag attributes can by dynamically set using expression syntax.  Nothing ground breaking there but what I found interesting was at instead of using a standard IF statement it used a ternary IF statment.  At first I thought it was just a style preference by the developer who wrote the example, but I am also curious if there is some sort of efficiency gain in the lightning framework by doing so.  

Basically he used:
class="{!(v.expenseSum != v.approvedSum ? 'alert-danger' : 'alert-success')}

Instead of:
class="{! IF(v.expenseSum != v.approvedSum , 'alert-danger' , 'alert-success')}

I totally understand they are the exact same thing, but from an efficiency standpoint is there any benefit to doing it this way? 
Hi Hive,

I am using Salesforce Communities with Napili Template and have requirement to configure Header search component (Search Publisher) to work globally ALWAYS even if I am any topic detail page suggestion box should return exact same result as it returns when we are on Home page.

We have configurable property named as "Topic ID" for Search Result page (will appear after clicking on Search button) but did not find it for Header Search Publisher component which shows suggestions before clicking on Search Button.

Is there something I can do by configuration ?
I have Created a lightning application , we don't have provision for lightning application Tab in both lightning and classic view so how can i make this app in use ....................
We are experiencing an issue where transcripts are not being saved to our salesforce org.  The chat functionality is working, but when the chat ends, the transcript is not appearing in the case related list.  This was working before 2/29, but just stopped working on all chat cases.  We do have a trigger on the chat transcript object and on the same day the chat transcripts stop being created we were getting a Apex error email 

Subject: Developer script exception from xxxxxx : LiveChatTranscriptTrigger : LiveChatTranscriptTrigger: execution of AfterInsert caused by: System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact salesforce.com about custom indexing. Even if a field is indexed a filter might still not be selective when: 1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times) Trigger.LiveChatTranscriptTrigger: line 20, column 1

 
Hi,

Can you please give me a technical difference for using Lightning over Angular. What are the pros and cons in each of the implementaion and How is lighting different from angular. 

I am not looking for general difference like lighinging is new and angular is tested etc., but more technical understanding of how lightning makes it easier compared to the same implementation done in Angular. what feature do we have in lightning componenets that are not in Angular etc., 

Any insight on this will be really helpful. Thanks!
Hi,
What is the process for Enable Additional SalesforceFeatures (multi currency)for the the Developer Edition?
Bachir
Our Salesforce communities website has different hubs for each of our teams. Aside from the featured topics, each team has a separate Page. I would like to use a similar Feed function as if it was a topic page on these pages. I would create a Topic for the team, and have that Feed pull from the material tagged on that Topic. 

For example, "Training" is one of the pages. I would like a feed with issues and articles that will pull from a Topic that would be created with the same name. How is this possible? When using the new "Feed" lightning component, do I just need to enter in a certain ID in the RecordID section? 

Thanks! 
In my Lightning component a list of Custom Object records are fetched and being displayed on the component. After editing some of the records and sending back the same list to the Update function in apex controller. The call is not getting initiated. It is throwing some error "Unable to read sObject" in the browser console.

The type of return value in first function to get records, type of attribute in component, and the type of parameter in Apex update function are all the same (custom object). Name-space also is added as required.

The same code was working perfectly before Spring '16 release. Any thoughts are welcome.
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 keep getting: Challenge Not yet complete... here's what's wrong:
The validation rule does not reference the 'IsClosed' and 'CloseDate' fields correctly. Take a look at the requirements again.

When I test the formula it seems to work as the requirements indicate yet it does not pass the validation from trailhead. Here is the formula: AND( NOT(IsClosed) ,  CloseDate < TODAY() )
It is placed on the CloseDate field.
Hi,

We're trying to use Lightning Connect for a project that uses Analytics Engine and the Journey Engine but our data source does not support OData, only REST.

These links:
https://developer.salesforce.com/page/Apex_Code_Best_Practices
https://help.salesforce.com/apex/HTViewHelpDoc?id=platform_connect_add_external_data_source.htm&language=en_US
http://releasenotes.docs.salesforce.com/en-us/summer15/release-notes/rn_forcecom_external_data_apex_adapter.htm

suggest that it is possible for us to create our own adapter.

Am I reading that correctly?
Are there any scalability concerns?
Would this do the same thing that the native OData adapter does or does  the native adapter have additional functionality?
Is there a better way to do this?

Our alternate plan is to create a translation layer using Olingo but I'm worried about the performance implications of having a translation layer.