Print Button function in Salesforce
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
1
down vote
favorite
I have created a print button and passed following javascript method :-
When I am clicking on the button Print I am getting below error:-
Please help.
Thank you.
apex javascript
add a comment |Â
up vote
1
down vote
favorite
I have created a print button and passed following javascript method :-
When I am clicking on the button Print I am getting below error:-
Please help.
Thank you.
apex javascript
1
Hi @vidya you can't use apex code on Custom button. This code only use on Visualforce pages.
– Prem Anandh
Aug 6 at 7:26
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have created a print button and passed following javascript method :-
When I am clicking on the button Print I am getting below error:-
Please help.
Thank you.
apex javascript
I have created a print button and passed following javascript method :-
When I am clicking on the button Print I am getting below error:-
Please help.
Thank you.
apex javascript
asked Aug 6 at 7:23
vidya
82
82
1
Hi @vidya you can't use apex code on Custom button. This code only use on Visualforce pages.
– Prem Anandh
Aug 6 at 7:26
add a comment |Â
1
Hi @vidya you can't use apex code on Custom button. This code only use on Visualforce pages.
– Prem Anandh
Aug 6 at 7:26
1
1
Hi @vidya you can't use apex code on Custom button. This code only use on Visualforce pages.
– Prem Anandh
Aug 6 at 7:26
Hi @vidya you can't use apex code on Custom button. This code only use on Visualforce pages.
– Prem Anandh
Aug 6 at 7:26
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
you did everything correct except the code you added in the text area.
Visualforce code can't be executed here. Only javascript code will be executed here
You just need window.print();
Just put this in text box and try
1
Thank you.It worked . :)
– vidya
Aug 6 at 8:10
add a comment |Â
up vote
1
down vote
You can't use apex tags in custom java script buttons. Just use window.print();
in your custom button it will automatically redirect you to print page.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
you did everything correct except the code you added in the text area.
Visualforce code can't be executed here. Only javascript code will be executed here
You just need window.print();
Just put this in text box and try
1
Thank you.It worked . :)
– vidya
Aug 6 at 8:10
add a comment |Â
up vote
2
down vote
accepted
you did everything correct except the code you added in the text area.
Visualforce code can't be executed here. Only javascript code will be executed here
You just need window.print();
Just put this in text box and try
1
Thank you.It worked . :)
– vidya
Aug 6 at 8:10
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
you did everything correct except the code you added in the text area.
Visualforce code can't be executed here. Only javascript code will be executed here
You just need window.print();
Just put this in text box and try
you did everything correct except the code you added in the text area.
Visualforce code can't be executed here. Only javascript code will be executed here
You just need window.print();
Just put this in text box and try
edited Aug 7 at 6:09
answered Aug 6 at 7:29


Ratan Paul
18.8k82463
18.8k82463
1
Thank you.It worked . :)
– vidya
Aug 6 at 8:10
add a comment |Â
1
Thank you.It worked . :)
– vidya
Aug 6 at 8:10
1
1
Thank you.It worked . :)
– vidya
Aug 6 at 8:10
Thank you.It worked . :)
– vidya
Aug 6 at 8:10
add a comment |Â
up vote
1
down vote
You can't use apex tags in custom java script buttons. Just use window.print();
in your custom button it will automatically redirect you to print page.
add a comment |Â
up vote
1
down vote
You can't use apex tags in custom java script buttons. Just use window.print();
in your custom button it will automatically redirect you to print page.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You can't use apex tags in custom java script buttons. Just use window.print();
in your custom button it will automatically redirect you to print page.
You can't use apex tags in custom java script buttons. Just use window.print();
in your custom button it will automatically redirect you to print page.
answered Aug 6 at 7:31


Prem Anandh
1718
1718
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f227835%2fprint-button-function-in-salesforce%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Hi @vidya you can't use apex code on Custom button. This code only use on Visualforce pages.
– Prem Anandh
Aug 6 at 7:26