• Roger Bannister 53
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I have a custom button on the Quote object that, as part of it's function, I want it to select only the most recent document from the 'Files' related list to be sent out.

Right now it 'grabs' all the files in the related list - is there some code I can add to the button that limits it to only the most recent file? What would that code look like?

Thanks, Roger
I have added a custom button to Quote object including an IF conditional statement , when the statement is true it functions correctly however if false instead of showing error message statement I get URL No Longer Exists error - please see code below. What can I do to fix this?
{!IF( ISPICKVAL( Quote.Status , 'Approved') , 

URLFOR('/apex/dsfs__DocuSign_CreateEnvelope', null, [SourceID = Quote.Id, 
LF='1', 
CRL='Email~'+Quote.Email+';LastName~'+Quote.Full_Name__c+';Role~Signer 1,LoadDefaultContacts~0', 
OCO='Send' 
]), "Quote must be submitted for approval") 
}

 
I have added a custom button to Quote object including an IF conditional statement , when the statement is true it functions correctly however if false instead of showing error message statement I get URL No Longer Exists error - please see code below. What can I do to fix this?
{!IF( ISPICKVAL( Quote.Status , 'Approved') , 

URLFOR('/apex/dsfs__DocuSign_CreateEnvelope', null, [SourceID = Quote.Id, 
LF='1', 
CRL='Email~'+Quote.Email+';LastName~'+Quote.Full_Name__c+';Role~Signer 1,LoadDefaultContacts~0', 
OCO='Send' 
]), "Quote must be submitted for approval") 
}