• Alper Cekic
  • NEWBIE
  • 0 Points
  • Member since 2018
  • movingimage

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi,
I am trying to create a custom button with an if statement to use on a quote detail page. Sample code as follows;
{!IF
(
TEXT(Quote.Status)<>"Akzeptiert",
URLFOR("/apex/SalesFlowCreateOrderContract"),
'/flow/Quote_to_Order_with_Contract?QuoteID="{!Quote.Id}&"retURL=/"{!Quote.Id}'
)}

On the first option, the code tries to redirect to a VF page which works perfectly. But if statement continues on to the second option either I get encoding errors or non-working if statement depending on the syntax I tried to avoid errors. I tried to use URLENCODE but it did not work too.

Is there anyone who may share ideas on this?

thanks
Alper
 
Hi,
I am trying to create a custom button with an if statement to use on a quote detail page. Sample code as follows;
{!IF
(
TEXT(Quote.Status)<>"Akzeptiert",
URLFOR("/apex/SalesFlowCreateOrderContract"),
'/flow/Quote_to_Order_with_Contract?QuoteID="{!Quote.Id}&"retURL=/"{!Quote.Id}'
)}

On the first option, the code tries to redirect to a VF page which works perfectly. But if statement continues on to the second option either I get encoding errors or non-working if statement depending on the syntax I tried to avoid errors. I tried to use URLENCODE but it did not work too.

Is there anyone who may share ideas on this?

thanks
Alper