• ashish jadhav 9
  • NEWBIE
  • 145 Points
  • Member since 2016

  • Chatter
    Feed
  • 1
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 61
    Questions
  • 18
    Replies
1. what is batch apex..?
2.y u r going to batch appex..?
3.step to do batch apex..?
4.what is  Database.Stateful..? eaht the use for it..
5.if record are fail how we find..>
6.what is schedule apex and use and difference between them..?
 
Hello experts,

I've to increase test class code coverage, but I'm new to salesforce and not able to figure out the solution, please help me for the below method.

I've several method but need to know any one so that I can debug with remaining classes. Here I'm getting red line i.e. not covered in test is marked in bold.

please guide me how can I pass the value to the method, what should be my approach and best practice in industry. This method is called from constructor and it is not parameterised. please guide a test class for this.

public void initializeRollouts()
    {
        searchCountry=null;
        isNoResult=false;
        projectId = ApexPages.currentPage().getParameters().get(IPM_ConstantUtils.SF_ID);
        if (projectId != null)
        {
            isEditable = IPM_Utils.getIPMRollOutUser(projectId);
            if(!isEditable)
            {
                errorMessage = String.valueOf(new ApexPages.message(ApexPages.severity.INFO,Label.IPM_PLEASE_CONTACT_ADMINISTRATOR));
            }
            getUnileverCountries();
            generateWrappers();
            generateSubWrappers();
        }
    }  
Hey guys, please let me know how can I find that on which cloud I'm working on? whether it is sales, service or community.
Please guide.
basically I want simple option to be displayed on sidebar as 'Expand' with '+' sign and when I click on that it will display 3 more options(lets say
1. A,
2. B &
3. C with '-' sign.
so when I click on lets say 1.A then it must display A objects field. so how can I achieve this functionality? What should be my controller should have? 
I think that we need to use wrapper class, but need your suggestion, please help.
please let me know the difference between this clouds and their uses.
How can I know the number of fields in an object and how can I append entire fields at once? Please guide.
Why there is two object get created when I create any cutom object? What is the exact use of history object? when we're using this object? What are some things that we must remember while using this object? Please guide.
Hi folks, can you please let me know the process in the end to end configuration? I'm new to salesforce and my upcoming project need end to end configuration? Please guide with your valuable inputs.
Hi Guys, I've created 2 custom object with master detail relationship and I want a trigger which update child object when phone number in parent record gets changed, here is my code

trigger UpdateChildPhone on Parent_Dept__c (after insert) {
    Map<id, Parent_Dept__c> MapParent = new map<id, Parent_Dept__c>();
    //checking whether the value already exist or not.
    for(Parent_Dept__c ParentObj : Trigger.New)
    {
        If(Trigger.oldmap.get(ParentObj.id).Dept_Phone__c!= ParentObj.Dept_Phone__c)
        {
            MapParent.put(ParentObj.id, ParentObj);
        }
    }
    //fetching up the data from child with parent ID
    List<Child_Emp__c> ChildObjLst = new list<Child_Emp__c>();
    for(Child_Emp__c child : [SELECT Dept_Phone__c,Id,Parent_Dept__c FROM Child_Emp__c WHERE ID IN : MapParent.keyset()])
    {
      child.Dept_Phone__c= MapParent.get(Parent_Dept__c.id).Dept_Phone__c;
      ChildObjLst.add(child);
    }
        update ChildObjLst;                                           
    }

There is an error on bold colord code, can you please suggest your valuable suggestion please?
I've to display bullet marked code on same page? when I select the value by clicking on checkbox it will be displayed on the page in second pageblock section, so I used <apex:iframe> function and divided the page into 50/50 but how can I display selected record on another page?

<apex:page controller="Checkbox_Class" Tabstyle="Account">
<apex:form >
<apex:pageBlock Title="Accounts with CheckBoxes">
<apex:pageBlockSection Title="List of Available Accounts">
<apex:dataTable value="{!accounts}" var="a" columnswidth="50px,50px" cellpadding="4" border="1">
<apex:column >
<apex:facet name="header"> <apex:inputCheckbox >
<apex:actionSupport event="onclick" action="{!GetSelected}" onsubmit="checkAll(this)" rerender="Selected_PBS"/>
</apex:inputCheckbox></apex:facet>
<apex:inputCheckbox value="{!a.selected}" id="checkedone">
<apex:actionSupport event="onclick" action="{!GetSelected}" rerender="Selected_PBS"/>
</apex:inputCheckbox></apex:column>
<apex:column headervalue="Account Name" value="{!a.acc.Name}" />
<apex:column headervalue="Account Number" value="{!a.acc.AccountNumber}" />
<apex:column headervalue="Phone" value="{!a.acc.Phone}" />
</apex:dataTable>
</apex:pageBlockSection>
  • <apex:pageBlockSection Title="Selected Accounts" id="Selected_PBS">
  • <apex:dataTable value="{!SelectedAccounts}" var="s" columnswidth="50px,50px" cellpadding="4" border="1">
  • <apex:column headervalue="Account Name" value="{!s.Name}" />
  • <apex:column headervalue="Account Number" value="{!s.AccountNumber}" />
  • <apex:column headervalue="Phone" value="{!s.Phone}" />
  • </apex:dataTable>
  • </apex:pageBlockSection>
  •  
  • </apex:pageBlock>
  • </apex:form>
  • <script>
  • function checkAll(cb)
  • {
var inputElem = document.getElementsByTagName("input");
for(var i=0; i<inputElem.length; i++)
{
if(inputElem[i].id.indexOf("checkedone")!=-1)
inputElem[i].checked = cb.checked;
}
}    
</script>
</apex:page>
Hey guys I would like to learn wrapper class, and my requirement is I've to display 2 objects fields on vf page. Let's say I've 2 object x & y.
x has 2 fields - 1) Name 2) Roll No and y object has 1 field i.e. address.
Now I want list of records in these 2 object on vf page with checkbox selection. How can I do that?
Need your expert solution and code. Please help.
Hey guys I'm new to salesforce and I've to update all phone numbers on contact when account phone number changes, how can I do this with trigger? please help.
I've to display list of account with checkboxes, suppose there are 10 records and I've selected 3 and clicked on submit button, now I want to show those 3 accounts on right side of the page and remaining 7 on left side, how can I achieve this functionality? Please help.
How can I create a method which run for specific logged in user? Lets say I've 3 method A, B & C. Now A should run for user1, B & C for user 2 & user 3, so how to do this?
I'm new to salesforce and listening this word repeatedly from seniors that "Today we have deployment", so what is deployment? How to do it.
Please let me know it from scratch.
How can I find a list of profiles exists in SFDC who don't have any user assigned to them?
I'm new to integration part, can some please tell me how can I write web serivces or can provide me any small snippet to understand. Which method is easy to use and mostly used in industry practice? What should be my approach during integration if I choose SOAP or REST API?
What is the exact use of trigger factory? Why we're using it? Can you please give me any small example of trigger factory.
I would like to learn Apex, VF in depth, how can I learn this? Is there any video of apex? Can I learn from java video & utilize that knowledge into apex?
can someone please let me know how we can do encapsulation in salesforce or how that concept is implemented in it?
I would like to learn Apex, VF in depth, how can I learn this? Is there any video of apex? Can I learn from java video & utilize that knowledge into apex?
1. what is batch apex..?
2.y u r going to batch appex..?
3.step to do batch apex..?
4.what is  Database.Stateful..? eaht the use for it..
5.if record are fail how we find..>
6.what is schedule apex and use and difference between them..?
 
Hi Guys, I've created 2 custom object with master detail relationship and I want a trigger which update child object when phone number in parent record gets changed, here is my code

trigger UpdateChildPhone on Parent_Dept__c (after insert) {
    Map<id, Parent_Dept__c> MapParent = new map<id, Parent_Dept__c>();
    //checking whether the value already exist or not.
    for(Parent_Dept__c ParentObj : Trigger.New)
    {
        If(Trigger.oldmap.get(ParentObj.id).Dept_Phone__c!= ParentObj.Dept_Phone__c)
        {
            MapParent.put(ParentObj.id, ParentObj);
        }
    }
    //fetching up the data from child with parent ID
    List<Child_Emp__c> ChildObjLst = new list<Child_Emp__c>();
    for(Child_Emp__c child : [SELECT Dept_Phone__c,Id,Parent_Dept__c FROM Child_Emp__c WHERE ID IN : MapParent.keyset()])
    {
      child.Dept_Phone__c= MapParent.get(Parent_Dept__c.id).Dept_Phone__c;
      ChildObjLst.add(child);
    }
        update ChildObjLst;                                           
    }

There is an error on bold colord code, can you please suggest your valuable suggestion please?
I have three pick list if i select first pick list as country then if other two picklist is blank then should get the error massage
Hey guys I'm new to salesforce and I've to update all phone numbers on contact when account phone number changes, how can I do this with trigger? please help.
I'm new to integration part, can some please tell me how can I write web serivces or can provide me any small snippet to understand. Which method is easy to use and mostly used in industry practice? What should be my approach during integration if I choose SOAP or REST API?
Please guide how to display collection items on vf page with iteration. Also while developing this what things I must remember?
can you please tell me what is the use of action region? and why & when we're using it?
any sample example please.
I've written below trigger:

trigger test_vehicle on Vehicle__c (before insert) {
    for(Vehicle__c gadi : Trigger.New){
        if(gadi.vehicle__c.contains('Honda')){
            system.debug('Honda is already exists');
        }
    }
}

and testing in a developer console like:

Vehicle__c test = new Vehicle__c();
test.Vehicle_Name='testy';
test.user_mail = 'testy@t.com';
insert test;

but getting error, can you please correct me?
Say for example I've 2 objects x & y, and they dont have any relationship. Now my task is when a perticular field of x object get insert/update/deleted then it must insert/update/deleted from y object.
How to achieve this functionality?
which components we often req. for vf page?
What will happen when I declare a class without sharing and subclass with sharing option? What is the most essential parts of coding do I need to study in terms to be good in apex coding?
I'm new to salesforce and would like to create a sample vf page which accept user input and once I clicked on save it will get inserted into my custom object and I want another button to show the record of the custom object on vf page, can you please help me for the code of vf and controller.
Its just for my learning purpose.