- Rajesh SFDC
- NEWBIE
- 40 Points
- Member since 2013
- Salesforce Developer
- Infosys
-
ChatterFeed
-
0Best Answers
-
8Likes Received
-
1Likes Given
-
115Questions
-
31Replies
how to debug "SOAP Responses was a nack "
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
- Rajesh SFDC
- February 09, 2015
- Like
- 0
- Continue reading or reply
how to track this error "SOAP Responses was a nack"
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
- Rajesh SFDC
- February 09, 2015
- Like
- 0
- Continue reading or reply
how to solve this error "SOAP Responses was a nack"
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
- Rajesh SFDC
- February 09, 2015
- Like
- 0
- Continue reading or reply
how to add a button page to enable/disable the apex trigger ?
- Rajesh SFDC
- December 29, 2015
- Like
- 0
- Continue reading or reply
how to sort names based on total field in apex
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
- Rajesh SFDC
- December 15, 2014
- Like
- 0
- Continue reading or reply
visual force page excel format issues attach to email attachment in apex
- Rajesh SFDC
- December 13, 2014
- Like
- 0
- Continue reading or reply
how to get visualfoce page as excel format to mail attachment in apex
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
- Rajesh SFDC
- December 12, 2014
- Like
- 0
- Continue reading or reply
how to query five recent last modified dates for single records in apex
Select Id, Name, (Select Subject, LastModifiedDate from ActivityHistories Order By LastModifiedDate DESC ) From Account
- Rajesh SFDC
- December 09, 2014
- Like
- 0
- Continue reading or reply
How to change datetime issues apex class in salesforce
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
- Rajesh SFDC
- November 28, 2014
- Like
- 0
- Continue reading or reply
converting datetime issues in apex
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
- Rajesh SFDC
- November 28, 2014
- Like
- 0
- Continue reading or reply
how to convert date format in apex
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
- Rajesh SFDC
- November 28, 2014
- Like
- 0
- Continue reading or reply
converting datetime problesm to 12 hours format in apex
'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"
- Rajesh SFDC
- November 27, 2014
- Like
- 0
- Continue reading or reply
how to convert 24 format to 12 format in apex salesforce
'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
- Rajesh SFDC
- November 27, 2014
- Like
- 0
- Continue reading or reply
how many records execute in scheduler apex?
- Rajesh SFDC
- November 03, 2014
- Like
- 0
- Continue reading or reply
while adding enterprise wsdl to web reference in visual studio
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
- Rajesh SFDC
- September 22, 2014
- Like
- 0
- Continue reading or reply
how to add wsdl apex files to web references in visual studio
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
- Rajesh SFDC
- September 22, 2014
- Like
- 0
- Continue reading or reply
how to add wsdl apex to web references in visual studio?
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
- Rajesh SFDC
- September 22, 2014
- Like
- 0
- Continue reading or reply
how to add wsdl apex files to web references in visual studio?
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
- Rajesh SFDC
- September 22, 2014
- Like
- 0
- Continue reading or reply
Error: adding wsdl files from salesforce to dot net visual studio, How to solve it ?
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
- Rajesh SFDC
- September 22, 2014
- Like
- 0
- Continue reading or reply
how to solve this error integration dot net with salesforce adding wsdl files
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
- Rajesh SFDC
- September 22, 2014
- Like
- 0
- Continue reading or reply
how to integrate salesforce with TFS using Enterprise wsdl files?
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.
- Rajesh SFDC
- May 14, 2014
- Like
- 1
- Continue reading or reply
how to integrate salesforce with TFS using Enterprise wsdl files
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.
- Rajesh SFDC
- May 14, 2014
- Like
- 1
- Continue reading or reply
is it possiable generate and add enterprie wsdl files to another platform TFS microsoft dot net..
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 ??
- Rajesh SFDC
- May 12, 2014
- Like
- 1
- Continue reading or reply
Programmatically check Enterprise WSDL each organisation salesforce?
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...
- Rajesh SFDC
- May 10, 2014
- Like
- 1
- Continue reading or reply
how to check Programmatically for Enterprise WSDL each organisation salesforce?
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...
- Rajesh SFDC
- May 10, 2014
- Like
- 1
- Continue reading or reply
how to avod duplicate records from salesforce TO TFS using c# 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);
}
}
- Rajesh SFDC
- April 28, 2014
- Like
- 1
- Continue reading or reply
how to write test class using webservice.
{
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)
{
}
}
- Rajesh SFDC
- February 05, 2014
- Like
- 1
- Continue reading or reply
how to write test class for batch apex:
@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();
}
}
- Rajesh SFDC
- February 05, 2014
- Like
- 1
- Continue reading or reply
how to add a button page to enable/disable the apex trigger ?
- Rajesh SFDC
- December 29, 2015
- Like
- 0
- Continue reading or reply
how many records execute in scheduler apex?
- Rajesh SFDC
- November 03, 2014
- Like
- 0
- Continue reading or reply
How to write test class for both 'If 'and 'Else' statements
{
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();
}
}
- Rajesh SFDC
- August 18, 2014
- Like
- 0
- Continue reading or reply
how delete records case object to custom object using apex trigger ?
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;
}
}
}
- Rajesh SFDC
- May 12, 2014
- Like
- 0
- Continue reading or reply
how to add enterpise wsdl file programatically?
using c# code add automatically wsdl files to TFS is it possiabel? how to do
plz help me
- Rajesh SFDC
- May 10, 2014
- Like
- 0
- Continue reading or reply
how to get case object for corresponding attachments using query in c#?
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)
{
}
- Rajesh SFDC
- May 07, 2014
- Like
- 0
- Continue reading or reply
how to get files from salesforce using c# ?
using c# code.plz help me .
- Rajesh SFDC
- May 07, 2014
- Like
- 0
- Continue reading or reply
test calss how to get above 75% 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();
}
}=====================
- Rajesh SFDC
- May 07, 2014
- Like
- 0
- Continue reading or reply
how to increase code coverage in apex trigger?
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();
}
}
- Rajesh SFDC
- May 05, 2014
- Like
- 0
- Continue reading or reply
how to get last modified field values from case history 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
//}
}
}
}
- Rajesh SFDC
- April 30, 2014
- Like
- 0
- Continue reading or reply
how to get last modified field values from case history 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
//}
}
}
}
- Rajesh SFDC
- April 30, 2014
- Like
- 0
- Continue reading or reply
how to solve thiserror:using javascript in list button, lead is not defined
{!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
- Rajesh SFDC
- February 26, 2014
- Like
- 0
- Continue reading or reply
Salesforce Admin looking for freelance projects
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
- AnoukS
- July 15, 2013
- Like
- 0
- Continue reading or reply
Salesforce - Sage 300 ERP Sync
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
- May 30, 2013
- Like
- 1
- Continue reading or reply