• Christine F.ax367
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
I am using force.com IDE Eclipse tool to code asynchronous Apex method in a class but not able to save. I get "Save error: Asynchronous Apex not enabled error".  Any idea?
 
Here is part of the Apex class code that matter:
 
Code:
public class FirmAddressSync_Async {
 
 @future
     Public static void updateContact(Set<Id> accountIds, String idString, Account[] TriggerOld)
     {
   integer x = 0;
   integer y = 0;
   Contact[] contactToUpdate = new Contact[]{};
       Map<String, String> contactIds = new Map<String, String>();
...
...
...
}
}

 
 
I have the standard object "Opportunity" having two lookup fields to Account. One is the standard "Account Name" that looks up to Account Object. Then, I have another custom field "Consultant_Firm__c" that lookup to Account also.
 
I wrote a S-Control on Opportunity to override its "New" button and I can reference {!Account.Id} without any problem when I am on an Account that links to the Opportunity through the standard "Account Name' lookup.
 
However, when I am on an Account that links to Opportunity through the "Consultant_Firm__c" lookup field, neither {!Account.Id} nor {!Opportunity.Consultant_Firm__r.Id} would work.
 
I still don't understand what merge fields are, how they are defined and I think this probably has something to do with merge fields. Can this format {!.....} work on a custom lookup field?
 
Thank you!
Christine
I am using force.com IDE Eclipse tool to code asynchronous Apex method in a class but not able to save. I get "Save error: Asynchronous Apex not enabled error".  Any idea?
 
Here is part of the Apex class code that matter:
 
Code:
public class FirmAddressSync_Async {
 
 @future
     Public static void updateContact(Set<Id> accountIds, String idString, Account[] TriggerOld)
     {
   integer x = 0;
   integer y = 0;
   Contact[] contactToUpdate = new Contact[]{};
       Map<String, String> contactIds = new Map<String, String>();
...
...
...
}
}

 
 
Does anyone know how to get date format for current user in scontrol?

The reason for date format is date picker. When I assign a date value to date picker, it must be locale oriented. Otherwise, s-control may assign date as DD/MM/YYY, instead of MM/DD/YYYY.

I know UserContext.dateFormat is the right variable.  But I can't find the method to get the value.  We have users around the world using several locale. So, hardcode is not an option.

Thanks in advance

I have the standard object "Opportunity" having two lookup fields to Account. One is the standard "Account Name" that looks up to Account Object. Then, I have another custom field "Consultant_Firm__c" that lookup to Account also.
 
I wrote a S-Control on Opportunity to override its "New" button and I can reference {!Account.Id} without any problem when I am on an Account that links to the Opportunity through the standard "Account Name' lookup.
 
However, when I am on an Account that links to Opportunity through the "Consultant_Firm__c" lookup field, neither {!Account.Id} nor {!Opportunity.Consultant_Firm__r.Id} would work.
 
I still don't understand what merge fields are, how they are defined and I think this probably has something to do with merge fields. Can this format {!.....} work on a custom lookup field?
 
Thank you!
Christine