You need to sign in to do that
Don't have an account?
Unable to place VF page button in page layout
Hello all,
While at Dreamforce a very helpful developer showed me how to create a VF page, then a button that will display in Lightning. I took copious notes, and tried to replicate another button I need to display in Lightning. When I go to page layout and attempt to place the button, it is "not allowed". I don't appear to have any issues with my APEX. it is essentially a hyperlink that goes to a different system. Any assistance is appreciated.
here's the code if that helps:
<apex:page standardController="Opportunity">
<script>
http://MAGICDEV/magicxpi4_1/MGrqispi.dll?appname=IFSSF_JDE&prgname=HTTP&arguments=-AJDE_INT%23TS&OppID={!Opportunity.Id}
</script>
</apex:page>
While at Dreamforce a very helpful developer showed me how to create a VF page, then a button that will display in Lightning. I took copious notes, and tried to replicate another button I need to display in Lightning. When I go to page layout and attempt to place the button, it is "not allowed". I don't appear to have any issues with my APEX. it is essentially a hyperlink that goes to a different system. Any assistance is appreciated.
here's the code if that helps:
<apex:page standardController="Opportunity">
<script>
http://MAGICDEV/magicxpi4_1/MGrqispi.dll?appname=IFSSF_JDE&prgname=HTTP&arguments=-AJDE_INT%23TS&OppID={!Opportunity.Id}
</script>
</apex:page>
I am guessing that you want this button to show up on the Opportunity Detail page within the Lightning Experience (aka LEX) in which case you do not need a VF page for opening up a URL with the Oppty ID populated using a merge field.
Can you give it a try to modify the button similar to the screenshot I shared earleir with you and let me know what you see?
Kind Regards,
Swarna.
All Answers
Hi Eric,
When you are on the Edit view of the Pagelayout, are you selecting Buttons (2nd option on the list) on the left hand pane of the palette on the top and then trying to drag the button you have created onto the "Salesforce1 and Lightning Experience Actions" Pane at the top of the pagelayout?
If you are then you will need to select the option which reads "Salesforce1 and Lightning Actions" (5th option on the list) on the left hand pane of the palette on the top and then trying dragging the button you have created onto the "Salesforce1 and Lightning Experience Actions" Pane.
Please do let me know the outcome.
Kind Regards,
Swarna.
Progress is always nice (^_^). So what you are getting now is basically a popup window with a blank screen or you are on the same screen with everything below the tabs blanking out?
Can you tell me what you want to do - open up a URL with the SFDC OpptyID prepopulated in a new window/tab outside of the SFDC? Can you also open the button/action you have created in the edit mode and sent me a screenshot?
Kind Regards,
Swarna.
Hello Swarna, not sure if my last post included the screenshot, so adding it here. any further assistance is appreciated!
I am sorry for the delayed response; been buried in work for the last few days. And yes the comment prior to your most recent did not have the screenshot but your last one does and it provides the needed clarity.
I am not sure why you are selecting the content as a VF Page if all that you want is to open a URL with one of the parameter values to the the SFDC Opportunity ID. You will need to make the changes to the Custom Button as shown in the screenshot below:
Please do let me know how it works out for you.
Kind Regards,
Swarna.
I am guessing that you want this button to show up on the Opportunity Detail page within the Lightning Experience (aka LEX) in which case you do not need a VF page for opening up a URL with the Oppty ID populated using a merge field.
Can you give it a try to modify the button similar to the screenshot I shared earleir with you and let me know what you see?
Kind Regards,
Swarna.
.
You are very welcome.
As far as the second screenshot goes, I did take a look at the code authored by you and I feel there seems to be a disconnect between what you have coded vs. what you might be expecitng the system to do.
Here are my questions and observations:
- When you click on the button, named CreateSO_Opportunity, you are asking the system to do the following:
- Check if the field named JDE Order Number is Empty and if it is then it should open a URL with the Opportunity ID pre-populated using a Merge field.
- If the field is not Empty, it should show a message that the "JDE Order already exists".
- What will bringing up this link do?
- Will it create a Sales Order in your ERP system (I am guessing)?
- If it does create a Sales Order using this URL, then how are you expecting the ERP system to come back and update the JDE Order Number because it seems like it would or atleast you expect it to based on how you have defined your logic on the page?
- As far as the primary issue you want to fix is defnitely as to why "a separate window does open, but the opportunity page "blanks out" aside from the menu at the top" - Correct?
Kind Regards,Swarna.
1. All the action within the VF page is working as planned, the issue of the blank page persists. I am concerned that end users will not like this action, although easily fixed with the back button on the browser.
a. yes, this is the intended action.
b. correct.
2.
a. yes, it will create a sales order with a unique Sales Order number
b. we have some automation that will write the new Sales Order number to a field in SFDC.
3.
a. yes, all of the above appears to be working as planned, my only issue is the blank page left behind as users are re-directed to the ERP system. it's an easy enough fix to hit the back button on the browser, but it doesn't seem like a planned experience for the sales user.
It all makes sense but I do have one more question based on what yo usaid in your thid point which is "my only issue is the blank page left behind as users are re-directed to the ERP system" - the window in which the ERP URL opens is working fine but the Opportunity page from where you click the button just simply blanks out; is this correct?
Can you please add the screenshot of the button configuration that you are referring to in this scenario?
Kind Regards,
Swarna.
and here's the result of clicking that button. it will open to the ERP system (second tab), but SFDC result is the below "blank" screen with just the menu bar.