• a . vijay
  • NEWBIE
  • 85 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 29
    Questions
  • 12
    Replies
Hi Team,

can you help me in understanding the difference between bulk API version 1.0 and 2,0

Thanks,
Vijay.
Hi Team,

I would like to know  where does the data is stored in salesforce for a production environment whenever we create a new record say 1M record  and how to view the data from backend is it through developer console if its stored in salesforce.

An example say user is trying to fetch a records which are getting retrived by a SOQL query in an apextrigger .
how to find out if there are any perfomance issues or we can fine tune the query and where to see the query plan.

Thanks,
Vijay.
Hi  Team,

I need to write a trigger to update the address on the contact object if a user select a checkbox on account filed address then   copy  the same values into conatct object 


trigger accountcontact on account(after insert,after update)
{
List<contact> contactupdate list = new List<contact>();
{
for (account a : trigger.new){
contactupdate.add(a);
}
}
List<account> Updatedcontact = new List<account>([select id,name,accountid,(select id,name from contact where accountid in :accountid]);
for(account acc : trigger.new){
if(acc.address =='true')
contact.address = acc.address;
contact.city = accc.city;
contact.pincode= acc.pincode;
contact.district = acc.district;
updatedcontact.add(acc);
}
insert updatedcontact;
}
Hi Team,

I have a requirement where two users say user A and user B are having acess to the details of an object (patient__C) now how do i make sure that only those records where the user A can only see the details which he has acess and he should not see the details of user B from the object 

Thanks,
Vijay.
Hi Team,

I have a requirement for the below  to acheieve it using trigger
contact is the parent of account  having master detail relationship.
account is the parent of opportunity.
copy the opportunity name  field of opportunity from the conatct object 


Thanks,
Vijay.
 
Hi Team,

I have compoenent A where if i update the value in compoent A using LDS in edit mode will the same value be updated in the compoent B as well for the same record id in both the compoenents .

Thanks,
Vijay.
Hi Team,

I have read from documentation that force : create record and Navigate to sobject is not supported in lightning app .
What is the best approcah if i have the requirement to use them in app

https://developer.salesforce.com/docs/component-library/bundle/force:createRecord/documentation


Thanks,
Vijay.
Hi Team,

We have a requirement where on lightning app when user clicks on a button he should be navigating to another page .
How to achevie this using aura compoent .
 
Hi Team,

I would need a new features for lightning components which are releases in every spring  not sure if this is the correct places to post such questions but can you please help me or provide a link 

Thanks,
Vijay.
Hi Team,

I am doing a trailhead module on  Aura Component to Override a Standard Action i am getting the below error . can someone help me why i am getting the below eroor .

A Component Error has occured! Error: Unable to find action 'getPickListValuesIntoList' on the controller of c:PickListValues Component: c:PropertyDialog . Caused by: Unable to find action 'getPickListValuesIntoList' on the controller of c:PickListValues.


a.G.get()@https://static.lightning.force.com/ap24/auraFW/javascript/dDIdorNC3N22LalQ5i3slQ/aura_prod.js:375:248
Object.value [as get]()@https://static.lightning.force.com/ap24/auraFW/javascript/dDIdorNC3N22LalQ5i3slQ/aura_prod.js:37:131667
doInit()@https://brave-badger-a5q453-dev-ed.lightning.force.com/lightning/r/Property__c/a065g000000pyldAAA/components/c/PickListValues.js:11:32

Property Dialog component :


<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" controller="PickListController" >
  
    <aura:attribute name="picklistValues" type="Object" />
    <force:recordData aura:id="forceRecord"
                recordId="{!v.recordId}"
                targetFields="{!v.propertyRecord}"
                fields="Id,Name,Beds__c,Baths__c,Price__c,Status__c"
                mode="EDIT" />
    <aura:attribute name="propertyRecord" type="Property__c"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
   <c:PickListValues sObjectName="Property__c" fieldName="Status__c" picklistValues="{!v.picklistValues}" />
    <lightning:input aura:id="propName" name="propName" label="Proprty Name" required="true"/>
    <lightning:input aura:id="propBeds" name="propBeds" label="Beds" />
    <lightning:input aura:id="propBaths" name="propBaths" label="price" />
    <lightning:select aura:id="propStatus" name="propStatus" label="Status">
        <aura:iteration items="{!v.picklistValues}" var="item">
    <option value="{!item}">{!item}</option>
</aura:iteration>
</lightning:select>
<lightning:button variant="neutral" label="Cancel" />
<lightning:button variant="brand" label="Submit" />
    
</aura:component>


PickListvalues component:
<aura:component controller="PickListController" access="global" >
    <aura:attribute name="sObjectName" type="String" />
<aura:attribute name="fieldName" type="String" />
<aura:attribute name="picklistValues" type="Object" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
</aura:component>

PickList Controller:


global class PickListController{
@AuraEnabled 
public static List<String> getPicklistValues(String ObjectApi_name,String Field_name){ 
  List<String> lstPickvals=new List<String>();
  Schema.SObjectType targetType = Schema.getGlobalDescribe().get(ObjectApi_name);//From the Object Api name retrieving the SObject
    Sobject Object_name = targetType.newSObject();
  Schema.sObjectType sobject_type = Object_name.getSObjectType(); //grab the sobject that was passed
    Schema.DescribeSObjectResult sobject_describe = sobject_type.getDescribe(); //describe the sobject
    Map<String, Schema.SObjectField> field_map = sobject_describe.fields.getMap(); //get a map of fields for the passed sobject
    List<Schema.PicklistEntry> pick_list_values = field_map.get(Field_name).getDescribe().getPickListValues(); //grab the list of picklist values for the passed field on the sobject
    for (Schema.PicklistEntry a : pick_list_values) { //for all values in the picklist list
      lstPickvals.add(a.getValue());//add the value  to our final list
   }

  return lstPickvals;
}}

PickListValuesController:

({
    doInit : function(component) {
        var action = component.get("c.getPickListValuesIntoList");
        action.setParams({
            objectType: component.get("v.sObjectName"),
            selectedField: component.get("v.fieldName")
        });
        action.setCallback(this, function(response) {
            var list = response.getReturnValue();
            component.set("v.picklistValues", list);
        })
        $A.enqueueAction(action);
    }
})
Hi Team,

I am doing a traihead challenege of aura component to override standard action but in the apex class i am facing the below error in dynamic apex can you help me out .

Apexcontroller 

@AuraEnabled public static List<String> getPickListValuesIntoList(String objectType, String selectedField){ List<String> pickListValuesList = new List<String>(); Schema.SObjectType convertToObj = Schema.getGlobalDescribe().get(objectType); Schema.DescribeSObjectResult res = convertToObj.getDescribe(); Schema.DescribeFieldResult fieldResult = res.fields.getMap().get(selectedField).getDescribe(); List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues(); for( Schema.PicklistEntry pickListVal : ple){ pickListValuesList.add(pickListVal.getLabel()); } return pickListValuesList; }
 
Hi Team,

We have a requirement where two Objects Invoice and account . whenever an account is created  it should update total number of invoices and  amount on  Sum of amount object on account .

Account and Invoice object  are having lookup relationship
Account and Amount are the fileds on Invoices object
 
Hi Team,

I would like to know  the below output i have 10000 recors batch apex is processing them at 2000 recors in the third batch the query has  failed what is the result  will the other batch size executes and what is the output 

Thanks,
Vijay.
Hi Team,

We have a requirement where after users  need to provide a feedback about our services in salesforce what is the best approach to follow 

Thanks,
Vijay.
Hi  All,

can you help me on writting the trigger whenever name is updated on account contact name also should be updated.
1. I am updating  using the related filed id condition 
trigger accountname on Account (before insert) {
    list<contact> contacts = new list<contact>();
    set<id> accountd = new set<id>
accountid =  [select idrom contact where id in :trigger.new]
    lis<contacts> con = new list[slect id,name from contacts where id in :accountd]
    for(account acc : trigger.new){
      if(acc.id ==accountd.id)
         {
            con.LastName = acc.Lastname;
            contacts.add(con);
        }
    }update contacts;
}
Hi ALL,

can someoene help me in updating the trigger whenever name is updated in account contact should be also updatedwith same name


write a trigger whenever name is updated on account the same value should be populated on contact 

trigger name on account (before update)
{
set <id> List = new  set<id> [select ID,city,name from account where id in:trigger.new]

for (account a : trigger.new)
if(a.id=list.id)
{
a.name=list.name;

}

}
Hi All,

Can someone  explain how can we accomplish the below .
Apart from trigger 


An Sobject named Application_c has a lookup relationsnip to another sOblect named Position c. Both Application _c and Position _c have a picklist field named Status c. When the Status _c field on Position c Is updated, the Status _c field on Application _c needs to be populated automatically with the same value, and execute a workflow rule on Application_c. 
while creating lighting components how do we make sure that  layout fits both mobile and desktop in salesforce app
Hi All,

I  am getting below error can you help me what is the issue here ?


public class Emailsample 
{
     public static void sendMail(String address, String subject, String body) {
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        String[] toAddresses = new String[] {address};
        mail.setToAddresses(toAddresses);
        mail.setSubject(subject);
        mail.setPlainTextBody(body);
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
    }
}

Passing values through Anonymous Window



String address ='vijayummeda35@gmail.com';
String subject ='Speaker confirmation for the session';
String body ='thank you for speaking at the conference really appericated';
EmailManager.sendMail(address, subject, body);
    
Hi Team,

I would like to know  where does the data is stored in salesforce for a production environment whenever we create a new record say 1M record  and how to view the data from backend is it through developer console if its stored in salesforce.

An example say user is trying to fetch a records which are getting retrived by a SOQL query in an apextrigger .
how to find out if there are any perfomance issues or we can fine tune the query and where to see the query plan.

Thanks,
Vijay.
Hi Team,

I have a requirement where two users say user A and user B are having acess to the details of an object (patient__C) now how do i make sure that only those records where the user A can only see the details which he has acess and he should not see the details of user B from the object 

Thanks,
Vijay.
Hi Team,

I have a requirement for the below  to acheieve it using trigger
contact is the parent of account  having master detail relationship.
account is the parent of opportunity.
copy the opportunity name  field of opportunity from the conatct object 


Thanks,
Vijay.
 
Hi Team,

We have a requirement where two Objects Invoice and account . whenever an account is created  it should update total number of invoices and  amount on  Sum of amount object on account .

Account and Invoice object  are having lookup relationship
Account and Amount are the fileds on Invoices object
 
Hi Team,

I would like to know  the below output i have 10000 recors batch apex is processing them at 2000 recors in the third batch the query has  failed what is the result  will the other batch size executes and what is the output 

Thanks,
Vijay.
Hi All,

I want to delete an immediate actions from process builder  where  my Process Builder - Price Change Push Notification . There is an action
IMMEDIATE ACTIONS
Push Notification
Add Action
 I have set the fields  below  now i am unable to change it .
Set Apex Variables
Field*Type*Value*1 Field
propertyId1 Type
IDField ReferenceGlobal ConstantFormula1 Value
[Property__c].Id
Find a field...[Property__c].Id

I have deactiavted the  process builder aand  activated again now i am uanble to editt it can anyone tell me what is the issue ?
I don't want to clone it an make a new changes.

 
Hi All,

I am doing Use Apex to Automate Business Processes 
Set Up the BOTanicals App a trailhead challenge . while doing the below at the last step .

Click and select Setup.
In the Quick Find box, enter Flows.
Under Process Automation, select Flows.
Click Load Sample Data.
Click Run.
When you see YOUR FLOW FINISHED, close the Load Sample window.
Close the Flow Builder window.
Click and select BOTanicals.
I am unable to find the load sample data what could be the issue ?
Hi ,

I am getting the below error while creating a simple calcultor app . can anyone please help me .

calculator component

<aura:component >
    <aura:attribute name="input1" type ="integer" required ="true" description = "For first Input" /> 
    <aura:attribute name="input2" type ="integer" required ="true" description = "For second Input" />
    <lightning:input type="number" value="{!v.input1}" label="Please enter a value " required ="true" /> 
     <lightning:input type="number" value="{!v.input2}" label="Please enter a value " required ="true" />

    <lightning:button variant="Component Methods" label="add"  onclick="{! c.doAdd}"/>
    <lightning:button variant="Component Methods" label="sub"  onclick="{! c.dosub}"/>
    <lightning:button variant="Component Methods" label="Multiply"  onclick="{! c.doMul}"/>
    <lightning:button variant="Component Methods" label="Divide"  onclick="{! c.doDiv}"/>


          </aura:component>

controllerr :

({
    doAdd : function(component, event, helper) {
        var number1 = component.get('v.input1');
        var number2 = component.get('v.input2');
        alert(parseInt(number1) + parseInt(number2));
        
    },
    
    
    dosub : function(component, event, helper) {
         var number1 = component.get('v.input1');
        var number2 = component.get('v.input2');
        
    },
    
    doMul : function(component, event, helper) {
         var number1 = component.get('v.input1');
        var number2 = component.get('v.input2');
        
    },
    doDiv : function(component, event, helper) {
         var number1 = component.get('v.input1');
        var number2 = component.get('v.input2');
    },
    
})

Application :


<aura:application >
    <c:calculator />
    
</aura:application>
Hi ,

I have  a query where i have batch size of 200 and records are 2000  the batch apex execute it 10 times . What is the result in debug log and how many times does the debug log run is it 10 times ?
Hello,
This is related to trailhead Lightning components: Attributes and Expressions. While saving below code for the lightening component for the challenge in devloper console. I am getting error: FIELD_INTEGRITY_EXCEPTION: "Failed to save undefined: null: Source". If I replace the outputCurrency and ouptutNumber tag with outputText then it get saved. But that does not meet the challenge. Can someone please advise?

<aura:component >
    <aura:attribute name="item" type="Camping_Item__c" required="true"/>
    <p>Name:
    <ui:outputText value="{v.item.Name}"/> 
    </p>
    <p>
    Price:
    <ui:outputCurrency value="{v.item.Price__c}"/> 
    </p>
    <p>
    Quantity:
    <ui:outputNumber value="{v.item.Quantity__c}"/>
    </p>
    <p>
    Packed:
    <ui:outputCheckbox value="{v.item.Packed__c}"/>
    </p>
</aura:component>

Thanks,
Kuldeep