You need to sign in to do that
Don't have an account?

Id value {!Contract.Id} is not valid for the Contract standard controller
I have run into this problem in a few places with Contract. It's pretty obvious that Contract has an Id, as it is visible in the URL for the individual contract.
I am creating a custom button and I need to use the Id to load up the correct Contract in my visualforce page. The page works fine if I manually paste in the Id. The button is set to "URL" as the content source, and the following code is used:
apex/PDAdContract?id={!Contract.Id}
So, why would it say that Contract has no Id? How can I get the Id?
THanks!
Hello rDr;
Add a slash at the begining of your URL as below.
All Answers
Try selecting Visualforce Page as the content source, instead of "URL".
Using "URL" as content source requires static value. It will not evaluate any expression, in this case {!contract.id}.
billy
Hello rDr;
Add a slash at the begining of your URL as below.
Tryout the following syntax :
/apex/PDAdContract?id={!Contract.Id}.
This will work to open a visual force page along with id on the click of detail button.
Hope this helps.