• sowji
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 5
    Replies

Hi,

 

I have a doubt, So if want to query data w.r.t the standard  field of a custom object, how should I refer to it,

i.e using field label or name

 field label is BookingID 

field name is Name

select  No_of_Days__c from Rental_detail__c where BookingID=:30

or

select  No_of_Days__c from Rental_detail__c where Name=:30

 

 

Thanks,

Sowjanya

  • July 25, 2011
  • Like
  • 0

Hi frnds,

 

In this Rental_detail__c (custom object), I created a standard field (ID) with autonumber  format {0}.

Now I am inserting a record and I want the ID after insertion, so i thought of querying Max(ID).

 

I tried this part of code in my controller expecting it to return serial number, but is returning a random string (a0B900000022W9aEAE)

 

 List<AggregateResult> groupedResults = [SELECT MAX(ID)maxval FROM Rental_detail__c]; 

 String newId;

 if(groupedResults .size() > 0)            {         

      newId  =  ''+groupedResults[0].get('maxval') ;

  }     

 System.debug('New id:'+newId);

 

Pls help me on this.

  • July 24, 2011
  • Like
  • 0

Hi friends,

 

I am newbie to sales force. I created an apex page and attached it to a vf tab. But when the vf tab is selected, the selection is not showing in display.

In apex page (book vehicle),

<apex:page standardController="Vehicle__c"></apex:page>

 

On selection of book vehicle apex page, the Vehicle tab is shown as selected page. Vehicle is a tab attached to vehicle custom object.

 

Please let me know where I am going wrong.

 

Thanks,

Sowjanya

 

 

  • July 22, 2011
  • Like
  • 0

Hi frnds,

 

In this Rental_detail__c (custom object), I created a standard field (ID) with autonumber  format {0}.

Now I am inserting a record and I want the ID after insertion, so i thought of querying Max(ID).

 

I tried this part of code in my controller expecting it to return serial number, but is returning a random string (a0B900000022W9aEAE)

 

 List<AggregateResult> groupedResults = [SELECT MAX(ID)maxval FROM Rental_detail__c]; 

 String newId;

 if(groupedResults .size() > 0)            {         

      newId  =  ''+groupedResults[0].get('maxval') ;

  }     

 System.debug('New id:'+newId);

 

Pls help me on this.

  • July 24, 2011
  • Like
  • 0

Hi friends,

 

I am newbie to sales force. I created an apex page and attached it to a vf tab. But when the vf tab is selected, the selection is not showing in display.

In apex page (book vehicle),

<apex:page standardController="Vehicle__c"></apex:page>

 

On selection of book vehicle apex page, the Vehicle tab is shown as selected page. Vehicle is a tab attached to vehicle custom object.

 

Please let me know where I am going wrong.

 

Thanks,

Sowjanya

 

 

  • July 22, 2011
  • Like
  • 0