• mail2ghani1.3921762673905103E12
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 0
    Replies
Create a simple Visualforce page that when given a contact ID will display that contact, the account that it is associated to, as well as the billing street.
Add a trigger that when a join object is inserted, the trigger will copy the billing street address from the related Account to the other streets address on the related Contact.
Create a Custom Object that does a many to many relationship between Account and Contact.  The custom object should be visible as a related list on the Account/Contact detail pages.
Hai all
 i get the error  Compile Error: Return type of global method must also be global: Account at line 5 column 23

Resource(urlMapping='/Account/*')
global with sharing class MyRestResource
{
  @HttpGet
global static Account doGet ()
   {
    RestRequest req = RestContext.request;
    RestResponse res = RestContext.response;
    String accountId = req.requestURI.substring(req.requestURI.lastIndexOf('/')+1);
    Account result = [SELECT Id, Name, Phone, Website FROM Account WHERE Id = :accountId];
     return result;
    }
}