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

Display custom button based on the record availability
Hello,
I have a custom object Journey and I have a requirement that if the journey is not exist(Journey record is not created for the day) for the day then dispaly the 'Start' button on the vf page.
Once I click on the button it'll be hidden from the page and 'Stop' button will be display on the page.
Welcome to your suggestions!
Thanks,
Nilesh
I have a custom object Journey and I have a requirement that if the journey is not exist(Journey record is not created for the day) for the day then dispaly the 'Start' button on the vf page.
Once I click on the button it'll be hidden from the page and 'Stop' button will be display on the page.
Welcome to your suggestions!
Thanks,
Nilesh
May I suggest you please check with below idea from the success community with a similar discussion which might help you further.
- https://success.salesforce.com/ideaView?id=08730000000Br23AAC
I would suggest you upvote for the idea so that this feature can be available in the mere future.As a workaround, you can override detail page with the visual force page to show or hide the buttons.
Thanks,
Nagendra
Here is detailed requirement.
I'm fetching lat long and address from javascript and storing them into the custom object at the backend(from controller). above is my current code at back end of this page making callout and storing record in the custom objects.
Now I want two buttons on the visualforce page which will be dispalyed based on the conditions:
START button: Please check there is record for the current date in journey object. If not, then START button should be visible. If yes, then STOP button should be visible
STOP button: the latitude ad longitide fetching mechanism should get stopped. This means as user will clicked on the stop button then there should no any record in the location object after that time for the respective journey.
I don't want to override the detail page.
Please take a look and suggest something.
Thanks,
Nilesh