• Deepu Gupta 29
  • NEWBIE
  • 20 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 28
    Questions
  • 23
    Replies
Hi All,

I am new to the lightning.
I have requirement where I have created one Search Lightning page which will serach based on some input fields and giving me output in datatable.

Now,I have added one button in the last column of the datatable and this button is there on each record of datatable,now on the click of that button,I want to navigate it to the standard Opportunity page layout and setting this output row's result into Opportunity layout fields.
supose I have recieved Id,name,address as a result and i want to set this address into opportunity's address field.how can i achieve this?Please suggest.

Thanks in Advance !!
Hi All,

I have a urgent req,as i have a one custom object which is a child of the Opportunity.Now,the req is user should be able to create new record in this custom object only when it has a skilltest field not blank and this field is in Contact Object.So,before creation it needs to check that looged in user has this skillset or not.
I am not sure how can I achieve this Req.
Any suggestions?
Is it be done via validation rule?
Can anyone suggest on the below scenario can be achieved via configuration or not:
I have Grand Parent(Custom Object) Parent(Opportunity) and Child(Child Opportunity),
Now,if Grand Parent's Record Type == Child Opportunity Record Type and date is greater than today then stamp this grand parent into child opportunity.
There is also a lookup relationship in this cutom object and opportunity.
Hi All,
I have very urgent req.in which i have to populate custom object field on the child opportunity creation.
Parent Opp and 
I have a Child Opp(Self lookup) where Record Type = 'ABC'
Now,one custom object(ProgramPlan) where PWType(Field Name) = 'ABC'

There is a lookup relationship between this custom object and opportunity.
So,whenever new opportunity created it should stamp that ProgramPlan on the opportunity.
Please suggest how can i achieve this req.
 
Hi All,
Its bit confusing for me.Can someone help me that how can i write a trigger on opportunity so that when a child opporunity gets created ,parent opportunity checkbox should be checked automatically.There is self lookup on opportunity.and we are identifying Parent and Child Opportunity based on the record type.

Thanks in Adavance.
Hi All,
I have Req in which i need to copy Standard Partner account lookup field to another custom field which also has a lookup of account.is it possible to achieve thi Req via process builder or how can i go ahead with this req?Please suggest.
 
​Hi All,

I have Req where i need to update Parent Object(Opportunity) Checkbox when the child object(custom object) checkbox is true.There is lookup relationship between both the objects.
I have achive this via below code :

trigger RRRequired on ESA_Result__c (after insert, after update) {
    list<Opportunity> listofParentObjToUpdate;
    set<Id> setOfids = new set<Id>();
    for(ESA_Result__c childobj :trigger.new){
     if(childobj.ESA_R_R_Required_EI__c==true){
            setOfids.add(childobj.ParentOpportunity_EI__c);// you child object must having parent object field, put that field Api Name here
     }
    }
   if(!setOfids.isEmpty()) {
                list<opportunity> listOfParentObj = [select id,ESA_R_R_Required_EI__c from opportunity where Id =: setOfids];
                listofParentObjToUpdate = new list<opportunity>();
                  
                    for(opportunity parent : listOfParentObj) {
                        parent.ESA_R_R_Required_EI__c = true;
      listofParentObjToUpdate.add(parent);
                    }
                }
            Update listofParentObjToUpdate;
}

Now the issue is for this custom object.Because its parent is child opp and i want to update that checkbox on its parent opportunity.
for ex.
Result : Custom object -> Child Opp -> Parent Opp
and i want to update the checkbox true whenever Result custom object checkbox is true.

Any suggestion?
 
Hi,
Some wiered issue found today.My visualforce page is properly working in Chrome with version 40 and not working with the version 51.Our users are having blue screen when they try to navigate on that page(version 53).As per my R&D found that its because of browser version issue.and this is only for desktop not for SF1.Could any one suggest that how can i solve this issue?
Hi,
As in my req the user needs to get a email notification while follow up task assign to him/her.I have checked the setting for user the Email notification flag is already active in his activity setting but still they are not getting any mail.Now,I have checked the workflows as well but not finding anything for followup task.Could any one suggest that is this a Standard functionality of SFDC?and if yes then what needs to be taken under care to notify the user.Beause as checked in developer org not working for admin profile as well.
Hi All,
I have urgent req that in my Hierarchy of account and contact i need to add image as a contact icon instead of a color but not sure how to achieve it.Could any suggest for the same.
for(Contact con : AccountHierarchyServices.getAllContact(acc)){
            listItems.add(
                new JSTreeNode(
                    con.Id,
                    acc.Id,
                    con.Name,
                    new JSTreeNodeState(false, false, false),
                    new JSTreeNodeAAttr(String.valueOf(con.Id) == currentId ? 'font-family:Impact': 'color:green')
                )
            );

 
Hi,
I have a req in which i need to enable drag drop feature in visualforce page.I have searched for muliple solutions to achieve this req.While searching went in this link too but there component is missing.http://salesforcelexis.blogspot.in/2012/05/drag-drop-option-in-custom-visualforce.html.
Could any one please suggest that how can i achieve this req?
Hi All,
My code is like this :
<apex:page standardController="Account">
  <apex:form >
  <apex:pageBlock > 
<apex:pageBlockSection title="Account Hierarchy" columns="2">

  <c:HierarchyTree currId="{!Account.id}" />
  
</apex:pageBlockSection>
</apex:pageBlock>
<table align ="centre">
<tr>
 <td><apex:commandLink action="{!Cancel}" target="_top" value="BacktoAccount" id="theButton1"/></td>
 <td></td>
 <td></td>
<td><apex:commandLink value="IncludeContact" target="_top" onclick="redirect();"/></td>
 </tr>   
<script>
    
   function redirect(){
      var accId = '{!$CurrentPage.parameters.Id}';

        if( (typeof sforce != 'undefined') && (sforce != null) ) {
         sforce.one.navigateToURL('/apex/Hierarchy_Clone?id='+accId);
        }
        
        else{
       
        window.open('/apex/Hierarchy_Clone?id='+accId,'_parent');
     
        }
       } 
  </script>
  
  </table>
     </apex:form>
</apex:page>

But its not navigating me on the Hierarchy_Clone page on the clickling the link of the Inculde Contact.Could any one suggest me on that?Its on urgent basis.
Hi All,
I have a ticket in which user who is a marketing user want to review all the open opportunities.they provided me two another user whose created opportunities he want to know.but when i check the role the marketing user has the same role with another two users and as per salesforce reports it will allow only the data of its subordinates whose role is below then markting user role.so it is not possible to do it via reports.so any one can suggest any another approach for the same?
I have req that if I am creating a temporary account(record type) and select its parent account and on selecting parent account its category and subcategory field are inherited via parent account only.that i have already achieved.now what i need to do is when account category is not blank and its dependent field value is there  of focus area(field).so the focus area field value should be inherited via account category dependent value.
It should be like this :
like : if(Account type = "Temp account" &&  ParentId != null && Account Category != null) 
Now i am not sure how to achive inherit logic in my code and it will work on after save means after trigger.could any one suggest how can i achieve this req.?
Hi All,
I have used controller class to navigate pages via page refrence but whenever i am navigating from one page to another the two links which is there in second page areUser-added image working fine in browser but not working in SF1.could please any one suggest how can i visible this link in SF1.Attaching screenshot for refrence and controller code.
public with sharing class WithContactButtonController
{
    private ApexPages.StandardController standardController;
    public Id currId= apexpages.currentpage().getparameters().get('Id');

    
    public WithContactButtonController(ApexPages.StandardController standardController)
    {
        this.standardController = standardController;
        
    }
    public PageReference renderforShowAccHierarchy()
    {
        // Apex code for handling record from a Detail page goes here
        //Id recordId = standardController.getId();
        //PageReference pageRef = new PageReference('/apex/HierarchyPage1?retURL=/apex/HierarchyPage?Id='+standardController.getId());
         PageReference pageRef = new PageReference('/apex/HierarchyPage1?Id='+currId);
         pageRef.setRedirect(true);
         return pageRef ;
    }
    public PageReference IncludeContactpage()
    {
        // Apex code for handling record from a Detail page goes here
        PageReference pageRef1 = new PageReference('/apex/Hierarchy_Clone?Id='+currId);
        pageRef1.setRedirect(true);
        return pageRef1;

    }
 
//This is my page where i am navigating via link

 <apex:page standardController="Account" tabStyle="Account" extensions="WithContactButtonController">
<apex:form >
<apex:pageBlock > 
<apex:pageBlockSection title="Account Hierarchy" columns="2">


<c:HierarchyTree currId="{!Account.id}" />



</apex:pageBlockSection>
</apex:pageBlock>

<script>
     var url = location.href;
     var match = url.match(/inline=1/);
    if (match != null) { 
        var newUrl = url.replace(/inline=1/, '');
        window.top.location=newUrl;
    }
</script>
<table align ="centre">
<tr>
<td><b><apex:commandLink action="{!Cancel}" target="_top" value="BacktoAccount" id="theButton1"/></b></td>
<td></td>
<td></td>  
         
<td><b><apex:commandLink action="{!IncludeContactpage}" target="_top" value="IncludeContact" id="theButton"/></b></td>



</tr>
</table>


</apex:form>
</apex:page>

let me know how can i solve this issue.
Hi All,
I have created a link in Account Hierarchy(inline VF Page) Section under Account Detail Page which is navigating me on another page where this whole Hierachy shown and two other links are given which is navigating me on another VF page its working fine in browser but not working in SF1.Navigating code is written in this controller which i am sharing.I have enable the checkbox in VF page to Available for Salesforce mobile apps and Lightning Pages.
<apex:page standardController="Account" tabStyle="Account" extensions="WithContactButtonController">
<apex:form >
<apex:pageBlock > 
<apex:pageBlockSection title="Account Hierarchy" columns="2">


<c:HierarchyTree currId="{!Account.id}" />



</apex:pageBlockSection>
</apex:pageBlock>

<script>
     var url = location.href;
     var match = url.match(/inline=1/);
    if (match != null) { 
        var newUrl = url.replace(/inline=1/, '');
        window.top.location=newUrl;
    }
</script>
<table align ="centre">
<tr>
<td><b><apex:commandLink action="{!Cancel}" target="_top" value="BacktoAccount" id="theButton1"/></b></td>
<td></td>
<td></td>             
<td><b><apex:commandLink action="{!IncludeContactpage}" target="_top" value="IncludeContact" id="theButton"/></b></td>
</tr>
</table>


</apex:form>
</apex:page>

public with sharing class WithContactButtonController
{
    private ApexPages.StandardController standardController;
    public Id currId= apexpages.currentpage().getparameters().get('Id');

    
    public WithContactButtonController(ApexPages.StandardController standardController)
    {
        this.standardController = standardController;
        
    }
    public PageReference renderforShowAccHierarchy()
    {
        // Apex code for handling record from a Detail page goes here
        //Id recordId = standardController.getId();
        //PageReference pageRef = new PageReference('/apex/HierarchyPage1?retURL=/apex/HierarchyPage?Id='+standardController.getId());
         PageReference pageRef = new PageReference('/apex/HierarchyPage1?Id='+currId);
         pageRef.setRedirect(true);
         return pageRef ;
    }
    public PageReference IncludeContactpage()
    {
        // Apex code for handling record from a Detail page goes here
        PageReference pageRef1 = new PageReference('/apex/Hierarchy_Clone?Id='+currId);
        pageRef1.setRedirect(true);
        return pageRef1;

    }
    
}


User-added image

User-added image
Hi All,
I have created a inline vf page on account  in which have given a link which is navigating me on another page.this is working fine in my browser but same thing is not happning when i am testing it on ipad sf1.its just navigating me on the same page but on top.I have Enabled the checkbox in my second page as 
Available for Salesforce mobile apps and Lightning Pages but still its not visible in sf1.could any one suggest how can i resolve this issue?
Hi All,
Having very small req but not able to find out its way to resolve.In the opportunity screen there is section Opportunity Team in which three buttons are there.User-added image
Now when i cheked at profile level the object has read/write access but i want to know this particular section's buttons that for which conditions they are enabling and disabling.means is it based on Role/Profile or opportunity owner.
 
Hi All,

Just need a confirmation,if we change role lable,Role Name as displayed on reports is there any data loss?Tested and data loss has not been done.but i am not able to find out anything in wriiten for the same thing in salesforce.
Will it be possible to create a calendar that will be reviewed and completed by a specific group of users ( abc_india) in order to get an overview of all the campaigns cross businesses and better plan them
 
Can anyone suggest on the below scenario can be achieved via configuration or not:
I have Grand Parent(Custom Object) Parent(Opportunity) and Child(Child Opportunity),
Now,if Grand Parent's Record Type == Child Opportunity Record Type and date is greater than today then stamp this grand parent into child opportunity.
There is also a lookup relationship in this cutom object and opportunity.
Hi All,
Its bit confusing for me.Can someone help me that how can i write a trigger on opportunity so that when a child opporunity gets created ,parent opportunity checkbox should be checked automatically.There is self lookup on opportunity.and we are identifying Parent and Child Opportunity based on the record type.

Thanks in Adavance.
Hi All,
I have Req in which i need to copy Standard Partner account lookup field to another custom field which also has a lookup of account.is it possible to achieve thi Req via process builder or how can i go ahead with this req?Please suggest.
 
​Hi All,

I have Req where i need to update Parent Object(Opportunity) Checkbox when the child object(custom object) checkbox is true.There is lookup relationship between both the objects.
I have achive this via below code :

trigger RRRequired on ESA_Result__c (after insert, after update) {
    list<Opportunity> listofParentObjToUpdate;
    set<Id> setOfids = new set<Id>();
    for(ESA_Result__c childobj :trigger.new){
     if(childobj.ESA_R_R_Required_EI__c==true){
            setOfids.add(childobj.ParentOpportunity_EI__c);// you child object must having parent object field, put that field Api Name here
     }
    }
   if(!setOfids.isEmpty()) {
                list<opportunity> listOfParentObj = [select id,ESA_R_R_Required_EI__c from opportunity where Id =: setOfids];
                listofParentObjToUpdate = new list<opportunity>();
                  
                    for(opportunity parent : listOfParentObj) {
                        parent.ESA_R_R_Required_EI__c = true;
      listofParentObjToUpdate.add(parent);
                    }
                }
            Update listofParentObjToUpdate;
}

Now the issue is for this custom object.Because its parent is child opp and i want to update that checkbox on its parent opportunity.
for ex.
Result : Custom object -> Child Opp -> Parent Opp
and i want to update the checkbox true whenever Result custom object checkbox is true.

Any suggestion?
 
Hi,
I have a req in which i need to enable drag drop feature in visualforce page.I have searched for muliple solutions to achieve this req.While searching went in this link too but there component is missing.http://salesforcelexis.blogspot.in/2012/05/drag-drop-option-in-custom-visualforce.html.
Could any one please suggest that how can i achieve this req?
Hi All,
I have created a link in Account Hierarchy(inline VF Page) Section under Account Detail Page which is navigating me on another page where this whole Hierachy shown and two other links are given which is navigating me on another VF page its working fine in browser but not working in SF1.Navigating code is written in this controller which i am sharing.I have enable the checkbox in VF page to Available for Salesforce mobile apps and Lightning Pages.
<apex:page standardController="Account" tabStyle="Account" extensions="WithContactButtonController">
<apex:form >
<apex:pageBlock > 
<apex:pageBlockSection title="Account Hierarchy" columns="2">


<c:HierarchyTree currId="{!Account.id}" />



</apex:pageBlockSection>
</apex:pageBlock>

<script>
     var url = location.href;
     var match = url.match(/inline=1/);
    if (match != null) { 
        var newUrl = url.replace(/inline=1/, '');
        window.top.location=newUrl;
    }
</script>
<table align ="centre">
<tr>
<td><b><apex:commandLink action="{!Cancel}" target="_top" value="BacktoAccount" id="theButton1"/></b></td>
<td></td>
<td></td>             
<td><b><apex:commandLink action="{!IncludeContactpage}" target="_top" value="IncludeContact" id="theButton"/></b></td>
</tr>
</table>


</apex:form>
</apex:page>

public with sharing class WithContactButtonController
{
    private ApexPages.StandardController standardController;
    public Id currId= apexpages.currentpage().getparameters().get('Id');

    
    public WithContactButtonController(ApexPages.StandardController standardController)
    {
        this.standardController = standardController;
        
    }
    public PageReference renderforShowAccHierarchy()
    {
        // Apex code for handling record from a Detail page goes here
        //Id recordId = standardController.getId();
        //PageReference pageRef = new PageReference('/apex/HierarchyPage1?retURL=/apex/HierarchyPage?Id='+standardController.getId());
         PageReference pageRef = new PageReference('/apex/HierarchyPage1?Id='+currId);
         pageRef.setRedirect(true);
         return pageRef ;
    }
    public PageReference IncludeContactpage()
    {
        // Apex code for handling record from a Detail page goes here
        PageReference pageRef1 = new PageReference('/apex/Hierarchy_Clone?Id='+currId);
        pageRef1.setRedirect(true);
        return pageRef1;

    }
    
}


User-added image

User-added image
Hi All,
Having very small req but not able to find out its way to resolve.In the opportunity screen there is section Opportunity Team in which three buttons are there.User-added image
Now when i cheked at profile level the object has read/write access but i want to know this particular section's buttons that for which conditions they are enabling and disabling.means is it based on Role/Profile or opportunity owner.
 
Very basic question,but not able to recognize.There is a Data displaying under some headings likes Notes & smthing.under that some fields are mentioned.but its not an object not a list.i am not able to find out a way to go on that particular object and find its field.
Hi

I need to write a test class from below approval process. Can anyone please help me

    public static Approval.ProcessResult removeQuoteFromApproval(Id quoteId) {
      List<ProcessInstance> piList = [Select p.TargetObjectId, p.Status From ProcessInstance p where TargetObjectId = :quoteId];
      Approval.ProcessResult result =  null;
      if(piList.size() > 0 && piList[0].Status == 'Pending') {
        Approval.ProcessWorkitemRequest pwr = new Approval.ProcessWorkitemRequest();
      pwr.setAction('Removed');
      pwr.setComments('Quote submitted with updated discounts');
      pwr.setWorkitemId(quoteId);
      result = Approval.process(pwr);
      
      if(!result.isSuccess()) {
          Database.Error[] errors = result.getErrors();
          for(Database.Error dbe : errors) {
            system.debug(dbe.getMessage());
          }
        }
      }
      
      return result;
    }

Thanks