• Elie.Rodrigue
  • SMARTIE
  • 595 Points
  • Member since 2014
  • CTO
  • Nubik

  • Chatter
    Feed
  • 17
    Best Answers
  • 4
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 102
    Replies
HI Everyone,

Is there any way we can mass upload excel documents to the company object?
So in other words, mass adding attachments?

Regards,
Rajiv

  • March 13, 2014
  • Like
  • 0
Hi Team,

Is there anyway to send the SMS without App exchange from salesforce.

Thanks and Regards,
Venkatesh
Hi All,

In the standard homepage I've inserted a custom HTML component that contains an iframe to a Visualforce Page.
In this page I've inserted a button.
I would that when the button is clicked, the homepage is redirected to another page, and not the iframe as is now.

How I accomplish it.

Thanks in advance.
Trying to be a good coder and using lists instead of loops but now I want to remove items from a List but I don't know the index of said items.

List<Contact>myRecipients = [SELECT id, firstname, lastname, email FROM contact WHERE firstname='Tim'];
List<Task> myTasks=[SELECT id, whoid, subject FROM task WHERE createddate >:dtRange];

I need to determine if the whoid in myTasks exists in myRecipients and if so, myRecipients.remove(x);

Do I need to loop through myRecipients in reverse order and then for each iteration loop through myTasks or is there a better way?

for(Integer c=myRecipients.size()-1; c>=0; --c){
                for(Task t:myTasks){
                    if(myRecipients.get(c).id == t.whoid){
                        myRecipients.remove(c);
                    }
                }
            }
Hi there,

I have three custom objects:

Transactions__c
Office_Commissions__c
Finance Commissions__c

Transactions and finance commissions have a lookup to office_commissions__c. Within Office_commissions__c there are two fields:

Commission_period_start__c and Commission_period_end__c. I was wondering if it is possible to craft a trigger which will use the date_of_payment__c fields on transactions and finance commissions to sort the records into the correct Office_commission__c record where the date_of_payment__c falls between the commission start and end?

Thank you in advance for your help.

Michael
My test class for Batch apex is throwing error when its frocessing more than 1 record. When i set the limit as 1 it works fine. When i increase the limit I get External Entry Point Exception.

<----------Batch Class------------>
global class DEUserCheckOut implements Database.Batchable<sObject>,Database.AllowsCallouts,Database.stateful {
global Database.QueryLocator start(Database.BatchableContext BC) {
String query = 'SELECT Id,Calls_Logged_Today__c,profileId,Check_In__c,Qualification__c,Call_Logged__c From User Where Check_In__c = true Limit 2 ';
return Database.getQueryLocator(query);
}
global void execute(Database.BatchableContext BC, List<User> scope) {
 
for(User e : scope){
{
e.Check_In__C = False;
e.Calls_Logged_Today__c = 0;
Update Scope;
}
}
}
global void finish(Database.BatchableContext BC) { }
}


<-------------Test Class-------------->
@istest(SeeAllData=False)
public class TestDEUserCheckOut{
Static testmethod void TestDEUserCheckOut()
{
Profile p = [SELECT Id FROM Profile WHERE Name='System Administrator'];
        UserRole teleRole = [SELECT Id FROM UserRole WHERE Name='Qualifier' LIMIT 1];
        
         User brian = new User(Alias = 'standt', Email='standarduser@testorg.com',
                EmailEncodingKey='UTF-8', FirstName='Brian', LastName='Mulhair', LanguageLocaleKey='en_US',
                LocaleSidKey='en_US', ProfileId = '00ei0000000iZri', UserRoleId = teleRole.Id,
                TimeZoneSidKey='America/Los_Angeles',IsActive=true,Check_In__c = True, UserName='unique@user.name12345');
            insert brian;
           
   
    Test.startTest();
            
                    
            Database.executeBatch(new DEUserCheckOut(),1);
           
        Test.stopTest();
    
 
}
}


Thanks In Advance.
Hi,

my organisation has a requirement that if anything is udated/inserted in our web application( cloud based  apllicatio me nn build in .net and c#)  that should be automatically be updated in SFDC and vice versa.

There are 1000 of users in our website and they have their account in salesforce too.  Now to sync the data between these two real time automatic updates are required.

please let  me know which approach is best and why- Streaming API or workflow outbound messages?

thanks in advance.
marilyn
Hey guys,

I have a trigger which is designed to change the name of the account based on the contacts that are associated with it. It works perfectly for adding and updating the contacts, however should i delete a contact I have to edit and save one of the remaining contacts associated with the account before the account name will change. How do I make it so that the name will re-evaluate after I delete one of the contacts.

Thank you for your help.

This is my code:

/////////////////Trigger\\\\\\\\\\\\\\\\\\\\\

trigger AccountNameTrigger on Contact (after insert,after update, after delete, after undelete) {
    Set<ID> setAccountIDs = new Set<ID>();
   
       
     if(trigger.isdelete)
{
    for(Contact c : Trigger.old)
   {
        setAccountIds.add(c.Accountid);
    }
}else
{

   
    for(Contact c : Trigger.new){
        setAccountIDs.add(c.AccountId);
    }
 
    List<Account> accounts = [Select ID, Name,(Select FirstName, LastName From Contacts)  From Account WHERE ID IN :setAccountIDs];
    for(Account a : accounts){
        String accName = '';
        Boolean hit = false;
        for(Contact c : a.Contacts){
             if(hit)
             {
                    accName+=' and ';
              }
          
             accName += c.FirstName+' '+c.LastName; 
             hit = true;                 
        }
        a.Name=accName;
    }
   
    update accounts;
 
}

}
i have a visualforce page to search for records whose date is equal to the selected date in visualforce page.
how can i create a custom date field in vf page?

i have an object Schedule__c with a custom DateTime field Date_Time__c

i want to have a date field in the visualforce page to use for searching. is it possible?
  • February 16, 2014
  • Like
  • 0
i have a problem in updating the records that shows on the table in my visualforce page. when i create a new record for Account it doesn't display immediately in the visualforce page's table.

this is my visualforcepage:
<apex:page standardController="Account" extensions="AccountCX" sidebar="false">
    <apex:pageblock >
        <apex:pageBlockTable value="{!Accounts}" var="acc">
            <apex:column value="{!acc.Name}"/>
        </apex:pageBlockTable>
    </apex:pageblock>
</apex:page>
 
apex class:
public with sharing class AccountCX{
    public AccountCX(ApexPages.StandardController controller) { }
    public List<Account> getAccounts() {
            return[select id, Name from Account ORDER BY Name];
    }
}
 
and this is the code for my website:
<html>
          <body>
                    <object data=http://cnsctest-developer-edition.ap1.force.com/mysitesample width="850" height="500">Error.</object>
          </body>
</html>

my salesforce site domain: http://cnsctest-developer-edition.ap1.force.com/mysitesample

how can i update the visualforce page in the website immediately after creating new records?
  • February 13, 2014
  • Like
  • 0
Hi,

There's a way to update a number custom field always increasing one more.

I want this field updated always when someone change any field in my case.
So I will put an IF in LastModifiedBy when is updated.

Thanks !
Is this trigger bulkified im unable to bulk inset using data loader only the last recored in the csv file gets the field update properly

trigger urlattachmentupdate on Attachment (after insert,after update) {
list<contact>cc=new list <contact>();
set<attachment>a=new set<attachment>();
Public string attachmentid='';
Public string parentid='';

for(Attachment aa:trigger.new){
attachmentid=aa.id;
parentid=aa.parentid;
System.debug('Attchment IDDD'+attachmentid);
System.debug('ParentIDDDDDDDDDDD'+parentid);
}
cc=[Select id from contact where id =:parentid];
for(contact cc1:cc){
cc1.Member_Photo_URL__c='https://c.cs10.content.force.com/servlet/servlet.FileDownload?file='+attachmentid;
}
update cc;
}
Hey Guys, 

I have written a VF page and apex class . Users have to enter certain information. Based on the critirea , code filters out the records and display the selected records on VF page which meet the critirea. It is able to fetch the records. But there are is Count() and Sum () aggregate functions which are also used in apex class. I am not able to print the those values on VF page. I have seen previous posts also and i cannot figure out what to do.Kindly tale a look at the code and please help.  In short I want to display the values of sum(impressions) , sum(requests) and count() on VF page.

Apex class:

public class siteplacementFetch{
public Site_Placements__c  sp{get;set;}
    public List<Site_Placements__c > spRec{get;set;}
    String matchString;
    String matchString1;
    String matchString2;
    public siteplacementFetch(){
        sp=new Site_Placements__c ();
        spRec = new List<Site_Placements__c>();
        matchString = '';
        matchString1 ='';
        matchString2 ='';
    }
  
    public void FetchSPRec(){
        matchString = '%'+sp.Device_Type__c+'%';
        matchString1 = '%'+sp.Auto_Play__c+ '%';
       matchString2 = '%'+sp.Number_of_Strikes_Given__c+ '%';
        spRec=[select Name, total_Impressions__c from Site_Placements__c where
        ((Device_Type__c like :matchString) AND (Auto_Play__c like :matchString1) AND (Number_of_Strikes_Given__c like :matchString2)) ];}
       
     
                public integer total_values(){
      
       Integer counter = [ Select count()
                    FROM Site_Placements__c where ((Device_Type__c like :matchString) AND (Auto_Play__c like :matchString1) AND (Number_of_Strikes_Given__c like :matchString2)) ];
   
    List<AggregateResult> results= [ SELECT sum(impressions__c)
            FROM site_placement_data__c
            WHERE site_placement__c in (select id FROM Site_Placements__c Where ((Device_Type__c like :matchString) AND (Auto_Play__c like :matchString1) AND (Number_of_Strikes_Given__c like :matchString2))) ];
               
            List<AggregateResult> results1= [ SELECT sum(requests__c)
            FROM site_placement_data__c
            WHERE site_placement__c in (select id FROM Site_Placements__c Where ((Device_Type__c like :matchString) AND (Auto_Play__c like :matchString1) AND (Number_of_Strikes_Given__c like :matchString2))
) GROUP BY site_placement__c];
return counter;}               
                   
     public pagereference CancelSPRec(){
    
    PageReference page = new PageReference('https://cs1.salesforce.com/a36/o');
    page.SetRedirect(true);
    return page;
    }}

Visual force page:

<apex:page controller="siteplacementFetch" tabStyle="Site_Placements__c">
  
    <apex:form >
        <apex:pageMessages />
        <apex:pageBlock >
            <apex:pageBlockButtons location="Top">
           
            <apex:commandButton value="Fetch" action="{!FetchSPRec}"/>

            </apex:pageBlockButtons>

             <apex:pageBlockSection title="Please select the Critirea">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Auto Play" for="autoplay"/>
                    <apex:inputText value="{!sp.Auto_Play__c}" id="autoplay"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Number of Strikes" for="numberofstrikes"/>
                    <apex:inputField value="{!sp.Number_of_Strikes_Given__c}" id="numberofstrikes"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Device Type" for="devicetype"/>
                    <apex:inputField value="{!sp.Device_Type__c}" id="devicetype"/>
                </apex:pageBlockSectionItem>
               
               
             </apex:pageBlockSection>
            <apex:pageBlockSection title="Results">
                <apex:pageBlockTable value="{!spRec}" var="site" >
                    <apex:column value="{!site.Name}"/>
                    <apex:column value="{!site.total_Impressions__c}"/>
                    

                 </apex:pageBlockTable>
               
           
       
            </apex:pageBlockSection>
            </apex:pageblock>    
           
        </apex:form>
</apex:page>
Hi there,
I am writing a webservice callout which is triggered on clicking a link in an Account detail page; Upon the click of the link, the code will go to the external system and get the record from the other system based on the account I clicked the link from and display in a VF page.
So far, I've got to the point where i could retrieve from the endpoint but I do not know how to put the condition based on which Account Id i click the link from?

<!-----Visualforce Page-------------->
<apex:page controller="GetRestfulExample" action="{!fetchData}" contentType="text/plain">
     {!response}
</apex:page>

<!---------Controller----------->
public class GetRestfulExample {
    private final String serviceEndpoint= 'http://headers.jsontest.com/';
    public String Response { get; set;}
    public String Headers { get; set; }
   
    public void fetchData() {
        getAndParse('GET');
    }

  public void getAndParse(String GET) {

    // Get the XML document from the external server
    Http http = new Http();
    HttpRequest req = new HttpRequest();
    req.setEndpoint(serviceEndpoint);
   
    req.setMethod('GET');
    HttpResponse res = http.send(req);

    System.debug(res.getBody());
     this.response=res.getBody();
  }
}

Where can I put the condition to just display the fields for this account I am currently in?

Please throw me some ideas!

Thanks,
justin~sfdc
I have a requirement where there is a list of strings which is quite big, around few thousands. but need to be displayed in different lines and could be able to export/ take print etc...
please check the below image for reference.

please help.

 User-added image
  • February 10, 2014
  • Like
  • 0
I have a button on opportunities to send an email to the primary contact role for that opportunity. I'm trying to add the Opportunity Description to that email.

This works:
<messaging:emailTemplate subject="Your recent order" recipientType="Contact" replyTo="myemail@mydomain.com" relatedToType="Opportunity">
<messaging:plainTextEmailBody >
Hi {!Recipient.Firstname} -

Last year around this time you ordered XXX from us at Our Company. Is it time to do that again?

Please let me know if I can help you with anything. Thanks!

</messaging:plainTextEmailBody>
</messaging:emailTemplate>

But I have to manually replace XXX with the opportunity description. Adding {!Opportunity.Description} to the template gives me this error:

Error: Unknown property 'core.email.template.EmailTemplateComponentController.Opportunity'

How can I include this Descriiption in an email? 
  • February 10, 2014
  • Like
  • 0
Hello,

Had this dumb question. I can hear you telling that this can be done by setting up default values on the platform itself vs. a trigger and I'm completely trying the below as an experiment.


trigger spnInsert on Position__c (before Insert) {

    For (Position p: trigger.new) {
   
        p.Max_Pay__c = 99999;
    }
}


I'm getting this error below.

Error: Compile Error: Invalid type: Position at line 3 column 10

When I tried changing the for loop to state, however, I'm getting a different error - trigger name is already used

For (Position__c p: trigger.new) {

3. I also tried the below one.

trigger spnInsert on Position__c (before Insert) {

    list <position__c> p = new list <position__c>();

    For (p : trigger.new) {
   
        p.Max_Pay__c = 99999;
    }
}

Pl advise, what am I missing here.
  • February 10, 2014
  • Like
  • 0
I'm trying to migrate some of our projects to SFDX. Got everything working in scratch org, now trying to create a package2 to be able to install somewhere else.

I'm using our day to day work environment as DevHub, created a namespace org, bound it to the dev hub. 
Now trying to create the package I get : 

sfdx force:package2:create --containeroptions Unlocked --name "UtilsPackage v1" 

Error: ERROR:  entity type cannot be inserted: Second Generation Package.

Any one ever got this error or got any pointers?
 
The call for service field description in the requirement is way different than what trailhead is actually validating.

User-added image
I work in a Salesforce consultant team and often, when we need to sync objects with an external service, our developpers run in some data consistency problem, governor limit issue and all kind of pretty hard to resolved. 

I wrote an article this morning one way one we solve a customer need, I guess it can be of some help to those of you having simmilar issues : 
I work in a Salesforce consultant team and often, when we need to sync objects with an external service, our developpers run in some data consistency problem, governor limit issue and all kind of pretty hard to resolved. 

I wrote an article this morning one way one we solve a customer need, I guess it can be of some help to those of you having simmilar issues : 
I'm trying to migrate some of our projects to SFDX. Got everything working in scratch org, now trying to create a package2 to be able to install somewhere else.

I'm using our day to day work environment as DevHub, created a namespace org, bound it to the dev hub. 
Now trying to create the package I get : 

sfdx force:package2:create --containeroptions Unlocked --name "UtilsPackage v1" 

Error: ERROR:  entity type cannot be inserted: Second Generation Package.

Any one ever got this error or got any pointers?
 
I am seeing the following error when attempting to check the first challenge in the Process Automation Specialist Superbadge:

Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: SJNXHSJT

I am using a brand new DE org. Has anyone seen something similar for this superbadge?
HI Everyone,

Is there any way we can mass upload excel documents to the company object?
So in other words, mass adding attachments?

Regards,
Rajiv

  • March 13, 2014
  • Like
  • 0
Hi Team,

Is there anyway to send the SMS without App exchange from salesforce.

Thanks and Regards,
Venkatesh
Tried the methods available in given link but it returns the site URL instead of salesforce URL.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_url.htm
Example: I want to access salesforce base URL (https://cs13.salesforce.com) on site http://xyz.force.com/

How can I achieve this?
Any help will be appreciated.
Hi All,

In the standard homepage I've inserted a custom HTML component that contains an iframe to a Visualforce Page.
In this page I've inserted a button.
I would that when the button is clicked, the homepage is redirected to another page, and not the iframe as is now.

How I accomplish it.

Thanks in advance.
Hi,

I have a problem with a web service callout that continuously gets a timeout. The web service is called through a WSDL generated class. I read in the forums about the timeout_x variable and that we could assign up to 60 sec to this variable. The problem is the behaviour is the same whatever value I assign this variable to (from 1 ms to the max 60000 ms). The timeout still occurs after about 10 seconds.

Did you already experience that?  And how can I change the value of this variable? Thanks.
Hi,


I want to get if Opportunity has an Field set of it's Fields, by knowing only that it's an opportunity record.


if any one know it than please let me know . thanks in advance ...... :)
Hi,

I  need to assign a Lead to Task. How can i do that. 



I know that we can create a task with who id of lead as below.
Task newTask = new Task(
               ActivityDate = Date.today(),
               WhoID = Lead.OwnerId
               OwnerId = User.UserId;
               Status = 'Not Started',
               type = 'Other',
               Priority = 'Normal',
               Subject = 'Other',
               description = taskDescription
     );
insert newTask;

But i have a situation to assign a Task to Lead. How can i assgn it? Is there any method to assign a task to lead?

Lead newLead=new Lead();
newLead.TaskID= newTask.TaskID;  
             (or)
newLead.Activities.Add(newTask.TaskID)    like this?

Thanks.




  
Hey there,

My trigger is designed to fill 3 lookup fields upon record creation..however it is not filling the field Bonus_points_out__c.

Please help.

trigger OfficeCommissionOut_GrabReference on Office_Commission__c (before insert) {
Integer monFirstStart = null;
Integer monFirstEnd = null;
Integer monSecondStart = null;
Integer monSecondEnd = null;
Integer monThirdStart = null;
Integer monThirdEnd = null;
ID Office = null;

    //Figure out minimum and maximum date
    for(Office_Commission__c  Off:trigger.new)
    {

        monFirstStart = Off.Commission_Period_Start__c.month()-2;
        monFirstEnd = Off.Commission_Period_End__c.month();
        monSecondStart = Off.Commission_Period_Start__c.month()-1;
        monSecondEnd = Off.Commission_Period_End__c.month()+1;
        monThirdStart = Off.Commission_Period_Start__c.month();
        monThirdEnd = Off.Commission_Period_End__c.month()+2;
 
    Office = Off.Office__c;
   
       
    }
  
    if(monFirstStart!= null && monThirdEnd!= null)
     {  
        //Get all office commission in that range

  List<Commission_Period__c> CommissionPeriods = [Select Id, Point_Calculation_Period_Start__c, Point_Calculation_Period_End__c from Commission_Period__c where CALENDAR_MONTH(Point_Calculation_Period_Start__c)=:monFirstStart and CALENDAR_MONTH(Point_Calculation_Period_End__c)= :monFirstEnd];

        List<Commission_Period__c> CommissionPeriods2 = [Select Id, Point_Calculation_Period_Start__c, Point_Calculation_Period_End__c from Commission_Period__c where CALENDAR_MONTH(Point_Calculation_Period_Start__c)=:monSecondStart and CALENDAR_MONTH(Point_Calculation_Period_End__c)= :monSecondEnd and office__c=:Office];
         List<Commission_Period__c> CommissionPeriods3 = [Select Id, Point_Calculation_Period_Start__c, Point_Calculation_Period_End__c from Commission_Period__c where CALENDAR_MONTH(Point_Calculation_Period_Start__c)=:monThirdStart and CALENDAR_MONTH(Point_Calculation_Period_End__c)= :monThirdEnd and office__c=:Office];



       
        if(CommissionPeriods.size()>0||CommissionPeriods2.size()>0||CommissionPeriods3.size()>0)
        {
            for(Office_Commission__c Off:trigger.new)
            {
               
                if(Off.Point_Calculation_Period_Start__c !=null&&Off.Point_Calculation_Period_End__c !=null)
                {
                    //check if any office commission apply
                    for(Commission_Period__c oc : CommissionPeriods)
                    {
                     
                       
                        Off.Bonus_Points_Out__c = oc.id;
                    
                       break;
              
                   
                    }
                      for(Commission_Period__c oc2 : CommissionPeriods2)
                    {
                      
                       
                        Off.Bonus_Points_Out_2__c = oc2.id;
                        break;
                       
              
                   
                    }
                      for(Commission_Period__c oc3 : CommissionPeriods3)
                    {
                      
                       
                        Off.Bonus_Points_Out_3__c = oc3.id;
                        break;
                       
              
                   
                }
            }
        }
    }
}
}
Hi,

I am writing a update trigger, when the opportunity is updated, captured program__r.name to Progcon.name. but it is not capturing the name.

since i use trigger.new, there is no SOQL to add the lookup object field in SOQL.

can anyone give me some suggestion to it.

when i do Opp.Program__C , it copies the Id of the record but i want name of the record.


what if i have 5 triggers on Object1__c, how can i set which of the five triggers to execute first? is it possible?
  • February 25, 2014
  • Like
  • 0
Hi All,

Can we return empty collection in Apex as we do in Java using Collection.emptylist().

Regards
Hi,

public class CustomObjectsInPickListCntrl
{
public String val {get;set;}
      public void getName()
     {
         List<SCHEMA.SOBJECTTYPE> gd = Schema.getGlobalDescribe().Values();     
         List<String> customObjectList = new List<String>();
       
       for(Schema.SObjectType f : gd)
       {
                  
         
          Schema.DescribeSObjectResult res = f.getDescribe();
          if(res.isCustom())
          {
              if(!res.isCustomSetting())
              {                 
                  customObjectList.add(f.getDescribe().getName());
              }
          }
       }
          
     }
}

In the above code customObjectList has all custom objects

I have to get like this

for(SObject s : customObjectList){
     List<s> slist =  [Select Id LastModifiedDate from s];
}

If I wirte like this I will get SOQL Exception (100), so How I can do now. Please advice any one.
Hi,

public class CustomObjectsInPickListCntrl
{
public String val {get;set;}
      public void getName()
     {
         List<SCHEMA.SOBJECTTYPE> gd = Schema.getGlobalDescribe().Values();     
         List<String> customObjectList = new List<String>();
       
       for(Schema.SObjectType f : gd)
       {
                  
         
          Schema.DescribeSObjectResult res = f.getDescribe();
          if(res.isCustom())
          {
              if(!res.isCustomSetting())
              {                 
                  customObjectList.add(f.getDescribe().getName());
              }
          }
       }
          
     }
}

In the above code customObjectList has all custom objects

I have to get like this

for(SObject s : customObjectList){
     List<s> slist =  [Select Id LastModifiedDate from s];
}

If I wirte like this I will get SOQL Exception (100), so How I can do now. Please advice any one.
Hi,

public class CustomObjectsInPickListCntrl
{
public String val {get;set;}
      public void getName()
     {
         List<SCHEMA.SOBJECTTYPE> gd = Schema.getGlobalDescribe().Values();     
         List<String> customObjectList = new List<String>();
       
       for(Schema.SObjectType f : gd)
       {
                  
         
          Schema.DescribeSObjectResult res = f.getDescribe();
          if(res.isCustom())
          {
              if(!res.isCustomSetting())
              {                 
                  customObjectList.add(f.getDescribe().getName());
              }
          }
       }
          
     }
}

In the above code customObjectList has all custom objects

I have to get like this

for(SObject s : customObjectList){
     List<s> slist =  [Select Id LastModifiedDate from s];
}

If I wirte like this I will get SOQL Exception (100), so How I can do now. Please advice any one.
Hi, 
 
public class CustomObjectsInPickListCntrl
{
public String val {get;set;}
      public void getName() 
     { 
         List<SCHEMA.SOBJECTTYPE> gd = Schema.getGlobalDescribe().Values();      
         List<String> customObjectList = new List<String>();
        
       for(Schema.SObjectType f : gd) 
       { 
                   
          
          Schema.DescribeSObjectResult res = f.getDescribe();
          if(res.isCustom())
          {
              if(!res.isCustomSetting())
              {                  
                  customObjectList.add(f.getDescribe().getName()); 
              }
          }
       }
           
     } 
}

In the above code customObjectList has all custom objects

I have to get like this

for(SObject s : customObjectList){
     List<s> slist =  [Select Id LastModifiedDate from s];
}

If I wirte like this I will get SOQL Exception (100), so How I can do now. Please advice any one.
HI,

         I am getting confusion about callouts, when third party system connect to salesforce callouts are hit, or salesforce is hit the thirdparty system at that time callouts are executed in which case callouts are used,

       And one more doubt is some thirdparty system are axcess the account records from salesforce for that they ask me endpoint url for account object may i know how can i create a endpoint url for account.which endpoint url i want to give to thirdparty developers.

Hi everyone,

 

Our Company is using financial force accounting system, and I just wrote a trigger on the sales invoice object. Now when I wrote a test class for it, I use the code below:

 

c2g__CodaInvoice__c salesinvoice = new c2g__CodaInvoice__c();
//set values for the invoice
c2g__Opportunity__c = opp.id;
c2g__Account__c = acc.id;// opp and acc are already defined
...
... insert salesinvoice;

 But when I run the test, I always get an error message "no current company". Does anybody know what causes this error and how to get rid of it? Thanks a lot!!