• dev@brownbees
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Please provide steps and a simple example with apex code
Hello friends,
    Here is my code.where i first fetch the max value and using that max value trying to fetch one row.but unable to do so because it needs object to string conversion.
[i tried--->> String s=code.toString(); //not working.]
 AggregateResult[] groupedResults=[select MAX(Agent_ID__c)maxvalue from Mobile_Agent__c];
      Code = groupedResults[0].get('maxvalue');
      TableData=[select Name,Last_Name__c,Device_Phone__c,Subscriber_ID__c,Agent_ID__c,registered_date__c from Mobile_Agent__c where Agent_ID__c='Code'];

Hi All,

 

I have a custom object, I need to make the record as read only based on the value of a particular custom picklist field..for a particular profile...

 

For Ex:

 

I have an Object says: Custom_Object__c

Custom Field is: Picklist__c

 

as i save the record with the Picklist__c='Changed' for a particular profile.. my complete record should become read only.. is that can be achieved...?

 

Thanks