• Rajesh SFDC
  • NEWBIE
  • 40 Points
  • Member since 2013
  • Salesforce Developer
  • Infosys

  • Chatter
    Feed
  • 0
    Best Answers
  • 8
    Likes Received
  • 1
    Likes Given
  • 115
    Questions
  • 31
    Replies
Hi all,
I am getting an error like this "SOAP Responses was a nack "in Delivery Failure Reason salesforce, i am sending an  outbound message notifications to dotnet. its working in my machine . 
suppose ,if i host the serivce to some other machines, i am getting an errors "SOAP Responses was a nack " in outbound message.
please help me Friends 
Hi all,
I am getting an error like this "SOAP Responses was a nack "in Delivery Failure Reason salesforce, i am sending an  outbound message notifications to dotnet. its working in my machine . 
suppose ,if i host the serivce to some other machines, i am getting an errors "SOAP Responses was a nack " in outbound message.
please help me Friends 
Hi all,
I am getting an error like this "SOAP Responses was a nack "in Delivery Failure Reason salesforce, i am sending an  outbound message notifications to dotnet. its working in my machine . 
suppose ,if i host the serivce to some other machines, i am getting an errors "SOAP Responses was a nack " in outbound message.
please help me Friends 
Here,my requirements, i am created one apex trigger. i want to cal those apex trigger to custom button for Enable or disbale is it possiable ?
select id,Name,patientcount__c,Refferal_To_Count__c,color__c,CreatedDate,lastmodifieddate,Referral_Type__c  from Account where   Id IN :  ac1 OR Id IN : ac2   order by Referral_Type__c asc, patientcount__c desc 
1.Referral_Type__c  is picklist . its working fine
2.patientcount__c  is total based on total, i want to display the account names is Desc order , in this query its not  working for  me 
 
I have  created visualforce excel format adding to email attachment, sending emails is successfully buts its shows excel format empty page, and  also display some ratio values in visualforce page while downloading the excel format its automatically ratio to date format eg(Ratio 2/ 1 into Jan 2 format ) , i dont want to convert date format in excel sheet , please help me 
here my code given below:
public Class GenerateCSV 
{
   public PageReference SendEmail() 
      {
            Messaging.EmailFileAttachment attachment = new Messaging.EmailFileAttachment();
            attachment.setFileName('Report.pdf');
             PageReference csvPage = Page.GenerateCSV;  
            Blob csvBlob = csvPage.getContent();
            attachment.setBody(csvBlob);
            //attachment.setContentType('pdf');
            attachment.setContentType('application/vnd.ms-excel');
            Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
            message.setFileAttachments(new Messaging.EmailFileAttachment[] { attachment } );
            message.setSubject('Report');
            message.setPlainTextBody('The report is attached.');
            message.setToAddresses( new String[] { 'rajesh87sfdc@gmail.com' } );
            Messaging.sendEmail( new Messaging.SingleEmailMessage[] { message } );
            Return null;
            
         }
}

here i am getting only blank excel in mails 
    
    
     
here, i am written query like this, its shows nulls
Select Id, Name, (Select Subject, LastModifiedDate from ActivityHistories Order By LastModifiedDate DESC ) From Account
1.string d1=27/11/2014 14:23:16

2.string d2=11/27/2014 14:23:16

3.strind d3=2014/11/27 14:23:16

4.string d4=2014/27/11 14:23:16

5.string d5=12/27/2014 10:23:00 AM

6.Sring d6=27/12/2014 10:23:00 AM

7.6.Sring d6=2014/27/12 10:23:00 AM

Output
=============================================
final output like this : 11/27/2014 9:06 AM
here my input like this given below ;
1.string d1=27/11/2014 14:23:16

2.string d2=11/27/2014 14:23:16

3.strind d3=2014/11/27 14:23:16

4.string d4=2014/27/11 14:23:16
i need a like this output please help me any
Output
=============================================
final output like this : 11/27/2014 9:06 AM
here my input like this given below ;
1.string d1=27/11/2014 14:23:16

2.string d2=11/27/2014 14:23:16

3.strind d3=2014/11/27 14:23:16

4.string d4=2014/27/11 14:23:16
i need a like this output please help me any
Output
=============================================
final output like this : 11/27/2014 9:06 AM
The following value is my input
'11/21/2014 15:20:00'
i want to change the above value format like '11/21/2014 03:20 pm'
how to do this any help me

i am getting errors like this "System.TypeException: Invalid date/time: 11/21/2014 15:20:00"
The following value is my input
'11/21/2014 15:20:00'
i want to change the above value format like '11/21/2014 03:20 pm'
how to do this any help me
 
1.Here, i am created one scheduler apex class for Send bulk Emails  its call at every morning. suppose, i want to send bulk emails like a 10,000 records using schedular apex class, is it possiable ?

 
here updated winter15 in sandbox edition am using that why getting an error

am added enterprise to visual studio getting some errors
<xsd:element name="Id" nillable="true" type="tns:ID" />

enterprise.soap.sforce.comID is not Desclared
here sandbox updated winter 15 that didnt working i think so,
The document at the url file:///C:/Users/ESTSYS2/Desktop/FetchingCaseRecords.wsdl was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'XML Schema' is 'The root element of a W3C XML Schema should be <schema> and its namespa
here sandbox updated winter 15 that didnt working i think so,
The document at the url file:///C:/Users/ESTSYS2/Desktop/FetchingCaseRecords.wsdl was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'XML Schema' is 'The root element of a W3C XML Schema should be <schema> and its namespa
here sandbox updated winter 15 that didnt working i think so,
The document at the url file:///C:/Users/ESTSYS2/Desktop/FetchingCaseRecords.wsdl was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'XML Schema' is 'The root element of a W3C XML Schema should be <schema> and its namespac
Act, i am written one apex web serivces after that download the web services class and save it in desktop. using visual studio add web references , i am getting error like this ,help me
The document at the url file:///C:/Users/ESTSYS2/Desktop/FetchingCaseRecords.wsdl was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'XML Schema' is 'The root element of a W3C XML Schema should be <schema> and its namespac
Act, i am written one apex web serivces after that download the web services class and save it in desktop. using visual studio add web references , i am getting error like this ,help me
The document at the url file:///C:/Users/ESTSYS2/Desktop/FetchingCaseRecords.wsdl was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'XML Schema' is 'The root element of a W3C XML Schema should be <schema> and its namespac
here my requirments, i have three salesforce account, i want to integrate TFS to THREE SALESFORCE organisation ,
instead of that eveytime adding Enterprise wsdl for three salesforce organisation account to TFS microsoft, i want to add programmatically Enterprise
wsdl files to TFS, is it possiable or not?.

integrationg TFS with three salesforce organisation account.
here my requirments, i have three salesforce account, i want to integrate TFS to THREE SALESFORCE organisation ,
instead of that eveytime adding Enterprise wsdl for three salesforce organisation account to TFS microsoft, i want to add programmatically Enterprise
wsdl files to TFS, is it possiable or not?.

integrationg TFS with three salesforce organisation account.
i have a four account in salesforce.. whenever edit and created new fields in objects, after
i am adding webreferences.. i dont want to  use webreference. is take user name and pwd
salesforce organisation add enterpise wsdl files to microsoft. is it possiable or not ??
here i have requirments at all time generate enterprise wsdl file add webreference in TFS

I WANT TO check it which organisation conatining those wsdl file .. i have an 2 accounts in salesforce
how to do programmatically .....all time generating those wsdl file... once two files .. i want to check it which organtion
for containging those enterprise file...
here i have requirments at all time generate enterprise wsdl file add webreference in TFS

I WANT TO check it which organisation conatining those wsdl file .. i have an 2 accounts in salesforce
how to do programmatically .....all time generating those wsdl file... once two files .. i want to check it which organtion
for containging those enterprise file...
  here my code.....
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Web;
using System.Web.Caching;
using System.Web.Services;
using System.Diagnostics;
using SFDCWebServices;
using CaseNotifications;  ==============> dis s outbound message wsdl file
using System.Data;
using Enterprise; ===api in salesforce...
using System.Web.Services.Protocols;
using Microsoft.TeamFoundation.WorkItemTracking.Client;
using Microsoft.TeamFoundation.Client;
using System.IO;
using System.Reflection;
using System.Xml;
using System.Xml.Linq;


/// <summary>
/// Summary description for WebService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class WebService : INotificationBinding
{
    public static string strUserName = "expertsolution@sfdc.com";
    public static string strpassword = "welcome@123e2XWW2t07FUSpsdbbcYCFyxp";
    public SforceService binding;
    public static LoginResult lr;
    private LoginResult loginResult;
    public static bool isLogin = false;

    public string strCaseno = string.Empty;
    public string strOrigin = string.Empty;
    public string strTicketno = string.Empty;
    public string strTicketlink = string.Empty;
    public string strDeal = string.Empty;
    public string strState = string.Empty;
    public string strReason = string.Empty;
    public string strAssignto = string.Empty;
    DataTable dtXMLDetails = new DataTable();

    public string strField = string.Empty;

    public bool isSave = false;

    int strTFSID = 0;


    public WebService()
    {

        //Uncomment the following line if using designed components
        //InitializeComponent();
    }


    #region INotificationBinding Members

    notificationsResponse INotificationBinding.notifications(notifications notifications1)
    {
        CaseNotifications.CaseNotification[] cases = notifications1.Notification;

        notificationsResponse response = new notificationsResponse();

        try
        {

            DataTable dt = GetXMLToDataTable();

            System.Diagnostics.Debug.WriteLine("\n\n\n\n\n\n\n\n\n\n");

            for (int i = 0; i < cases.Length; i++)
            {
                System.Diagnostics.Debug.WriteLine("Notification " + (i + 1));

                CaseNotifications.CaseNotification notification = cases[i];
              
                CaseNotifications.Case con = (CaseNotifications.Case)notification.sObject;
               
                strCaseno = con.CaseNumber;
                strOrigin = con.Origin;
                strTicketno = con.Title__c;
              
                strState = con.State__c;
                strReason = con.Reason__c;
              
                strTFSID = Convert.ToInt32(con.TFS_ID__c);
            }
}
global class CampaignReminder
{

  WebService static void SendReminder(string id)
    {
     
      id cmpid = id;
      Integer batchSize = 1; 
      database.executebatch(new SendeMailinBatch(cmpid) , batchSize);
       
    }
}
=================batch process====
global class SendeMailinBatch implements Database.Batchable<sObject>,Database.Stateful 

  Public id campaignid;
  global SendeMailinBatch(id campid) 
   { 
       campaignid = campid;
   }
  global Database.QueryLocator start(Database.BatchableContext BC) 
   { 
      //Batch on all campaign memeber who belongs to the requetsed campaign 
      String query = 'select id, emailtobesentid__c from campaignmember where campaignid = :campaignid'; 
      return Database.getQueryLocator(query); 
   }
  global void execute(Database.BatchableContext BC, List<sObject> scope) 
   { 
      //***  Select the campaign details
      List<campaignmember> cmx = new list<campaignmember>();
      campaign cmp = new campaign();
      cmp = [ select id, From_eMail__c, Reply_To__c, templatetobesent__c from campaign where id = :campaignid ];  
      for(Sobject s : scope) 
      { 
          //Type cast sObject in campaign object 
          campaignmember CM = (campaignmember)s ; 
          //Sending Mail
          Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
          mail.setSenderDisplayName(cmp.From_eMail__c);
          mail.setReplyTo(cmp.Reply_To__c);
          mail.setTargetObjectId(CM.emailtobesentid__c);
          mail.setTemplateId(cmp.templatetobesent__c);
          Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});
      }
   }
   global void finish(Database.BatchableContext BC) 
   { 
     
   } 
}
i am getting an error Error: Compile Error: Constructor not defined: [SendeMailinBatch].<Constructor>(LIST<CampaignMember>) at line 26 column 2
@isTest(seealldata=true)
public class  testSendeMailinBatch
{

Public static testMethod void m3()


Campaign cp=new Campaign();
cp.EndDate=system.today();
cp.StartDate=system.today();
cp.isActive=TRUE;
CP.Type='Email';
cp.Status='planned';
cp.Reply_To__c='test@tanture.com';
cp.From_eMail__c='rajesh@tandture.com';
insert cp;
//list<Campaign> cplist=new list<Campaign>();
CampaignMember cm=new CampaignMember();
//cm.Campaign=cp.id;
insert cm;
cm=[select id  from campaignmember where id = :cp.id]; 
insert cm;
list<CampaignMember> cmlist=new list<CampaignMember>();
//set<CampaignMember> cmlis=new set<CampaignMember>();
cmlist.add(cm);
SendeMailinBatch sb=new SendeMailinBatch(cmlist);
     
        Test.startTest();
        Database.executeBatch(sb,1);
        Test.stopTest();
       
    }
 
 
  }
Here,my requirements, i am created one apex trigger. i want to cal those apex trigger to custom button for Enable or disbale is it possiable ?
1.Here, i am created one scheduler apex class for Send bulk Emails  its call at every morning. suppose, i want to send bulk emails like a 10,000 records using schedular apex class, is it possiable ?

 
trigger HistoryTracking on Case (before update)
{
    Map<string, Schema.SobjectField> caseFields = Schema.SObjectType.Case.fields.getMap();
   
    case caseold=trigger.old[0];
    For (Case cs : Trigger.new)
    {
        for (string fieldName : caseFields.keySet())
        {
            if ( cs.get(fieldName) != Trigger.oldMap.get(cs.id).get(fieldName))
            {
              string oldvalue = string.valueOf(caseold.get(fieldName));
              string newvalue= string.valueOf(cs.get(fieldName));
             
              string parentoldvalue = string.valueOf(caseold.get('ParentId'));
              string parentnewvalue= string.valueOf(cs.get('ParentId'));
        
              if(fieldName != 'Description')
               cs.History_Tracking__c = 'Changed '+fieldName +' From '+oldvalue +' to '+ newvalue;   ------------->this line doen't  cover the code coverage
              else
                 cs.History_Tracking__c = 'Changed On Long Field' ; ------------->this line doen't  cover the code coverage
                
             if(parentoldvalue != null && parentnewvalue== null )
             {
                 cs.CheckParent__c='RemoveParent';   ------------>this line doen't  cover the code coverage
                 system.debug('______________checkparentid+++++++++++++++++++'+cs.CheckParent__c);
             }
             else if( parentnewvalue != null)
             {
                  cs.CheckParent__c='';
             }
                
                 break;
             }  }
    }}
test class
=============
@isTest(seeAllData=true)
private class Testcasehistory
{
    static testMethod void updatefields()
    {
        list<Case> cslist=new list<case>();
        case cs=new case();
        cs.Origin='Web';
        cs.Reason='other';
        cs.Priority='Medium';
        cs.Status='New';
        cs.Type='Other';
        cs.Subject='ESTDeveloper';
        cs.Priority='1 - Critical';
        cs.TFS_WorkItem_Type__c='Bug';
        cs.Description='changedSFDCTOTFS';
        cs.ParentId=cs.id;
       
         // System.assertEquals(cs.Description,' cs.History_Tracking__c');
          // cs.History_Tracking__c='Changed On Long Field';
       
           if(cs.ParentId == null)
           {
           cs.CheckParent__c='RemoveParent';
           }
           else if(cs.ParentId != null)
             {
           cs.CheckParent__c='';
            }
       // cs.Origin='Email';
        cslist.add(cs);
        test.startTest();
        insert cslist;
       
        cs.Origin='Email';
        update cslist;
        test.stopTest();
    }
}
here, my requirments whenever i am creating new records on case object, insert or update to custom object cases__C, suppose i want to delete records in case objects
that corresponding records delete in custom object cases__C.how to do ?

trigger CreateCases on Case (after insert,after update)
{

  Case cs=Trigger.new[0];
   Case csold=Trigger.old[0];
  if (Trigger.isInsert)
  {
     List<cases__C> caslist=new list<cases__C>();
     Cases__c ci=new Cases__c();
     ci.Case_Number1__c=cs.CaseNumber;
     ci.Origin__c=cs.Origin;
     ci.Priority__c=cs.Priority;
     ci.Status__c=cs.Status;
     ci.Type__c=cs.Type;
     ci.Description__c=cs.Description;
     ci.Subject__c=cs.Subject;
     ci.Reason__c=cs.Reason;
     insert ci;
     //calist.add(ci);
  }
  if(Trigger.isUpdate)
  {
  
    list <Cases__c> caupdate=new list<Cases__c>();  
    caupdate=[select id,Case_Number1__c,Origin__c,Priority__c,Status__c,Type__c,Description__c,Subject__c,Reason__c from Cases__c where Case_Number1__c =: cs.CaseNumber];
     integer si=caupdate.size();
     system.debug('-------------------'+si);
    
     for(Cases__c cx: caupdate)
     {
         cx.Case_Number1__c=cs.CaseNumber;
         cx.Origin__c=cs.Origin;
         cx.Priority__c=cs.Priority;
         cx.Status__c=cs.Status;
         cx.Type__c=cs.Type;
         cx.Description__c=cs.Description;
         cx.Subject__c=cs.Subject;
         cx.Reason__c=cs.Reason;
         update cx;
     }
   }
    Case csold=Trigger.old[0];
   if(Trigger.isDelete )
   {
  
    Cases__c casdel =new Cases__c();
     casdel =[select id,Case_Number1__c from Cases__c  where  Case_Number1__c =: csold.CaseNumber ];--------> delete records coding.
     if(casdel != NULL )
     {
      delete casdel;
      }
   }
  
}
here, i am generate the enterprise wsdl file and add webreference to TFS c# code

using c# code add automatically wsdl files to TFS is it possiabel? how to do
plz help me
here i want to fetch the case object for corresponding all attachments
using casenumber

public void getFilesfromSalesforce(string strCaseno)
{
        try
        {
            binding = new SforceService();
            lr = binding.login(strUserName, strpassword);
            loginResult = lr;
            //SforceService salesforce = new SforceService();
            binding.SessionHeaderValue = new SessionHeader();
            binding.SessionHeaderValue.sessionId = loginResult.sessionId;
            binding.Url = loginResult.serverUrl;
           
            QueryResult qResult = null;
            //Enterprise.Attachment at = new Enterprise.Attachment();
            //at.
         
         String soqlquery2 = "SELECT Id, CaseNumber,Status FROM Case  where CaseNumber =:"+ strCaseno;
         String soqlQuery = "Select Id, ParentId From Attachment where ParentId = " + soqlquery2.CaseNumber; here i am getting an error malformed query

            qResult = binding.query(soqlQuery);

           
        }
        catch (Exception ex)
        {

          
        }
here my requirments.. i want to get a files form attachments object from salesforce
                       using c# code.plz help me .
how to increase code coverage now i am geeting a 55% in apex trigger...
trigger test on Case (before update )
{
  Map<string, Schema.SobjectField> caseFields = Schema.SObjectType.Case.fields.getMap();

  case caseold=trigger.old[0];
  For (Case cs : Trigger.new)
  {
    for (string fieldName : caseFields.keySet())
     {
       
        if ( cs.get(fieldName) != Trigger.oldMap.get(cs.id).get(fieldName))
        {
           // cs.Track_status_history__c = 'Field ' + fieldName + ' changed from ' + string.valueOf(Trigger.oldMap.get(cs.id).get(fieldName)) + ' to '  +string.valueOf(cs.get(fieldName));
             string oldvalue = string.valueOf(caseold.get(fieldName));------------->doesnot executing
            
             string newvalue= string.valueOf(cs.get(fieldName));------------->doesnot executing
           
             cs.Track_status_history__c = 'Changed '+fieldName +' From '+oldvalue +' to '+ newvalue;
         
             break;
          }   
       }
  }
}
=============================================
@isTest
private class Testcasehistory
{

   static testMethod void updatefields()
    {
     list<Case> cslist=new list<case>();
     case cs=new case();
     cs.Origin='Web';
     cs.Reason='other';
     cs.Priority='Medium';
     cs.Status='New';
     cs.Type='Other';
     cslist.add(cs);
     test.startTest();
      insert cslist;
    
     Case updcase = [SELECT Id,Origin,Reason,Priority,Status,Type  FROM Case WHERE Id=:cs.Id];
     update updcase;
     test.stopTest();
    }
}=====================
iam getting an error :could not run tests on class because invalid type:baseConfigController
apex trigger:
===============================
trigger test on Case (before update )
{
  Map<string, Schema.SobjectField> caseFields = Schema.SObjectType.Case.fields.getMap();

  case caseold=trigger.old[0];
  For (Case cs : Trigger.new)
  {
    for (string fieldName : caseFields.keySet())
     {
       
        if ( cs.get(fieldName) != Trigger.oldMap.get(cs.id).get(fieldName))
        {
           // cs.Track_status_history__c = 'Field ' + fieldName + ' changed from ' + string.valueOf(Trigger.oldMap.get(cs.id).get(fieldName)) + ' to '  +string.valueOf(cs.get(fieldName));
             string oldvalue = string.valueOf(caseold.get(fieldName));
            
             string newvalue= string.valueOf(cs.get(fieldName));
           
             cs.Track_status_history__c = 'Changed '+fieldName +' From '+oldvalue +' to '+ newvalue;
         
             break;
          }   
       }
  }
}
================================test class============================================
@isTest
public class Test_casehistory
{

    public static testmethod void m1()
    {
     Case cs=new case();
     cs.Origin='Web';
     cs.Reason='other';
     cs.Priority='Medium';
     cs.Status='New';
     cs.Type='Other';

     test.startTest();
     list<case> lTest1=new list<case>();
     lTest1 = [SELECT Id,Origin,Reason,Priority,Status,Type  FROM Case WHERE Id=:cs.Id];
     update lTest1;
     test.stopTest();
    }
}
here my requirments i want to get whose last modified fileds values to update to case object
using apex trigger
here my code given below:
trigger TrackigHistory on Case (before update)
{

    set<Id> setId = new set<Id>();
    string strhistory;
   
     for(Case con: trigger.new)
     {
        setId.add(con.Id);
               List<CaseHistory> ch = [Select id,CaseId, Field, NewValue, OldValue from CaseHistory where CaseId = :setId  ];
      
         system.debug('&&&&&&&CaseHistory size&&&&&&&&&&'+ch.size());
       // for(integer i=0;i<ch.size();i++)
       for(CaseHistory c: ch)
        {
          // if(ch[i].Field != NULL && ch[i].OldValue != NULL && ch[i].NewValue != NULL)
           //{
                 system.debug('&&&&&&&CaseHistory&&&&&&&&& '+'Field '+c.Field +' Changed from ' +c.OldValue+' to ' +c.NewValue);
           
                 con.Track_status_history__c = 'Field '+c.Field +' Changed from ' +c.OldValue+' to ' +c.NewValue;
                 how to get fields values last modified field values updat to case object
           //}
        }
     
      }

  
               
 
}
here my requirments i want to get whose last modified fileds values to update to case object
using apex trigger
here my code given below:
trigger TrackigHistory on Case (before update)
{

    set<Id> setId = new set<Id>();
    string strhistory;
   
     for(Case con: trigger.new)
     {
        setId.add(con.Id);
               List<CaseHistory> ch = [Select id,CaseId, Field, NewValue, OldValue from CaseHistory where CaseId = :setId  ];
      
         system.debug('&&&&&&&CaseHistory size&&&&&&&&&&'+ch.size());
       // for(integer i=0;i<ch.size();i++)
       for(CaseHistory c: ch)
        {
          // if(ch[i].Field != NULL && ch[i].OldValue != NULL && ch[i].NewValue != NULL)
           //{
                 system.debug('&&&&&&&CaseHistory&&&&&&&&& '+'Field '+c.Field +' Changed from ' +c.OldValue+' to ' +c.NewValue);
           
                 con.Track_status_history__c = 'Field '+c.Field +' Changed from ' +c.OldValue+' to ' +c.NewValue;
                 how to get fields values last modified field values updat to case object
           //}
        }
     
      }

 } 
               
 

I have a requirement like, need to select multiple records on the list view. After done with the selection of records. If I click the List view custom button, those selected records must be created into another object. here my code giveb below
{!REQUIRESCRIPT('/soap/ajax/29.0/connection.js')}
var selectedLeads = {!GETRECORDIDS($ObjectType.Lead)}, index = 0; leads, newobjs = {}, newrec, saveresults;

if(selectedLeads[0]== NULL)
{
    alert("select a record atleast");
    return;
}

leads = sforce.connection.retrieve('Id,Name', 'Lead', selectedLeads);

while(index < leads.length)
{
    newrec = new sforce.SObject('position__c');

    newrec.candidate__c = leads[index].Name;

    newrec.job_description__c = leads[index].Name;

    newobjs.push(newrec);

    index += 1;
}
saveresults = sforce.connection.create(newobjs);
error: lead is not defined 

Junior Salesforce Administrator (201/301 certifications in progress) with Sales & Talent Acquisition/Staffing background seeking experience by offering my time and skills, for assistance in administering/maintaining Salesforce implementation locally (Seattle/Puget Sound) or via telecommute nationwide. I am offering 20 hours per week of my time. I am willing to travel as necessary where internet-based collaboration is not sufficient if the client carries the expense. Highly interested in Start-up endeavors or short term projects allowing me to deepen my understanding of existing skills, including but not limited to:

Creation of Custom objects, tabs, fields

Creation and configuration of users

Customization of reports, dashboards optimizing metrics and analytics in support of the business

Data Migration using import wizard and data loader, Mapping, Cleaning Data, Error Validations, Backup Logs

Customized Date Validation Rules, Contact Validation Rules, User, Role, Profile Validation Rules, Cross Object Validation Rules, Opportunity Management Validation Rules, Address Verification Validation Rules

Customized OW permission, sharing rules, user profiles, permission sets, role hierarchies and field level security

Customized and created business workflow rules, and approval processes

Master/Detail relationships

Custom tailored page layouts and record types based on business processes

 

Please contact me to discuss further:

Anouk Siegert

AnoukS1208@gmail.com

EST Launching Sage 300 ERP - Salesforce Sync Solution. - This Solution will have the ability to push the contacts / accounts from SFDC  into Sage 300 ERP as AR Customers & Pull the quotes from Sage 300 ERP to SFDC as opportunity.

 

Please drop an email to learn more

 

samr@expsoltech.com

  • May 30, 2013
  • Like
  • 1