• Siva Sakthi
  • NEWBIE
  • 110 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 86
    Questions
  • 77
    Replies
Hi Forum,

First-time on Trailhead, excellent platform for learning. However I'm stuck on an issue. The custom object looks fine, but I'm getting the error:
"All the expected custom fields for the Trail__c object could not be found."

The object and fields looks ok.  I have looked at other advice and it seems the Sys Admin has view access to the Custom Objects.
I'm hoping its something simple I've missed off...

Custom Object View for Trail

Any advice is greatly appreciated.

Kind Regards
Mark
 
Hi,

I have tried to add two list via trigger but i got an error like System.ListException: Before Insert or Upsert list must not have two identically equal elements.  This is my code please suggest me whats is error. and how to fix that. I want to try to send sms for two contact numbers in employee object.
trigger SMSAttendance on Emp_Attendance__c (after insert) {
    List<smagicinteract__smsmagic__c> scpList = new List<smagicinteract__smsmagic__c>();
    String tplText = null;
    for (Emp_Attendance__c empatten : Trigger.New){
        if(!empatten. Employee_Present__c){                      
           Emp_Attendance__c emp= [SELECT Contact_Emp__r.Phone,sitinstra__Contact_Emp__r.OtherPhone from Emp_Attendance__c where Id = :empatten.Id limit 1];
             
            tpltext = 'Dear Emp, this is to inform you that you are ABSENT for the office today. Regards, Department of HR, ABC Pvt Ltd.';
            system.debug(tpltext);
            smagicinteract__smsMagic__c smsObj = new smagicinteract__smsMagic__c();
            smsObj.smagicinteract__PhoneNumber__c = emp.Contact_Emp__r.Phone;
            smsObj.smagicinteract__SMSText__c = tplText;             
            smsObj.smagicinteract__senderId__c = 'ABCPL';
            smsObj.smagicinteract__external_field__c = empatten.Id + 'testmessage';
            smsObj.smagicinteract__Name__c = empatten.Employee_Name__c;
            scpList.add(smsObj);
          /   Here i have a doubt - how to send a SMS for two mobile numbers in same employee. Below code i have tried but got an error that means second time add list value  /
            smsObj.smagicinteract__PhoneNumber__c = emp.Contact_Emp__r.OtherPhone;
            smsObj.smagicinteract__SMSText__c = tplText;             
            smsObj.smagicinteract__senderId__c = 'ABCPL';
            smsObj.smagicinteract__external_field__c = empatten.Id + 'testmessage1';
            smsObj.smagicinteract__Name__c = empatten.Employee_Name__c;
            scpList.add(smsObj);
            
        }
    }
    insert scpList;
}
Thanks
Siva
Hi,
            How to display the sub query value in apex trigger. Please find the code and correct me where i made mistake. How to aolve this issue.
I have try to conver Lead to Account and that time i want to send a text message. Your Lead has successfully converted with Account Name as well as Contact Name. I can get Account Name but not able to get the contact name to display.Please suggest me.  
trigger ConvertLeadtoAccount on Account (after insert) {
    List<smsbox__c> sms = new List<smsbox__c>();
    String Txttemp = null;
    for (Account acct : Trigger.New){
                          
            Account acc = [SELECT Phone, Name, (SELECT Name, MobilePhone, Phone FROM Contacts) FROM Account WHERE Id =:acct.Id limit 1];
           
             
            Txttemp = 'The Lead  '+ acc.Name +' has been successfully converted into '+ acc.Name +' Account';
            
            system.debug(Txttemp);
            smsbox__c obj = new smsbox__c();
            obj.PhoneNumber__c = acc.Phone;
            obj.SMSText__c = Txttemp;  
            obj.external_field__c = acct.Id + 'instratestmessage';
            obj.Name__c = acc.Name;
            sms.add(obj);
        }
    insert sms;
}

I have tried acc.contacts[0].Name also but not yet fixed.

Thanks
Sivasakthi
Hi,

The record some times gets saved and some times its shows error as 'Error: Error ID: 852563905-238205 (1478300867) ' for Community Users . 
This issue occurs only in Managed Packaged Installed (Test/Demo) Orgs. No error id we are getting in Development/ Packaging Org. Kindly guide me to solve this issue ASAP.
Note: I have already raised the case to the salesforce support team.We are the internal app developers. 

Thanks
Sivasakthi
 
I have a code to attach files greater than 25MB. but the problem is i can't able to save/view the Attached document by using of chatter:feed tag in VF page. The error I got is, chatter:feed should not be used under form tag. Is there any other solution to use Chatter:feed in VF page? kindly Suggest any option is available.
Hi
       I have created the trigger for automatically inserted the records form source to destination org with connection.Its not automatically inserted in the main object except we have to accept manually.Its stored in the Connection Section after click the go button in this section its show all records from the source org. we can accept manually one by one and give required relationship field. I have checked that in Subscribed objection section to enable the 'auto accept' option but its unable to choose. It will show the below message
Msg: Auto-accept isn't available for child objects, like opportunity products and tasks, because child records are automatically accepted with their parent record. 
We have checked the OWD also all are provided as Public Read/Write option.

I have created the trigger for before insert the relationship field mapping like fromula to text field mentioned inthe connection process. But its not working. Could you please anyone help me to provide solution for auto accept of records.Please find the screen shot & coding. Help me how to solve this issue. Where i made mistake.

Thanks
Siva
Marks record from connection 
 
Example Trigger Code :
==================
trigger MarksTrigger on Marks__c (before insert, before update) {
   
    List<String> StuMark = new List<String>(); 
    for (Marks__c sm : Trigger.new) {
           StuMark.add(sm.Stu_Course_Plan__c); 
    }  

    List <Course_Plan__c> SCPList=[Select Id, Name from Course_Plan__c Where Name IN:StuMark];
    Map <String,Id> smMap= new Map<String,Id>();
    for(Course_Plan__c scp:SCPList) {
        smMap.put(scp.Name,scp.Id);
    } 
             
    for (Marks__c smadd : Trigger.new)  {

        if (!smMap.isEmpty() && smadd.Course__c == null) {
                smadd.Course__c = smMap.get(smadd.Stu_Course_Plan__c);               
        }   
    }

    /* Another way i tried to map the relationship field */
   
   /* for(Marks__c sm : trigger.new) {                
        Course_Plan__c scp = [select Id, Name from Course_Plan__c where Name = :sm.Stu_Course_Plan__c limit 1 ];
        system.debug('Trigeer SCP Id ====== :: '+ sm.Stu_Course_Plan__c );
        system.debug('Trigger MarkId ====== :: '+ scp.Name);
        sm.Course__c = scp.Name;
    }  */    
    
}

 
Hi,

We have created one trial org using the trail template.Org created successfully. Login in to newly created org, while access to the community login we got Error Id 1166351650-561010 (-208404695). In the TSO org all communities login & landing page working perfectly . After creating the template to access the community login & landing page means getting this error Id. Please let me know how to solve this issue.

Advance Thanks
Sivasakthi 
Hi ,
We have tried to give the CRUD permission for Attachment in Apex Class for Security scan perpose but not covered.
I have tried in two ways below. Please help me out to fix this issue ASAP. 
Is salesforce changed the attachment Name as CombinedAttachment ? Thats why i gave like this.
1. if (CombinedAttachment.sObjectType.getDescribe().isDeletable()) {
       delete at;  
    }  
2. if(!(Schema.sObjectType.Attachment.isDeletable()){
         delete at;   
    }
Advance Thanks
Siva
Hi,
       I have 3(forms) in different vf components with different controllers  show in a single VF page. The 1 st form (component) fill the details and click save means it should show the 2nd form(component ), then 2nd one completed means have to show the 3rd form(component) in same page . How to do this any idea. Pls guide me to solve this .

Eg:       Like 1 st form have Basic Info, 2nd form have qualification , 3rd form have Acheivement Details. If 1st Basic Info form(component) completed the details and click save means show the 2nd Qualification form (component)  in the same page.

<apex:page showHeader="false" sidebar="false"  >     
   
    <apex:outputpanel rendered="false" >
        <c:BasicInfo />
    </apex:outputpanel>
          
    <apex:outputpanel rendered="true" >
       <c:Qualification />
    </apex:outputpanel>
    
    <apex:outputpanel rendered="false" >
        <c:Achievement/>
    </apex:outputpanel>
      
</apex:page>

Advance Thanks
Siva

 
Hi,

   How to use the connection.js for file upload more than 5MB in lightning component? I tried to split chunks the files size can upload with in 5 MB. I want to upload more than 5MB means how to acheive this via connection.js.  Can any one help on this.

 
Hi,

       How to create the lightning component with google map instead of leaflet map. I saw the leaflet example in this link
'https://developer.salesforce.com/blogs/developer-relations/2015/04/creating-salesforce-lightning-map-component.html'  .   But I want to show the google map in lightning component. Please guide me how to get this.

Advance Thanks
Siva
 
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
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
 
Hi,

           I have tried to calculate sum of custom array values in lightning component. But unable to get the index values. If we get the index values means using for loop to calculate the sum. Please guide me where i made mistake and how  to solve this. 

Component:
-----------------------
<aura:component >
    <aura:attribute name="arrvals" type="integer[]" default="1,2,3,4,5"/>
    <aura:attribute name="numbers" type="integer"/>
    
    <aura:iteration var="num" items="{!v.arrvals}" aura:id="ipv" indexVar="index" >
        {!index}<ui:inputNumber label="Input value : " aura:id="{!index+'ip'}" placeholder="Enter the Vlaue"/>  
    </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>

Controller.js
------------------
({       
    calculate : function(component) {
       
       try {     
            debugger;
            var numbers=component.find("index+ip").get("v.value");
            console.log(numbers); 
            var arrlist =component.get("v.arrvals");
            console.log(arrvals);            
            var totalval=0;            
            for(var i=0; i<arrlist.length; i++) { 
                //var sum = parseInt(numbers)
                totalval += parseInt(numbers) ;
                console.log(totalval);                
            }          
                component.set('v.totalValue',totalval);            
        }                           
        catch (e) {
            alert('Exception : '  + e);
        }     
    } ,
})

Advance Thanks
Sivasakthi
Hi,

       I have two components parent and child with rollup summary value. when i update child records the parent rollup value is updated. Able to check that update using pull to refresh. Is any other way to refresh the parent component/record(Rollup value) with out pull to refresh?. I have show that record details in record view passing recordid edit that record and click save have to refresh the parent component/record.

Please guide me to achive this.  

Example Code:
--------------------------
<aura:component>
        <aura:attribute name="emp" type="Employee__c"/>      
        <div class="{!v.value == 'All Employee'? 'row primary' : 'row '}" >    
            <div onclick="{!c.gotoRecord}">    
                <force:recordView recordId="{!v.emp.Id}" type="MINI"/>    
            </div>            
        </div> 
</aura:component>

Advance Thanks
Sivasakthi
Hi,

I am new to lightning development. I have diaplay the parent records hard coded in drop down based on the select its show the child.But how to achive this with out hard coded, Parent and child records in two different component while click the parent record to diaply the associated child records in single component render based (Like Tree fromat).  Eg:   Department is Parent -> HR, Sales,Marketing   , Employee is Child -->John,William,Mac etc 

How to passing the Id 's between component ,parent and child records . Guide me to solve this. 

My Controller: 
---------------------------
public with sharing class CourseController {     
    @AuraEnabled
    public static List<Employee__c > getAllEmployees() {
        List<Employee__c > emps= [SELECT Id, Name FROM Employee__c ];        
        return emps;
    }    
    @AuraEnabled
    public static List<Employee__c > getEmployee(String deptName) {        
        List<Employee__c >  emp= [SELECT Id, Name,department__r.Name FROM Employee__c WHERE department__r.Name = : deptName];
        return emp;
    }    
}

Component 1 :Department.cmp  
---------------------------------------------------
<aura:component implements="force:appHostable" controller="DeptController">
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <aura:attribute name="emp" type="Employee__c[]"/>
        <ui:inputSelect aura:id="selection" change="{!c.select}">    
            <ui:inputSelectOption text="All Employee" label="All Employee"/>
            <ui:inputSelectOption text="HR" label="HR"/>
            <ui:inputSelectOption text="Sales" label="Sales"/>
            <ui:inputSelectOption text="Marketing" label="Marketing"/>            
        </ui:inputSelect>    
        <aura:iteration var="e" items="{!v.emp}">
            <c:EmployeeList emp="{!e}"/>
        </aura:iteration>     
</aura:component>

Component 1 -  Client Side Controller
----------------------------------
({
    doInit : function(component, event, helper) {       
        helper.getAllEmployees(component);
    },    
    select : function(component, event, helper){    
        var selectcomponent = event.getSource();
        var selectVal = selectcomponent.get("v.value"); 
        if (selectVal != "All Employees"){    
            var action = component.get("e.getEmployee");
            action.setParams({
                "deptName":selectVal
            });            
            action.setCallback(this, function(response){    
                var state = response.getState();    
                if (component.isValid() && state === "SUCCESS") {    
                    component.set("v.emp", response.getReturnValue());
                }
                else {                    
                    alert('No Records Found');
                }      
            });    
            $A.enqueueAction(action);    
        }    
        else {            
            helper.getAllEmployees(component);
        }
     }
})

Component 1 - Helper.js
--------------
({
    getAllEmployees: function(cmp) {
        var action = cmp.get("e.getAllEmployees");
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (cmp.isValid() && state === "SUCCESS") {
                cmp.set("v.emp", response.getReturnValue());
            }
            var toastEvent = $A.get("e.force:showToast");
            if(toastEvent){
               if (state === 'SUCCESS'){
                toastEvent.setParams({
                    "title": "Success!","message": " your records successfully loaded ."
                });
            }
            else {
                toastEvent.setParams({
                        "title": "Error!","message": " Something has gone wrong."
                });
            }  
            toastEvent.fire(); 
            }            
        });
         $A.enqueueAction(action);
    }
})

Component 2 :
---------------------
<aura:component>
        <aura:attribute name="emp" type="Employee__c"/>      
        <div class="{!v.value == 'All Employee'? 'row primary' : 'row '}" >    
            <div onclick="{!c.gotoRecord}">    
                <force:recordView recordId="{!v.emp.Id}" type="MINI"/>    
            </div>            
        </div> 
</aura:component>

Advance Thanks
Sivasakthi







 
Hi,
Have two input Text Boxes “Rows” and “Columns” and have a button create. When the number of rows and columns are entered and the button is clicked, create a table with the specified number of rows and Columns with all cells as input Text Boxes and the column headers as “Column 1, Column2…etc.

How to achive this via apex coding.Guide me to achive this

Advance Thanks
Maheshwar
Hi 

1. Create a field “Number of attachments “in accounts. Whenever an attachment is attached or deleted from the account, count the number of attachments and display in the field.

2. Create a Page with two buttons “Start” and ”Increment” .When “Start” is clicked start a counter decrementing from 60 seconds. When the “Increment” button is clicked 3 times stop the counter. Else after 60 seconds display an alert message.

How to achive this two scenario. Please guide me to solve this issue.Post some code to achive this.

Advance Thanks
Maheshwar 
Hi ,

 I have DOB as Text Field, I want to given the validation for this text Field (DOB) ? 

My Sample Validation is : TEXT(SitEduTest__Academic_Year__c  < Today())  
            But it causing  Error: Incorrect parameter type for operator '<'. Expected Text, received Date.  How to achive this guide me .

Thanks
Maheshwar 
Hi, 

I have some methods one method for loop calling another method, that method having query and return values. some times causing error message like Too many SOQL queries: 101 . How to avoid this, my sample code is below. Guide me to Solve this issue . Where i have to  change my code .

 public List<MarkSheetDomain> getMarksheet(){        
        List<AggregateResult> subjectCodes = new List<AggregateResult>();
        List<MarkSheet> marks = new List<MarkSheet>();
        SemesterSelection = string.escapesinglequotes(SemesterSelection);
        subjectCodes = [Select Subject_Code__c code from catalog__c where Paper__c ='Maths'  And Subject_Code__c != null GROUP BY Subject_Code__c];        
        for (AggregateResult subjectcode : subjectCodes){
            MarkSheet mark = new MarkSheet();
            mark.SubjectCode = String.valueOf(subjectcode.get('code'));        
            mark.ExternalExam = getExternalExams(mark.SubjectCode);           
            marks.add(mark);
        }
        return marks;
    }    
    public String getExternalExams(string Subjectcode) {  
        RollNo = string.escapesinglequotes(RollNo);  
        External_Exam__c ExtExm = new External_Exam__c();
        ExtExm = [Select Title__c, Score__c from External_Exam__c where Sem__c=:SemesterSelection And Subject_Code__c =:Subjectcode and Student__r.Roll_No__c =:RollNo];
        System.debug('Test on Mark' + ExtExm );
        System.debug('Test on Mark' + ExtExm.Score__c);
        return String.valueOf(ExtExm.Score__c);         
    }

Advance Thanks
Maheshwar
Hi,

          I have to calculate the aggregate for check box value via SOQL.? How to get the aggregate and sum the check box value aggregate.My requirement is Event based attenance like check box value is true means present other wise appesant . Have to calculate the aggregate of present /not present. I am getting the Count value from query , how to pass this value and get the aggregate to calcualte the Attendance percentage (100%).
Please guide me to solve this issue ASAP and share sample coding for this. 

My Sample Code Below:
public String getAttendance(string Subjectcode) {          
        Decimal SubAttendance= 0;        
        EmpNo = string.escapesinglequotes(EmpNo);  
        List<AggregateResult> aggregatelist = new List<AggregateResult>();         
        aggregatelist = [Select Count(Id) cont,Title__c Title,Subject_Code__c,Present__c Present  from Attendance_Table__c where Type__c='Event' And Emp_No__c =:EmpNo And Code__c ='E-11' Group By Title__c,Code__c,Present__c ];        
        map<string,map<boolean,string>> mapnew = new map<string,map<boolean,string>>();
         for(Aggregateresult temp:aggregatelist){
            map<boolean,string> mapinst = new map<boolean,string>();
            mapinst.put(temp.get('Present'),string.valueof(temp.get('cont')));
            mapnew.put(string.valueof(temp.get('Title')),mapinst);
        }
         System.debug('Boolean Result' + mapnew);
          for(string temp:mapnew.keyset()){
              wrapperlist.add(new wrapperinstance(temp,mapnew.get(temp).get(true)/(mapnew.get(temp).get(true) + mapnew.get(temp).get(false))));
          }
        return String.valueOf(((SubAttendance/500)*5));   
    } 

Advance Thanks 
Maheshwar
Hi,

We just released a managed package of an app which uses a third party tool ( Vertical Responce ) for sending mails. The credentials of the tool are kept in the custom settings of the app.

Is there a possibility to change the custom settings values (Vertical Responce Credentials)  when the app is installed in another Org.This is requires as the app buyer may want to purchase an account from vertical responce with a different credential; not as the one we tested.

Kindly advice.

Thanks in Advance,

Regards,
Maheshwar
Hi,

I have 50 user in same profile  example sales, i want to assign the permission set for 10 users at a time, How can i assign this at a time. one by one means its possible to assign. i want to assign for 10 users at the same time. help me how i can assign.
Hi,

I have tried to add two list via trigger but i got an error like System.ListException: Before Insert or Upsert list must not have two identically equal elements.  This is my code please suggest me whats is error. and how to fix that. I want to try to send sms for two contact numbers in employee object.
trigger SMSAttendance on Emp_Attendance__c (after insert) {
    List<smagicinteract__smsmagic__c> scpList = new List<smagicinteract__smsmagic__c>();
    String tplText = null;
    for (Emp_Attendance__c empatten : Trigger.New){
        if(!empatten. Employee_Present__c){                      
           Emp_Attendance__c emp= [SELECT Contact_Emp__r.Phone,sitinstra__Contact_Emp__r.OtherPhone from Emp_Attendance__c where Id = :empatten.Id limit 1];
             
            tpltext = 'Dear Emp, this is to inform you that you are ABSENT for the office today. Regards, Department of HR, ABC Pvt Ltd.';
            system.debug(tpltext);
            smagicinteract__smsMagic__c smsObj = new smagicinteract__smsMagic__c();
            smsObj.smagicinteract__PhoneNumber__c = emp.Contact_Emp__r.Phone;
            smsObj.smagicinteract__SMSText__c = tplText;             
            smsObj.smagicinteract__senderId__c = 'ABCPL';
            smsObj.smagicinteract__external_field__c = empatten.Id + 'testmessage';
            smsObj.smagicinteract__Name__c = empatten.Employee_Name__c;
            scpList.add(smsObj);
          /   Here i have a doubt - how to send a SMS for two mobile numbers in same employee. Below code i have tried but got an error that means second time add list value  /
            smsObj.smagicinteract__PhoneNumber__c = emp.Contact_Emp__r.OtherPhone;
            smsObj.smagicinteract__SMSText__c = tplText;             
            smsObj.smagicinteract__senderId__c = 'ABCPL';
            smsObj.smagicinteract__external_field__c = empatten.Id + 'testmessage1';
            smsObj.smagicinteract__Name__c = empatten.Employee_Name__c;
            scpList.add(smsObj);
            
        }
    }
    insert scpList;
}
Thanks
Siva
Hi,
            How to display the sub query value in apex trigger. Please find the code and correct me where i made mistake. How to aolve this issue.
I have try to conver Lead to Account and that time i want to send a text message. Your Lead has successfully converted with Account Name as well as Contact Name. I can get Account Name but not able to get the contact name to display.Please suggest me.  
trigger ConvertLeadtoAccount on Account (after insert) {
    List<smsbox__c> sms = new List<smsbox__c>();
    String Txttemp = null;
    for (Account acct : Trigger.New){
                          
            Account acc = [SELECT Phone, Name, (SELECT Name, MobilePhone, Phone FROM Contacts) FROM Account WHERE Id =:acct.Id limit 1];
           
             
            Txttemp = 'The Lead  '+ acc.Name +' has been successfully converted into '+ acc.Name +' Account';
            
            system.debug(Txttemp);
            smsbox__c obj = new smsbox__c();
            obj.PhoneNumber__c = acc.Phone;
            obj.SMSText__c = Txttemp;  
            obj.external_field__c = acct.Id + 'instratestmessage';
            obj.Name__c = acc.Name;
            sms.add(obj);
        }
    insert sms;
}

I have tried acc.contacts[0].Name also but not yet fixed.

Thanks
Sivasakthi
Hi all trailhead,

I am now stucking in one of the challenges of modules in Trailhead: Advanced Formula > Level up with advanced formula.
https://trailhead.salesforce.com/modules/advanced_formulas/units/implementing_advanced_formulas

The challenge is trying to ask us to calculate the 'percent completed' of the opportunity by using Today (), createdate and closedate.....However this does not make sense or even cause contradiction to me because when we already have a closedate of an opportunity, why do we need to calculate the progress? If we do not have the closedate, how to calculate the percentage of the opportunity completed?

Please help.
Hi All

I have created a custom object which is having image for every record.so how to create a vf page for displaying all image .

User-added image
I get the following message when trying to save my VF page. I can not proceed with unit.

User-added image
Hi,

We have created one trial org using the trail template.Org created successfully. Login in to newly created org, while access to the community login we got Error Id 1166351650-561010 (-208404695). In the TSO org all communities login & landing page working perfectly . After creating the template to access the community login & landing page means getting this error Id. Please let me know how to solve this issue.

Advance Thanks
Sivasakthi 
Hi ,
We have tried to give the CRUD permission for Attachment in Apex Class for Security scan perpose but not covered.
I have tried in two ways below. Please help me out to fix this issue ASAP. 
Is salesforce changed the attachment Name as CombinedAttachment ? Thats why i gave like this.
1. if (CombinedAttachment.sObjectType.getDescribe().isDeletable()) {
       delete at;  
    }  
2. if(!(Schema.sObjectType.Attachment.isDeletable()){
         delete at;   
    }
Advance Thanks
Siva
Hi,

I am not able to select the customer community user from account by lookup, hear i have created the user lookup in account,for my requirement i need to select the customer community user in account, but i am not able to select the customer community users.Please help on this requirement.

Thanks,
Surya
Hi All,

I want to display Dashboards tab for community user. The community is created using Napil teplate. Iam not finding ways to display dasboards using napili template. please help.

thanks in advance.

Vedashri
hi, I'm having trouble completing the Custom button challenge. any help would be a lifesaverUser-added imageUser-added image
hi ,

I have to create google chart from apex class and insert the chart into attachement.

Thanks.
Difference In Between Apex PageMessage, PageMessages and Message VF Pages Tags in Salesforce
Hi,
       I have 3(forms) in different vf components with different controllers  show in a single VF page. The 1 st form (component) fill the details and click save means it should show the 2nd form(component ), then 2nd one completed means have to show the 3rd form(component) in same page . How to do this any idea. Pls guide me to solve this .

Eg:       Like 1 st form have Basic Info, 2nd form have qualification , 3rd form have Acheivement Details. If 1st Basic Info form(component) completed the details and click save means show the 2nd Qualification form (component)  in the same page.

<apex:page showHeader="false" sidebar="false"  >     
   
    <apex:outputpanel rendered="false" >
        <c:BasicInfo />
    </apex:outputpanel>
          
    <apex:outputpanel rendered="true" >
       <c:Qualification />
    </apex:outputpanel>
    
    <apex:outputpanel rendered="false" >
        <c:Achievement/>
    </apex:outputpanel>
      
</apex:page>

Advance Thanks
Siva

 
Hi,

   How to use the connection.js for file upload more than 5MB in lightning component? I tried to split chunks the files size can upload with in 5 MB. I want to upload more than 5MB means how to acheive this via connection.js.  Can any one help on this.

 
Hi guys! I have created a code in which i have embedded a lightning component inside visualforce page. But when i preview the code i get the error as  $Lightning is not defined. Can someone please help. 
My VF PAGE:
<apex:page sidebar="false" showHeader="false"> <!-- <apex:includeScript value="/lightning/lightning.out.js" /> --> <apex:includeScript value="{!$Site.BaseUrl}/lightning/lightning.out.js?v=2"/> <div id="lightning" /> <script> $Lightning.use("c:HelloApp",function(){ $Lightning.createComponent("c:Hello", {}, "lightning", function(cmp) { // do some stuff }); }); </script> </apex:page>

My App:

<aura:application access="GLOBAL" extends="ltng:outApp">
    
  <aura:dependency resource="c:Hello"></aura:dependency>
  
</aura:application>
I am new to Lightning.. I want to develop the two components in which one component like "Menu List". 
On Clicking one of the Menu List Item, I need to Show the Another component.
How to achieve this?