• naveen reddy 19
  • NEWBIE
  • 80 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 37
    Questions
  • 20
    Replies
Hi All,

We have a partner community and when user enters invalid username for password reset, its still taking. 
When users enter invalid username and submit a password reset, they are given a message telling them that they will be receiving an email with a link to reset their password.  Of course, they never receive an email because of the invalid username.

How to check password reset for only valid username for partner community.

User-added image

User-added image

Thanks,
Naveen
Hi All,

I have requirement where user have to process multiple records each at a time due to governor limitations.

For the incoming multiple records each record is taken and calls apex. After the successful response have to place the same request again. Like so to process all records.

Can someone help me how to achieve this. 
 
import { LightningElement, api, wire, track } from 'lwc';
import createRecord from '@salesforce/apex/OpportunityLoadController.createRecord';

export default class OpportunityLoadLWC extends LightningElement {  
@api error;
@api resultLst = [];
@api message; 
//
//Other logic
//
 
handleClick(e) {
        var oneRecord = resultLst.pop();
        createRecord({
           data : oneRecord
        })
        .then((result) => {
            //call createRecord again
        })
        .catch((error) => {
            this.message = 'Error received: code' + error.errorCode + ', ' +
                'message ' + error.body.message;
        });
    }

}

Thanks in advance.

Naveen Mallepalli.
Hi,

We have a trigger on ContentVersion, whenever a record is created and file attached to that record, this trigger will copy the file to another custom object record.
The file is loaded from ccScan tool and we facing below issue. Any help is really appreaciated.

User-added image 

 
Trigger ContentVersionTrigger(after update)
{
   ContentVersionHelper.onAfterUpdate(trigger.new);
}

public class ContentVersionHelper
{
    public void onAfterUpdate(list<ContentVersion> clst)
    {
        set<id> cdids=new set<id>();
        For(ContentVersion c:cLst)
        { 
            Cdids.add(c.ContentDocumentId);
        }
        List<ContentDocumentLink> cdlst=[select id,contentdocumentid, LinkedEntityId from ContentDocumentLink where contentdocumentid in:cdids];
        system.debug('#####cdlst='+cdlst);
        List<ContentDocumentLink> lst=new List<ContentDocumentLink>();
        set<id> csids=new set<id>();
        Map<Id,id> cseMap=new Map<id,id>();
        for(ContentDocumentLink cd:cdlst)
        {
            csids.add(cd.LinkedEntityId);
        }
        system.debug('#####csids='+csids);
        List<Case__c> caseLst=[select id,legacyid__c from case__c where legacyid__c=:csids];
        system.debug('#####caseLst='+caseLst);
        for(case__c c:caseLst)
        {
            cseMap.put(c.legacyid__c,c.id);
        }
        
        for(ContentDocumentLink cd:cdlst)
        {
            id myid=cd.LinkedEntityId;
            system.debug('#####myId='+myId);
            if(myId.getSObjectType().getDescribe().getName()=='ccScan__c')
            {
                             
                ContentDocumentLink cDe = new ContentDocumentLink();
                cDe.ContentDocumentId =cd.ContentDocumentId;
                system.debug('#####'+cseMap.get(cd.LinkedEntityId));
                cDe.LinkedEntityId = cseMap.get(cd.LinkedEntityId); 
                cDe.ShareType = 'V';
                cDe.Visibility = 'AllUsers';
                lst.add(cDe);
            }
            
        }
        insert lst;
        system.debug('#####lst='+lst);
    }
    
}

Thanks,
Naveen​
Hi,

How to add users under "External Data User Authentications" for named credentials without manually adding each user from user's Personal settings ==>Authentication Settings for External Systems.

We need to add multiple users at a time. Any help is really appreiciated. Thanks in advance.

User-added image

Thanks,
Naveen.
Hi,

We have uploaded a image in Documents and source URL is maintained in custom settings.
This url is refrenced in Custom (without using Letterhead) email template.
Can you please help me in how to use Image URL from custom settings in email template.

Thanks,
Naveen
Hi,

 Multiple users are following a case and when status of case gets changes, all users who are following case should notified throgh email.

User-added image

User-added image

Any help is really appreciated . 

Thanks,
Naveen.
 
Hi,

 I had to create a custom console component. Which will display some cases based on some criteria.
Whenever a user clicks case record it should open in console. Can you please help in how to open record in console from custom console components.

The following is the sample visualforce code.
 
<apex:page standardController="Case" extensions="caseCon" sidebar="false"  >
<apex:form id="frm" >
 <apex:pageBlock title="Pnned Cases">
        <apex:pageBlockTable value="{!pinnedCases}" var="cse" id="pBlk">
            <apex:column headerValue="Case Number" >
              <apex:outputLink > {!cse.CaseNumber}</apex:outputLink>    
            </apex:column>           
        </apex:pageBlockTable>
    </apex:pageBlock>
    </apex:form>
</apex:page>

User-added image

Thanks,
Naveen.
Hi,

When I'm working on getters and setters in VF and Apex. I came across differrent behaviour when I'm referring the account and string types.

The following code is giving this error "Error: Read only property 'MyControllerVF.name'".
 
public class MyControllerVF {
    private string name;
 
    public MyControllerVF() {
                          
        name='Test';
  }

    public string getName()
   {
     return name;
    
   }
 public PageReference save() 
    {      
      system.debug(name);
       return null;
   }
  }
 
<apex:page controller="MyControllerVF" tabStyle="Account">
    <apex:form >
        <apex:pageBlock title="Congratulations {!$User.FirstName}">
           <apex:inputtext value="{!name}"/>
          <apex:commandButton action="{!save}" value="save"/>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Where as the following code is saved and executed successfully. though account has only get property.:
 
public class MyController {
 
    private Account account;
 
    public MyController() {
        account = [SELECT Id, Name, Site FROM Account
                   WHERE Id = :ApexPages.currentPage().getParameters().get('id')];
    }
 
    public Account getAccount() {
        return account;
    }
 
    public PageReference save() {
        update account;
        return null;
    }
}
 
<apex:page controller="myController" tabStyle="Account">
    <apex:form>
        <apex:pageBlock title="Congratulations {!$User.FirstName}">
            You belong to Account Name: <apex:inputText value="{!account.name}"/>
            <apex:commandButton action="{!save}" value="save"/>
        </apex:pageBlock>
    </apex:form>
</apex:page>


Can you please help in understanding this different behavior.

Thanks,
Naveen.
Hi All,

 I'm trying to render a VF page as pdf. The Vf page will iterate over a list account records with repeat tag.
For each element in repeat tag I want apply a page break. The below code working but is has a issue. The below code showing empty pdf after last element. How to avoid showing empty pdf page after last page.
 
<apex:page standardController="Account" recordSetVar="accnts" sidebar="false" renderAs="pdf">
    <apex:pageBlock title="My Content" > 
        <apex:repeat value="{!accnts}" var="acc" rows="3" first="5" >   
            <div style="page-break-after:always">          
                <apex:outputText style="color: #f60; font-weight: bold;font-size:30px;" value="{!acc.Name}" >    
                </apex:outputText>
            </div>
        </apex:repeat>
    </apex:pageBlock>
</apex:page>

Thanks in advance.

Regards,
Naveen.​
Hi All,

 How to recall an approval process in apex.
We are using apex to dynmically submit for approval using below code.
Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
                req1.setComments(APPROVALNAME);
                req1.setObjectId(qla.Id);
                Approval.ProcessResult result = Approval.process(req1);

We also need to dyncamically recall approval process. Can you please help in how to recall using apex. Is beolw code work only for admin or works for submitter as well.
 
Approval.ProcessWorkitemRequest pwr = new Approval.ProcessWorkitemRequest();
pwr.setAction('Removed');

Thanks,
Naveen
Hi,

 We are facing below issue whil eopening salesforce in google chrome browser.

User-added image

I have disabled the TLS1.0 in chrome setting and java settings in control panel and restarted the machine. Still facing this issue and its troubling us a lot. Any help is really appreciated. 

User-added image

User-added image

Thanks,
Naveen.
Hi ,

 How to get the length of a attribute of type " Map" from lightning controller.

Component:
<aura:attribute name="IndexMap" type="Map" default="{ 'Draft':1, 'Pending':2, 'NeedInfo':3, 'Resolved':4, 'Closed':5}"/>

Controller:
var myMap= component.get("v.IndexMap");
        alert(myMap.length);

The above code result to "undefined". Actually I have to get "5" as myMap has 5 elements.  Can you please help in getting this.

Thanks in advance.

Regards,
Naveen.
Hi All,

  Trying to construct the data table dynamically using visualforce remoting with jquery data table.
Getting the table with empty values.
The following is the code and output. Please help me in getting this done. 
 
<apex:page controller="AccountRemoter"  sidebar="false"  docType="html-5.0" >
    
    <head>
        <link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css"/>
        
        <apex:includeScript value="{!$Resource.Jquery2}"/>
        <script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
        
        </head>
        
        <script type="text/javascript">
            $ = jQuery.noConflict();
        function getRemoteAccount() {
            
            Visualforce.remoting.Manager.invokeAction(
                '{!$RemoteAction.AccountRemoter.getAccounts}',
                function(result, event){
                    console.log(result);
                    
                    $('#example').DataTable( {
                        data: result,
                        columns: [
                            { title: "Id" },
                            { title: "Name" }
                            
                        ]
                    } );
                }, 
                {escape: true}
            );
        }
        </script>
        <button onclick="getRemoteAccount()">Get Account</button>
        <table id="example" class="display" cellspacing="0" width="100%">
            
            
        </table>
        
    </apex:page>
 
global with sharing class AccountRemoter {

    public String accountName { get; set; }
    public static Account account { get; set; }
    public AccountRemoter() { } // empty constructor
    
   
    @RemoteAction
    global static List<Account> getAccounts( ) {
        List<Account> accnts= [SELECT Id, Name 
                   FROM Account  limit 5];
        return accnts;
    }
}

Output with empty data

Any help is really appreaciated . Thanks in advance.

Regards,
Naveen
Hi,

 I have built a community of type Salesforce Tabs + Visualforce. It has custom visualforce pages and some custom community settings.
We would like to move this to other environments for testing and production.
We are currently using change sets to move to other environments.
Please suggest how to move community to other environments,

Thanks,
Naveen.

 
Hi All,

  How can we give our own custom LastModifiedaDate  to records while inserting in test classes.

We have class which has a query

  
if (jobType == PROCESS_DEL_VIOC_FRANCHISE_RECORDS) {
            query = Database.getQueryLocator([SELECT Id FROM Lead  where RecordType.Name=:RecordTypeUtil.VIOC_Franchise_Web_lead and LastModifiedDate < LAST_N_YEARS:3]);
        }

While writing test class for this class, we are trying to create some test data. To meet above condition we have to give LastModifiedDate  which must be 3 years old. How can we write a test class in this situations.

Any help is really appreciated.

Thanks,
Naveen.
How to convert the datetime to specific format

Given date:
DateTime.Now()==> 2016-08-14 18:30:00

Expected date:
 2014-01-01T00:00:00.015-04:00

Thanks,
Naveen
Hi All,

 I have a requirement. I need to display another table inside each row.

The folowing is the sample code I'm trying and  also attaching the output.
 
<apex:page sidebar="false" standardController="Account" >
    

    <apex:includeScript value="{!$Resource.Jquery}"/>
    <apex:stylesheet value="https://cdn.datatables.net/1.10.11/css/jquery.dataTables.min.css"/>
    <apex:includeScript value="https://cdn.datatables.net/1.10.11/js/jquery.dataTables.min.js"/>
  
    <script>
    $(document).ready(function() {
    $('table.display').DataTable();
} );
    </script>
    
    <style>
    div.dataTables_wrapper {
        margin-bottom: 3em;
    }
    </style>
    <apex:form >
    <apex:pageblock >
    <apex:pageBlockButtons >
    <apex:commandButton value="SSSSSSS"/>
    </apex:pageBlockButtons>
    <table id="" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>Name</th>
                <th>Position</th>
                <th>Office</th>
                <th>Age</th>
                <th>Salary</th>
            </tr>
        </thead>
       
       
        <apex:repeat value="{!Account.Opportunities}" var="opp" >
            <tr>
                <td><apex:inputCheckbox /></td>
                <td>{!opp.name}</td>
                <td>System Architect</td>
                <td>Edinburgh</td>
                <td>61</td>
                
            </tr>
            
          
              
        </apex:repeat>     
        
    </table>
    </apex:pageblock>
    </apex:form>
</apex:page>

User-added image

I need a table like as shown in below screenshot which should have all functionalities  like pagenation,auto suggestion search etc.. from above code.

User-added image




can some one please help me.

***Any help is really appreaciated.

Thanks,
Naveen.

 
Hi ,

 We need to query accounts along with contacts associated for each account and dispaly them in the following format.

1)Dispaly all accounts in a table
2)For each account we need to dispaly associated contacts in a child table for that account
i.e. For each row(account) we need to display contacts table(contacts for that account).

Can some one please help how to achieve this.

***Any help is really appreciated.

Thanks,
Naveen.
User-added image
Hi,

 We have a requirement to integrate salesforce with oracle DB. We need the the ability to create, read, edit and delete on the oracle DB and data should be stored in oracle DB from salesforce.

 We can use lightening connect to create, read, edit and delete data from and into an external system using any of these adapters.
A.    OData 2.0 adapter or OData 4.0 adapter
B.    Salesforce adapter
C.    Custom adapter created via Apex

***But we read from blogs and lighting connect documentation that there are limitations/challenges in using lightining connect for write/delete/update to external system.

We have any ODBC/JDBC kind of plug ins to connect from salesforce to Oracle DB?. Please provide any information  or any other options on how can we connect salesforce to oracle DB other then lightning connect adapters.

Thanks,
Naveen
Hi,

 I have list of ids and these Ids should be processed using batch apex.

I'm getting below error while executing batch apex.

First error: Start did not return a valid iterable object.
 
global class BatchClass implements Database.Batchable<Id> {
    global string query;
    List<Id> ids;
    String type;

    global BatchClass(List<Id> ids,String type) {
        ids= new List<Id>();
        ids=this.ids;
        type=this.type;
        System.debug('########## constructor'+ids);
    }

    global Iterable<Id> start(Database.BatchableContext BC){
        System.debug('###########'+ids);
        return ids;
    }

    global void execute(Database.BatchableContext BC, List<Id> idsToProcess) {
       
	   //Processing
       // 
    }
    
    global void finish(Database.batchableContext bc){ 
    }

}
 

BatchClass b= new BatchClass(Ids,'Process');//Ids : List of Ids
Database.executeBatch(b);

**Any help is really appriciated. Thanks in advacne.

Thanks,
Naveen.

 
Hi All,

  Trying to construct the data table dynamically using visualforce remoting with jquery data table.
Getting the table with empty values.
The following is the code and output. Please help me in getting this done. 
 
<apex:page controller="AccountRemoter"  sidebar="false"  docType="html-5.0" >
    
    <head>
        <link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css"/>
        
        <apex:includeScript value="{!$Resource.Jquery2}"/>
        <script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
        
        </head>
        
        <script type="text/javascript">
            $ = jQuery.noConflict();
        function getRemoteAccount() {
            
            Visualforce.remoting.Manager.invokeAction(
                '{!$RemoteAction.AccountRemoter.getAccounts}',
                function(result, event){
                    console.log(result);
                    
                    $('#example').DataTable( {
                        data: result,
                        columns: [
                            { title: "Id" },
                            { title: "Name" }
                            
                        ]
                    } );
                }, 
                {escape: true}
            );
        }
        </script>
        <button onclick="getRemoteAccount()">Get Account</button>
        <table id="example" class="display" cellspacing="0" width="100%">
            
            
        </table>
        
    </apex:page>
 
global with sharing class AccountRemoter {

    public String accountName { get; set; }
    public static Account account { get; set; }
    public AccountRemoter() { } // empty constructor
    
   
    @RemoteAction
    global static List<Account> getAccounts( ) {
        List<Account> accnts= [SELECT Id, Name 
                   FROM Account  limit 5];
        return accnts;
    }
}

Output with empty data

Any help is really appreaciated . Thanks in advance.

Regards,
Naveen
Hi ,
  
 I'm trying to parse Account records to JSON string. But I'm getting unnecessary data like attributes(type,url) that is not required in String.

Can any one pls help me in how to parse the string to required format.
List<Account> accnts=[Select Name,Phone From Account];
String s=JSON.serialize(accnts);
The resulting output is in below fromat..
{
  "attributes" : {
    "type" : "Account",
    "url" : "/services/data/v34.0/sobjects/Account/00128000002trGGAAY"
  },
  "Name" : "GenePoint",
  "Phone" : "(650) 867-3450",
  "Id" : "00128000002trGGAAY"
}


My requirement is to generate resulting String as below JSON string format.
 
{
  "Name" : "GenePoint",
  "Phone" : "(650) 867-3450",
  "Id" : "00128000002trGGAAY"
}

So that I can minimize the data to to be sent the the client system.

Any help is really appreciated. Thanks in advance.

Regards,
Naveen.
Hi,

We have a trigger on ContentVersion, whenever a record is created and file attached to that record, this trigger will copy the file to another custom object record.
The file is loaded from ccScan tool and we facing below issue. Any help is really appreaciated.

User-added image 

 
Trigger ContentVersionTrigger(after update)
{
   ContentVersionHelper.onAfterUpdate(trigger.new);
}

public class ContentVersionHelper
{
    public void onAfterUpdate(list<ContentVersion> clst)
    {
        set<id> cdids=new set<id>();
        For(ContentVersion c:cLst)
        { 
            Cdids.add(c.ContentDocumentId);
        }
        List<ContentDocumentLink> cdlst=[select id,contentdocumentid, LinkedEntityId from ContentDocumentLink where contentdocumentid in:cdids];
        system.debug('#####cdlst='+cdlst);
        List<ContentDocumentLink> lst=new List<ContentDocumentLink>();
        set<id> csids=new set<id>();
        Map<Id,id> cseMap=new Map<id,id>();
        for(ContentDocumentLink cd:cdlst)
        {
            csids.add(cd.LinkedEntityId);
        }
        system.debug('#####csids='+csids);
        List<Case__c> caseLst=[select id,legacyid__c from case__c where legacyid__c=:csids];
        system.debug('#####caseLst='+caseLst);
        for(case__c c:caseLst)
        {
            cseMap.put(c.legacyid__c,c.id);
        }
        
        for(ContentDocumentLink cd:cdlst)
        {
            id myid=cd.LinkedEntityId;
            system.debug('#####myId='+myId);
            if(myId.getSObjectType().getDescribe().getName()=='ccScan__c')
            {
                             
                ContentDocumentLink cDe = new ContentDocumentLink();
                cDe.ContentDocumentId =cd.ContentDocumentId;
                system.debug('#####'+cseMap.get(cd.LinkedEntityId));
                cDe.LinkedEntityId = cseMap.get(cd.LinkedEntityId); 
                cDe.ShareType = 'V';
                cDe.Visibility = 'AllUsers';
                lst.add(cDe);
            }
            
        }
        insert lst;
        system.debug('#####lst='+lst);
    }
    
}

Thanks,
Naveen​
Hi,

 I had to create a custom console component. Which will display some cases based on some criteria.
Whenever a user clicks case record it should open in console. Can you please help in how to open record in console from custom console components.

The following is the sample visualforce code.
 
<apex:page standardController="Case" extensions="caseCon" sidebar="false"  >
<apex:form id="frm" >
 <apex:pageBlock title="Pnned Cases">
        <apex:pageBlockTable value="{!pinnedCases}" var="cse" id="pBlk">
            <apex:column headerValue="Case Number" >
              <apex:outputLink > {!cse.CaseNumber}</apex:outputLink>    
            </apex:column>           
        </apex:pageBlockTable>
    </apex:pageBlock>
    </apex:form>
</apex:page>

User-added image

Thanks,
Naveen.
Hi All,

 I'm trying to render a VF page as pdf. The Vf page will iterate over a list account records with repeat tag.
For each element in repeat tag I want apply a page break. The below code working but is has a issue. The below code showing empty pdf after last element. How to avoid showing empty pdf page after last page.
 
<apex:page standardController="Account" recordSetVar="accnts" sidebar="false" renderAs="pdf">
    <apex:pageBlock title="My Content" > 
        <apex:repeat value="{!accnts}" var="acc" rows="3" first="5" >   
            <div style="page-break-after:always">          
                <apex:outputText style="color: #f60; font-weight: bold;font-size:30px;" value="{!acc.Name}" >    
                </apex:outputText>
            </div>
        </apex:repeat>
    </apex:pageBlock>
</apex:page>

Thanks in advance.

Regards,
Naveen.​
How to convert the datetime to specific format

Given date:
DateTime.Now()==> 2016-08-14 18:30:00

Expected date:
 2014-01-01T00:00:00.015-04:00

Thanks,
Naveen
Hi All,

 I have a requirement. I need to display another table inside each row.

The folowing is the sample code I'm trying and  also attaching the output.
 
<apex:page sidebar="false" standardController="Account" >
    

    <apex:includeScript value="{!$Resource.Jquery}"/>
    <apex:stylesheet value="https://cdn.datatables.net/1.10.11/css/jquery.dataTables.min.css"/>
    <apex:includeScript value="https://cdn.datatables.net/1.10.11/js/jquery.dataTables.min.js"/>
  
    <script>
    $(document).ready(function() {
    $('table.display').DataTable();
} );
    </script>
    
    <style>
    div.dataTables_wrapper {
        margin-bottom: 3em;
    }
    </style>
    <apex:form >
    <apex:pageblock >
    <apex:pageBlockButtons >
    <apex:commandButton value="SSSSSSS"/>
    </apex:pageBlockButtons>
    <table id="" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>Name</th>
                <th>Position</th>
                <th>Office</th>
                <th>Age</th>
                <th>Salary</th>
            </tr>
        </thead>
       
       
        <apex:repeat value="{!Account.Opportunities}" var="opp" >
            <tr>
                <td><apex:inputCheckbox /></td>
                <td>{!opp.name}</td>
                <td>System Architect</td>
                <td>Edinburgh</td>
                <td>61</td>
                
            </tr>
            
          
              
        </apex:repeat>     
        
    </table>
    </apex:pageblock>
    </apex:form>
</apex:page>

User-added image

I need a table like as shown in below screenshot which should have all functionalities  like pagenation,auto suggestion search etc.. from above code.

User-added image




can some one please help me.

***Any help is really appreaciated.

Thanks,
Naveen.

 
Hi ,

 We need to query accounts along with contacts associated for each account and dispaly them in the following format.

1)Dispaly all accounts in a table
2)For each account we need to dispaly associated contacts in a child table for that account
i.e. For each row(account) we need to display contacts table(contacts for that account).

Can some one please help how to achieve this.

***Any help is really appreciated.

Thanks,
Naveen.
User-added image
Hi,

 I have list of ids and these Ids should be processed using batch apex.

I'm getting below error while executing batch apex.

First error: Start did not return a valid iterable object.
 
global class BatchClass implements Database.Batchable<Id> {
    global string query;
    List<Id> ids;
    String type;

    global BatchClass(List<Id> ids,String type) {
        ids= new List<Id>();
        ids=this.ids;
        type=this.type;
        System.debug('########## constructor'+ids);
    }

    global Iterable<Id> start(Database.BatchableContext BC){
        System.debug('###########'+ids);
        return ids;
    }

    global void execute(Database.BatchableContext BC, List<Id> idsToProcess) {
       
	   //Processing
       // 
    }
    
    global void finish(Database.batchableContext bc){ 
    }

}
 

BatchClass b= new BatchClass(Ids,'Process');//Ids : List of Ids
Database.executeBatch(b);

**Any help is really appriciated. Thanks in advacne.

Thanks,
Naveen.

 
Hi ,
 I'm trying to debug using eclipse with apex debuggger. But facing below issue.
Can some one pls guide me how to solve this.

User-added image


Thanks,
Naveen
Hi,

 Creating a Task with more than one contacts associated with it.
Written a after insert trigger on Task and trying to get TaskWhoRelations for that task but it is giving only one Contact.

User-added image

 
trigger TaskTrigger on Task (after insert) {

List<Task> tasks=[Select WhoId, WhatId, (Select Id, RelationId, TaskId From TaskWhoRelations) From Task where id  IN : Trigger.NewMap.keySet()];

for(Task t:tasks)
{

System.debug('################'+t.TaskWhoRelations);
System.debug('################'+t.TaskWhoRelations.size());
}

}



**Any help is really appreaciated. 
Thanks in advance.


Thanks,
Naveen.
Hi ,

 Im trying to deploy changes using ANT migration tool.

I'm getting below error. Please help me. Any help is really appreciated.
API Name Type        Line   Column     Error Message
Account  Custom Object 0 0 Custom Field Definition ID: bad value for restricted picklist field: RecordType

Thanks,
Naveen
Hi,
 My requirement is

1)Need to add abutton to Account list view page say ex:'Process Selected'

2)Whenever I select the list of records and click 'Process Selected' , It should peform contoller action and should not redirect to any other page.

3)What type of button should I use and How to call contoller method from List view Button.

4)Only for this button we need to execute controller method for remaining all logic is standard logic only.

Any help is really appreciated

Thanks in advance.

User-added image

Regards,
Naveen.
Hi ,
  
 I'm trying to parse Account records to JSON string. But I'm getting unnecessary data like attributes(type,url) that is not required in String.

Can any one pls help me in how to parse the string to required format.
List<Account> accnts=[Select Name,Phone From Account];
String s=JSON.serialize(accnts);
The resulting output is in below fromat..
{
  "attributes" : {
    "type" : "Account",
    "url" : "/services/data/v34.0/sobjects/Account/00128000002trGGAAY"
  },
  "Name" : "GenePoint",
  "Phone" : "(650) 867-3450",
  "Id" : "00128000002trGGAAY"
}


My requirement is to generate resulting String as below JSON string format.
 
{
  "Name" : "GenePoint",
  "Phone" : "(650) 867-3450",
  "Id" : "00128000002trGGAAY"
}

So that I can minimize the data to to be sent the the client system.

Any help is really appreciated. Thanks in advance.

Regards,
Naveen.
Hi,
 I have modified a picklist value .
I would like to retrieve that picklist value only.
Please help me in retrieving the picklist values based on modified date.

User-added image


**Any help is really appreciated.Thanks in advance.

Regards,
Naveen