• Andrew Piana 1
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

Hi,
I'm struggle to access a custom field throught the PHP SDK.
The field exist:
User-added image
I can access the basic fields, but when i try to add the custom field to the query, always return the same error.

$query = "SELECT Id, FirstName, LastName, Phone, NumOrdem__c FROM Contact";
Error: "No such column 'NumOrdem__c' on entity 'Contact'. "

I've generate already the WSDL several times, but without success.

Can someone help and point me to the right direction?
I really appreciate.

Regards,Nuno

I am working on trying to group my Event data with maps. What I am trying to accomplish is to group my Events in weeks > bookers > roll up count for booked appt for each week. My logic so far is:

map<string,list<Event>> Date2Event = new map<string,list<Event>>();
for(Event e: eventLst){
    if(!Date2Event.containsKey(dateMapKey(e.CreatedDate))){
         Date2Event.put(dateMapKey(e.CreatedDate), new list<Event>());
     }
     Date2Event.get(dateMapKey(e.CreatedDate)).add(e);
}

public string dateMapKey(datetime dt){
    	datetime myDt = dt;
    	date myDate = myDt.date();
    	date StartOfWeekDate = myDate.toStartOfWeek();
    	string mapKey = StartOfWeekDate.format() + '-' + StartOfWeekDate.addDays(6).format();
    	return mapKey;
}

So I have a function that is basically setting the map's key with a string of start date to end date. So far what I have accomplished is to group the events by week. Now I need to nest the grouping more and group by week and by bookers, then roll up count for each booked appt for that week. Any ideas would be greatly appreciated. Thanks.