• Nick34536345
  • NEWBIE
  • 280 Points
  • Member since 2009

  • Chatter
    Feed
  • 11
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 80
    Replies

I'm trying to get accounts from our external system to load into salesforce via a webservice.

 

I've added a custom field to the Account object and set it as a unique external id.

 

I'm parsing the xml from the webservice and creating a List of Account objects to use in an upsert. The problem is that any account that has already been added throws a duplicate error when I try to upsert the list. I was hopig that it would recognise that the record existed and switch to an update.

 

I have also tried to do an upsert within the loop (instead of creating a list then upserting the whole list ofter the loop.)

 

here is a simplified version of my code

 

insertAccounts = new List<Account>();
if( this.theXMLDom != null )
{
if( this.theXMLDom.getElementByTagName( 'request_content' ) != null )
{
XmlDom.Element xmlRequestContent = this.theXMLDom.getElementByTagName( 'request_content' );
XmlDom.Element[] xmlHospitalList = xmlRequestContent.getElementsByTagName( 'hospital' );
if( xmlHospitalList != null )
{
for( XmlDom.Element xmlHospital : xmlHospitalList )
{
Account tmpAccount = new Account();

tmpAccount.Name = xmlHospital.getAttribute( 'name' );
tmpAccount.OpskwanAccountNumber__c = xmlHospital.getAttribute( 'account_number' );

// either add to a list or upsert individually
insertAccounts.add( tmpAccount );
//upsert tmpAccount;
} } } // upsert a list
upsert insertAccounts;
}

I suspect that the problem is that by doing this

Account tmpAccount = new Account();

I am creating a new Account object, with a new Id. So the upsert treats it as a separate record that needs to be inserted rather than checking against the current records for an existing record with a matching OpskwanAccountNumber__c.

 

Am I going to have to do the check against the existing accounts manually? or is there another way to create a list of Account objects which will work properly with upsert?

 

Thanks for the help,

Mike

Hi All of you,

 

This might look strange to you.....

 

I have just started working on SFDC, and i have created a class to upload an attachment form the visualforce page.

 

till Yesterday, it worked sucessfully. But when i try to use that Page today i am getting the following error: Variable does not exist: OwnerId

 

And the funny thing which i am facing is that if in the class i click on the edit button and without doing anything even if i click on the save button.. i am getting the following error....

 

 

Error: Compile Error: Variable does not exist: OwnerId at line 24 column 5

 

I am not able to understand.. why is it happening that already saved class is not getting saved again... even if i do not make any changes to that

 

And if there was an error then why did it saved then???

 

 

My class is as follows:

 

public with sharing class AttachmentUploadControllerr {
  public Attachment attachment {
  get {
      if (attachment == null)
        attachment = new Attachment();
      return attachment;
    }
  set;
  }
 public Id recId
    {    get;set;    }

    public AttachmentUploadControllerr(ApexPages.StandardController ctrl)
    {
       recId = ctrl.getRecord().Id;    
    }

 
  public PageReference upload() {
 
    attachment.OwnerId = UserInfo.getUserId();
    attachment.ParentId = recId; // the record the file is attached to
    try {
      insert attachment;
      PageReference pr;
      pr = new PageReference('/' + recId);
      pr.setRedirect(true);
      return pr;

    } catch (DMLException e) {
      ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'Error uploading attachment'));
      return null;
    } finally {
      attachment = new Attachment();
    }
    ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'Attachment uploaded successfully'));
    return null;
  }
}

  • January 11, 2011
  • Like
  • 0

Has anyone seen this? different ui displays on different computers - one user, on a different continent so it's hard to get the full feel for the situation unfortunately, shows the old UI when she logs in on a different computer.

We've been in the new Chatter UI for months now.

Did a cache clear of here browser. Anyone seen this? ideas?

  • November 05, 2010
  • Like
  • 0

Hi,

 

I have a very basic APEX question.  How do I assign values to class variables?  Take the example below.  The last two lines give a compile time error of "unexpected token: '=' ".  The code below is just a simple snippet that I've created to demonstrate the problem that I'm having.  The actual code that I am working with is a generated class from importing a WSDL.  In my code, I'm trying to create an instance of the message class so that I can pass it to the service invocation method.  But, as you can see, I'm getting stuck just trying to assign values to the class.

 

 

public class exampleC {
public class outerClass{
public innerClass IC;
}
public class innerClass{
public String str;
}

outerClass out = new outerClass(); //not sure if this is necessary since I have not created a constructor 

 out.IC = new innerClass();

 out.IC.str = 'A string';  //it seems like this statement should be sufficient without the one above it.  

 

}

 

So there is a limit of 200 @future method calls per 24-hour period for an organization.  I have a trigger that invokes an @future call and I want to know if I'm running close to the limit.

 

I tried the Limits.getFutureCalls() method in the System Log anonymous block but it returned 0, which I know is not correct.  Is there some other way to find this counter value?  Do I have to put this in the @future code itself and do a system.debug()?  I looked on the Company Information page in Setup but it's not there.

 

Thanks

David

Hi My code is accepting fields from a client and one of the fields is a Picklist field. The code should have the field value coming from client to the filed value in database else should return a response. I have written a logic below but thats not working. And the logic is confined to the values in database today. If the values are changed in future the code wont b valid.

 if (CalltoActionType!='Datasheet'||CalltoActionType!='Analyst Report/Research'||
             CalltoActionType!='Article/Editorial'||CalltoActionType!='Branding/Advertisement'||
             CalltoActionType!='Customer Reference'||CalltoActionType!='eBook/Yellowbook'||
             CalltoActionType!='eLearning/Training'||CalltoActionType!='Event - 3rd Party'||
             CalltoActionType!='Event - Symantec'||CalltoActionType!='Infrastructure'||
             CalltoActionType!='Leads/Data'||CalltoActionType!='Multimedia'|| 
             CalltoActionType!='Newsletter - 3rd Party'||CalltoActionType!='Newsletter - Symantec'||
             CalltoActionType!='Non-lead generating Collateral'||CalltoActionType!='Podcast'||
             CalltoActionType!='Product Tour'||CalltoActionType!='Renewal Notification'||
             CalltoActionType!='Sales Incentive / Purchase'||CalltoActionType!='Sales Tools'||
             CalltoActionType!='SYMC Webpage(s)'||CalltoActionType!='Trialware'||
             CalltoActionType!='Webcast'||CalltoActionType!='White Paper'||
             CalltoActionType!='STS & SSE'||CalltoActionType!='3RD PARTY WEBSITE')
             {
             system.debug(response3+'TESTING MODE');
             return response3 ;

 

 

Hello,

 

I am trying to prevent the Standard User from editing a custom object that I have as a related list on the Opportunity page.  The edit and delete buttons are enabled!  I went to the Standard Profile (SFDC's) and when in edit mode I go to the Custom Object section to deselect the Create, Edit, and Delete basic access buttons but they are disabled.


Does anyone know a work around to this issue? 

 

Currently I created validation rules to prevent fields from being editable if a Standard Profile is detected for a given user; however, this is after the fact.  Meaning, the user clicks the edit button changes data, saves then finds out that they cannot edit because my VR stops them.  Although this works, the users hate it because they should not have an edit/delete button or it should be disabled if they cannot edit.

 

Thanks in advance for your support.

Hello SForce Family Members,
 

I am Manoj Jain new member of sforce family.

I am facing one problem and i need your help.

I have added salesforce plugin successfully in eclipse,but when i am trying to create new force project its now allowing me to do the same.

Everytime i got same error invalid username password,security tocken or may be you are locked.

I have already resetted my security tocken thrice but no success.Currently i am using trial version of salesforce.

Please help me regarding this issue.

 

Thanks & Regards,

 Manoj Jain

 

 

 

 

 

One of my classes are acting quite strangely and not retrieving all fields depending on the profile that is currently running the apex. However, AFAIK - profiles should not affect the retrieval of fields as apex is executed in system mode. On further inspection and use of debug logs, it seems that my system administrator profile can return all fields (as expected), however when changing to the Human Resources profile, it can retrieve 1 lookup field, however the rest can not be seen.

After checking field level security, all the object's fields are visible to the profile.

If anyone can shed some light on this issue, that would be great.

 

Here are snippets from the debug log:

11:03:19.206|SOQL_EXECUTE_BEGIN|[155,49]|Aggregations:2| SELECT ID,
Name,
Approval_Status__c,
Employee__c,
Employee__r.Name,
Managers_Manager__c,
Manager_On_Leave__c,
Employee__r.Leave_Manager__c,
Employee__r.Leave_Manager__r.User__c,
Employee__r.Timesheet_Manager__r.User__c,
Employee__r.Employee_ID__c,
Employee__r.Timesheet_Manager__c,
Manager__c,
End_Date__c,
Start_Date__c,
Total_Hours__c,
Payslip__c,
BASEURL__c,
Reference__c,
(SELECT ID,
Name,
Comments__c,
Timesheet__c,
Project__c,
Task__r.Name,
Project__r.Name,
Task__c
FROM Timesheet_Items__r
ORDER BY Name ASC),
(SELECT ID,
Date__c,
Hours__c,
Timesheet_Item__c,
Timesheet__c
FROM Timesheet_Entries__r)
FROM Timesheet__c
WHERE Approval_Status__c =: classGlobalVariables.LBL_APPROVED
AND Managers_Manager__c =: UserInfo.getUserId()
ORDER BY Name
11:03:19.211|METHOD_ENTRY|[192,42]|UserInfo.getUserId()

 

11:03:19.223|USER_DEBUG|[602,5]|DEBUG|########TIMESHEET######## SHRM__Timesheet__c:{SHRM__Manager__c=00580000003I3NgAAK, Name=TS-0542, SHRM__Approval_Status__c=Approved, SHRM__Start_Date__c=2009-12-18 00:00:00, SHRM__Manager_on_Leave__c=false, SHRM__baseURL__c=https://shrm.na6.visual.force.com, SHRM__Total_Hours__c=14.000, Id=a0B80000005cxiREAQ, SHRM__End_Date__c=2009-12-18 00:00:00}

 Manager__c as you can see is a lookup field, however the other lookupfields (e.g. my Employee__c  field) is not returned, though it is queried in my soql. 

 

 

However, same method, but sys admin profile:

 

11:06:37.831|USER_DEBUG|[602,5]|DEBUG|########TIMESHEET######## SHRM__Timesheet__c:{SHRM__Approval_Status__c=Approved, SHRM__Start_Date__c=2010-02-11 00:00:00, SHRM__Total_Hours__c=6.000, SHRM__End_Date__c=2010-02-17 00:00:00, Name=TS-0936, SHRM__Manager__c=00580000003HmenAAC, SHRM__Employee__c=a0380000007Rd9AAAS, SHRM__Manager_on_Leave__c=false, SHRM__baseURL__c=https://shrm.na6.visual.force.com, Id=a0B80000006c3lNEAQ}

 

... seems to retrieve all fields.

 

Regards,

David Dizon

  • February 17, 2010
  • Like
  • 0

Hi all,

 

i have two custom objects. In first object there is a reference look up field to second object. 

 

When i try to click the look up icon , in the search window there aren't all record of second object (if i put * as search parameter), but only some of them (in my case it shows 4 records, but in the object there are 17 records!) 

 

What could be the reason?

 

Thanks in advance!! 

Hi,

 

I am facing some strange behaviour. I have developed before insert trigger on lead.

 

If user edit the record by clicking on edit button link, trigger is executing properly but not in the case of inline editing. 

 

Please guide!

I'm trying to get accounts from our external system to load into salesforce via a webservice.

 

I've added a custom field to the Account object and set it as a unique external id.

 

I'm parsing the xml from the webservice and creating a List of Account objects to use in an upsert. The problem is that any account that has already been added throws a duplicate error when I try to upsert the list. I was hopig that it would recognise that the record existed and switch to an update.

 

I have also tried to do an upsert within the loop (instead of creating a list then upserting the whole list ofter the loop.)

 

here is a simplified version of my code

 

insertAccounts = new List<Account>();
if( this.theXMLDom != null )
{
if( this.theXMLDom.getElementByTagName( 'request_content' ) != null )
{
XmlDom.Element xmlRequestContent = this.theXMLDom.getElementByTagName( 'request_content' );
XmlDom.Element[] xmlHospitalList = xmlRequestContent.getElementsByTagName( 'hospital' );
if( xmlHospitalList != null )
{
for( XmlDom.Element xmlHospital : xmlHospitalList )
{
Account tmpAccount = new Account();

tmpAccount.Name = xmlHospital.getAttribute( 'name' );
tmpAccount.OpskwanAccountNumber__c = xmlHospital.getAttribute( 'account_number' );

// either add to a list or upsert individually
insertAccounts.add( tmpAccount );
//upsert tmpAccount;
} } } // upsert a list
upsert insertAccounts;
}

I suspect that the problem is that by doing this

Account tmpAccount = new Account();

I am creating a new Account object, with a new Id. So the upsert treats it as a separate record that needs to be inserted rather than checking against the current records for an existing record with a matching OpskwanAccountNumber__c.

 

Am I going to have to do the check against the existing accounts manually? or is there another way to create a list of Account objects which will work properly with upsert?

 

Thanks for the help,

Mike

Hi All of you,

 

This might look strange to you.....

 

I have just started working on SFDC, and i have created a class to upload an attachment form the visualforce page.

 

till Yesterday, it worked sucessfully. But when i try to use that Page today i am getting the following error: Variable does not exist: OwnerId

 

And the funny thing which i am facing is that if in the class i click on the edit button and without doing anything even if i click on the save button.. i am getting the following error....

 

 

Error: Compile Error: Variable does not exist: OwnerId at line 24 column 5

 

I am not able to understand.. why is it happening that already saved class is not getting saved again... even if i do not make any changes to that

 

And if there was an error then why did it saved then???

 

 

My class is as follows:

 

public with sharing class AttachmentUploadControllerr {
  public Attachment attachment {
  get {
      if (attachment == null)
        attachment = new Attachment();
      return attachment;
    }
  set;
  }
 public Id recId
    {    get;set;    }

    public AttachmentUploadControllerr(ApexPages.StandardController ctrl)
    {
       recId = ctrl.getRecord().Id;    
    }

 
  public PageReference upload() {
 
    attachment.OwnerId = UserInfo.getUserId();
    attachment.ParentId = recId; // the record the file is attached to
    try {
      insert attachment;
      PageReference pr;
      pr = new PageReference('/' + recId);
      pr.setRedirect(true);
      return pr;

    } catch (DMLException e) {
      ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'Error uploading attachment'));
      return null;
    } finally {
      attachment = new Attachment();
    }
    ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'Attachment uploaded successfully'));
    return null;
  }
}

  • January 11, 2011
  • Like
  • 0

Hi all,

In the 53 page of Force.com Developer pdf, there is a statement: 

"A Force Platform object cannot be the master in one relationship and the detail in another relationship."  But I can able to create an Object which is master in one relationship and detail in other relationship. 
Can any one plz solve the confusion?
Thx in advance,
VNath

 

The problem that I'm trying to workaround is that we cannot report on pending approvals.  I've seen the recommendation that we update records on the object that is being routed in the action that executes after each step - however this doesn't work when the step is for parallel approvals.  I haven't been able to find an object I can attach a trigger to that would fire after each person approval.  At the end of the day I need to be able to product a report of who needs to approve what (I am aware that each person will see what they need to approve on their homepage, I need others to be able to pull a report on all the pending approvals).

 

Any ideas?

Has anyone seen this? different ui displays on different computers - one user, on a different continent so it's hard to get the full feel for the situation unfortunately, shows the old UI when she logs in on a different computer.

We've been in the new Chatter UI for months now.

Did a cache clear of here browser. Anyone seen this? ideas?

  • November 05, 2010
  • Like
  • 0

Hi,

 

In vf page I am using <apex:inputField> for date objects.

when I am entering some string in those fields and then trying to save, on some pages it is showing default salesforce message "Invalid Date and Time". But sometimes it is not showing the message.

I have checked the debug logs. In both the cases it it showing VF_PAGE_MESSAGE|Invalid Date and Time.

So I am not getting, why it is not showing in some cases. 

Does anyone come across issue like this?

 

Thanks..




 

Hello,

 

I'm researching how to make a unique clone button that clones a opportunity but also clones the line items as well. I have looked at a similar thread, but none of the solutions helped.

 

What I have so far is like so:

 

{!UrlFor($Action.Opportunity.Clone,Opportunity.Id,
[
retURL = $Request.retURL,
cloneli=1]
,true)}

 

Any advice how to make it so the line items carry over as well?

  • October 25, 2010
  • Like
  • 0

Hello

 

Everytime I use a single trigger in order to encrypt/decrypt a value, I receive a different crypted data. If I don't change my value, normally, the encrypted data should be the same ?

 

My code (just a test at the moment being) :

 

 

trigger Decrypt on Account (before update) {

	for (Account ac : trigger.new) {

		// Generate the data to be encrypted.
		Blob data = Blob.valueOf('EAF098');
		
		// Key Definition
		string myKey	= 'XXXXXXXXX'; // Real value replaced with X
		Blob myBlobKey	= Blob.valueof(myKey);
		
		// Encrypt the data and have Salesforce.com generate the initialization vector 
		Blob encryptedData = Crypto.encryptWithManagedIV('AES128', myBlobKey, data);
		// Update Description on Account
		ac.Description = ac.Description + ' - - - ' + encryptedData.toString();
		ac.Description = ac.Description + ' - - - ' + EncodingUtil.base64Encode(encryptedData);
		
		// Decrypt the data
		Blob decryptedData = Crypto.decryptWithManagedIV('AES128', myBlobKey, encryptedData);
		// Update Description on Account
		ac.Description = ac.Description + '___' + decryptedData.toString();

	}
}

 

 

Anyone has an idea ??

 

Thanks

 

Dimitri

'm trying to send out webcast emails to contacts when they register for a webcast on the website. The trigger looks for the country in the leads field and set's the time zone accordingly. Here's how I'm doing it

String WCTime = c.Webcast_Time__c.format('h:mm a zzzz',l.timezone__c);

where l.timezone__c can be something like this -"Asia/Calcutta" . The code get's the time correctly but doesn't take the Daylight Savings into account as I'm sending this email from UK. Is there a way to update the time taking the daylight savings into account? 

  • September 23, 2010
  • Like
  • 0

Hi,

 

I have a very basic APEX question.  How do I assign values to class variables?  Take the example below.  The last two lines give a compile time error of "unexpected token: '=' ".  The code below is just a simple snippet that I've created to demonstrate the problem that I'm having.  The actual code that I am working with is a generated class from importing a WSDL.  In my code, I'm trying to create an instance of the message class so that I can pass it to the service invocation method.  But, as you can see, I'm getting stuck just trying to assign values to the class.

 

 

public class exampleC {
public class outerClass{
public innerClass IC;
}
public class innerClass{
public String str;
}

outerClass out = new outerClass(); //not sure if this is necessary since I have not created a constructor 

 out.IC = new innerClass();

 out.IC.str = 'A string';  //it seems like this statement should be sufficient without the one above it.  

 

}

 

Has anyone had any luck with the usage of this new BETA tool?  I installed the Adobe AIR and Flash Player as required and then unzipped the file provided.  But there is nothing in the file that is an executable or web page.  There is an SWF file, but that is not associated with any program and I don't think you can simply "execute" an SWF anyway.  Any ideas?

So there is a limit of 200 @future method calls per 24-hour period for an organization.  I have a trigger that invokes an @future call and I want to know if I'm running close to the limit.

 

I tried the Limits.getFutureCalls() method in the System Log anonymous block but it returned 0, which I know is not correct.  Is there some other way to find this counter value?  Do I have to put this in the @future code itself and do a system.debug()?  I looked on the Company Information page in Setup but it's not there.

 

Thanks

David

So content seems to get escaped for HTML automatically, but I'd like to create JSON in a page if possible.  I can't seem to find any way to do this.

 

I posted an example app at http://github.com/matschaffer/apex-injection-test that shows the output I'm trying to pull and escape. Right now the javascript injection executes successfully.

 

It's looking like I may need to just stick to HTML or do the javascript escaping myself in an Apex class. I found this which looks promising http://apex-google-visualization.googlecode.com/svn/trunk/GoogleVisualizations/src/classes/JSONObject.cls but they've commented out the quote() method so I'll have to figure out how to get it back in there.

 

Thanks in advance for any advice,

Mat

 

I am getting an 'Insert Failed' error that looks like this...

 

# Test Results:

Run Failures:
  BeforeUpdateQuoteLineItem_cls.BeforeUpdateOnQLI System.DmlException: 
Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING,
 Required fields are missing: [OpportunityId]: [OpportunityId]
  BeforeUpdateQuoteLineItem_trg Test coverage of selected Apex Trigger 
is 0%, at least 1% test coverage is required

 

when trying to run the below to test an insert trigger that inserts a custom child object record on the quote line item when it is updated in the appropriate way.  Obviously I never get to the update part since the insert is not functioning.  It is complaining about lacking the 'OpportunityId' but I cannot even see that field referenced on the quote line item object.

 

confused.

 

Any advice?  much appreciated.

 

 

 

public with sharing class BeforeUpdateQuoteLineItem_cls {
	public static testMethod void BeforeUpdateOnQLI()
	{
		
		Account TestRecord0 = new Account(Name='Neiltest',Type='Customer',Market__c='Phoenix');
		insert TestRecord0;
		
		Opportunity TestRecord1 = new Opportunity(Name='OppTest',Account= TestRecord0,Market__c='Phoenix',LeadSource='Internal Sales',CloseDate=Date.today()+30,StageName='Qualified');
		insert TestRecord1;
		
		Quote TestRecord2 = new Quote(Name='QuoteTest',Opportunity=TestRecord1);
		insert TestRecord2;
		
		PriceBookEntry TestRecord4 = [SELECT Id, Product2 FROM PricebookEntry WHERE Name = 'Business Complete Hosted Assurance 10Mb' limit 1];
		String ProductNewId=TestRecord4.Product2;
		
		QuoteLineItem TestRecord3 = new QuoteLineItem(Quote=TestRecord2,PriceBookEntry=TestRecord4,Bundle_Options__c=null);
		insert TestRecord3;
		TestRecord3.Bundle_Options__c = 'UPGRADE TO PREMIUM';
		
		upsert TestRecord3;

		List <Bundle_Option__c> TestRecord5 = [SELECT Id FROM Bundle_Option__c WHERE Quote_Item__c = :TestRecord3.Id];
		Integer ListCount = TestRecord5.size();
		
		System.assertEquals(1, ListCount);
	}

 

  • July 17, 2010
  • Like
  • 0

Hi My code is accepting fields from a client and one of the fields is a Picklist field. The code should have the field value coming from client to the filed value in database else should return a response. I have written a logic below but thats not working. And the logic is confined to the values in database today. If the values are changed in future the code wont b valid.

 if (CalltoActionType!='Datasheet'||CalltoActionType!='Analyst Report/Research'||
             CalltoActionType!='Article/Editorial'||CalltoActionType!='Branding/Advertisement'||
             CalltoActionType!='Customer Reference'||CalltoActionType!='eBook/Yellowbook'||
             CalltoActionType!='eLearning/Training'||CalltoActionType!='Event - 3rd Party'||
             CalltoActionType!='Event - Symantec'||CalltoActionType!='Infrastructure'||
             CalltoActionType!='Leads/Data'||CalltoActionType!='Multimedia'|| 
             CalltoActionType!='Newsletter - 3rd Party'||CalltoActionType!='Newsletter - Symantec'||
             CalltoActionType!='Non-lead generating Collateral'||CalltoActionType!='Podcast'||
             CalltoActionType!='Product Tour'||CalltoActionType!='Renewal Notification'||
             CalltoActionType!='Sales Incentive / Purchase'||CalltoActionType!='Sales Tools'||
             CalltoActionType!='SYMC Webpage(s)'||CalltoActionType!='Trialware'||
             CalltoActionType!='Webcast'||CalltoActionType!='White Paper'||
             CalltoActionType!='STS & SSE'||CalltoActionType!='3RD PARTY WEBSITE')
             {
             system.debug(response3+'TESTING MODE');
             return response3 ;

 

 

I am getting incorrect previousFireTime value for the newly shceduled job. It shows future time for example (---lastSchTime---2010-07-06 11:35:00) while it was scheduled at 07:35:00 am.

 

This is part of the scheduled class code

 

global void execute(SchedulableContext sc) {

    CronTrigger cronTrig = [Select id,PreviousFireTime,timesTriggered from CronTrigger where id=:sc.getTriggerId()];

    Datetime lastSchTime = cronTrig.PreviousFireTime;

    //List the Accnt team members which are modified after the last scheduled time.
                List<AccountTeamMember> latestUpdatedATMList = [Select id,userId,accountId,LastModifiedDate   
                        from AccountTeamMember where LastModifiedDate >: lastSchTime];

    ......

 

But still it is not fetching the recently modified account team member details (atestUpdatedATMList), since
previousfiretime field retrived as future date.

 

Can anyone help me out, if i coded incorrectly.

 

Regards,

baaskar

In the object account, I have a custom lookup field called Master Contact. What I wish to do is upon lead conversion, automatically fill that field with the new contact created in the conversion process. I'm hoping there is an apex-free solution, but to me it seems that some sort of trigger will have to be written. The issue here then would be trying to get the newly created contact's id and account's id.

We would like to do one of 2 things:

1. Email Greek contacts in Salesforce using Greek templates that mail merge in Greek-based names with  Greek characters: While Salesforce stores Greek characters, it does not allow us to send emails using Greek characters merging Greek-character field names (first name in Greek characters, last name in Greek characters).

2. Export Greek contacts: Since we cannot email our Greek contacts (as explained in point 1), we would like to export these names to excel. When trying to export the names with Greek characters, it only renders junk for those fields.

Salesforce is useless to us in Greece right now. We spent a lot of time placing contacts in it, only to face these challenges.

 

Is someone out there the next Socrates? Can you help us?

I have an application that's been installed by one of my clients.  This application includes a Controller Extension that is defined as a global class.

 

I'd like the client to be able to create Visualforce Pages that use that custom Controller Extension.  Currently when they attempt to do this they get the following error:

 

 

	Error: Apex class 'LeadControllerExtension' does not exist

 

When attempting to create the following basic page:

 

 

<apex:page standardController="Lead" extensions="LeadControllerExtension" >
  <!-- Begin Default Content REMOVE THIS -->
  <h1>Congratulations</h1>
  This is your new Page
  <!-- End Default Content REMOVE THIS -->
</apex:page>

 

Any ideas?