I have a custom Salesforce (Summer '11) button. Clicking the button navigates the user to a url in a new window. The url points to my own custom web app. (It does not point to the same url as that of the salesforce environment).
I want this url to be configurable for my dev, staging and live environments, so that the button in the SalesForce dev environment points to the app's dev environment, and so on.
If possible, what's the best way to achieve this, given that I'll be deploying the customization in dev (inc. button, but other things too) via a changeset which I'll push to the staging and live environments?
You would want to implement this using a custom setting. Sadly it's not yet? possible - we need to vote: success.salesforce.com/ideaview?id=08730000000I5NsAAK
As long as your button URL is pointing to a relative path rather than the full path including the server instance (and, of course, as long as the path exists) your button will work across server instances without any fuss.
For example, do: /{!Account.Id}/e? etc.
do not: https://eu1.salesforce.com/{!Account.Id}/e? etc.
Related
I am using the Polymer Starter Kit to build a small website. However I have run into a problem. I am wanting to serve up Word documents. The usual way is to place these in an anchor tag eg
Session Notes
However this is captured as a page to load by Polymer and produces the 404 page, though the url on the page is correct. When I refresh the page, the document is served up normally.
How can I adjust the starter kit, especially the _pageChanged function so that there is no page change and the normal process of simply serving the document is followed.
Edit:
I have solved the problem, however not using anchor tags. I created a small form component with simply a button. In the form I have two fields which become attributes, one for the form action attribute and one for the button text. This means that in my pages I simply call this component with two attributes
<form-button submit="Button text" action="file location"></form-button>
While not the most elegant solution it has the desired effect.
The easiest way would be to find a CDN or use a Cloud-based solution. You could, for example, use Google Drive and find a sharelink to direct link converter and have it served externally.
Another method, harder, would be to set up another web server on a different port. For example, NGINX running on Port 80, with the PSK running, and Apache running on port 81, serving your Word Documents. Not as convenient, but it would work.
Once a Silverlight application has been installed as an out-of-browser application, I know I can update it by calling the Application.Current.CheckAndDownloadUpdateAsync() method. This will check the URL where the XAP was originally downloaded and update if necessary.
But what if, somewhere in the future, I would want or need to change the url of the XAP? The domain name changes, the location on my site, etc.
Is there a way of indicating where the OOB application should check for the update?
Now I know of the /origin property, but as far as I know, there's no way to set this when you let the user just install it by clicking on a button on your site (or right clicking in the application). Also, I don't know of a way of changing it at a certain point in time. Other than letting the user do it manually, that is. But that's not very user-friendly.
If it is entirely not possible, maybe a redirect could do the trick?
So is there a way to programmatically define/change the URL of a XAP?
You can not change origin url for installed OOB application. Not without asking user to uninstall and re-install application from new location. It is not all that user friendly, but it is transparent to the user.
Ideally origin url should not change during life time of the application. Using server side url rewriting (maybe redirecting too) should be fine if you would like to move xap file around. If changing domain name is unavoidable you could push an update to the users that reminds them that application moved to different domain and it needs to be re-installed.
I am writing a simple salesforce app that requires app-level and user-level configuration. I have created custom objects for these settings, but cannot figure out how to add links to the Setup page (Personal Setup and Customize) so that the settings can be managed.
Quite a lot of research, and a question on a salesforce board, have left me none the wiser. I have seen a couple of scripts on the web that hack the setup sidebar with javascript (eg http://userscripts.org/scripts/show/95361) ... but this can't be the right way to do it surely?
Thanks
Jim
You are unable to do this without hacking because Salesforce want it so that you don't require over-explicit setup of any app you create - they want you to make it data-independent and in fact it may fail a security review if it is data dependent. It will also likely cause you headaches in correctly unit testing the app.
My suggestion would be to have a set of custom pages which are linked to on the home page for a user which display if they have no current values (so the first thing they see on the home page when they login for the first time is a "Hey, before you use this app you need to do some configuration through this handy wizard" and then block access to other areas of the app (i.e. display warning messages on other pages) if the app has not had this data setup.
That way you are not hacking and are providing a nice user experience around the extra setup.
Paul
DO you just want to add a new TAB on the top menu that links to the Edit page for your new sObject?
If so:
Goto setup https://cs3.salesforce.com/ui/setup/Setup
Click on 'Create' > 'Tab'
Pick the sObject you want the tab edit, the click next until you save the new tab.
There is no supported way to augment the Setup menu.
You should probably be using Custom Settings for what you are describing - they were designed for app-level and user-level configuration, and are available from Setup.
Otherwise, if it really is custom setup that requires fancier logic / UI / etc, you may want to do what many SFDC ISV's do and ship your app with its own configuration tab that's hidden, and/or custom VF page that manages app settings.
I have a WPF intranet app running in Trusted mode (local only).
I would like the users to be able to upload an image and attach it to an article on my newsletters section. I am having trouble deciding where these images will be stored.
Please provide me with your opinions.
At present I have a few ideas myself;
I could have an aspx page that runs parallel to this app, and run this inside a browser(I-frame). This page could then handle the upload and display of the image.
I could also, have the users copy directly to a network share.
It seems that there should be a more elegant sollution that I am not aware of.
Any ideas?
Don't force the solution towards ASPX just because you know how to do it there. It's unnatural to build a page, host browser to show that page etc, just so you could upload an image.
It's actually quite simpler to do it in a desktop client than on web page. You have a "Load File Dialog" - use that to get to the filepath the user wants to upload, and when you have that you can either:
copy it (inside your application) to your share,
or if you have a service - send it through some method call,
or you can even store it inside a database (recommended if the files are small)
There's really lots of options here... it depends if your client has connection to db, do you have service in between, etc...
I have a windows forms application and which provides a way to search the database based on the provided value. Sometime I need to open the application through a simple html hyperlink with the search result while loading itself. There are two questions/doubts from here.
How to access the existing running windows forms application as url? If this is possible, how can I pass the argument?
If the application is not running, we have to start the application and search the value. This also has to be happened when I click the link.
Simply we can say like, if you open a website link from your outlook email, the link will be opening in existing opened default browser or it will start the new browser(if the browser is not already opened.) I want to achieve the same behavior.
Seems to be the below post is somewhat related to my queries, but this does not solve my problem.
Activate existing browser window with given URL from C# application (without triggering reload)
You can't do this. The default browser launches when you click on a link because it is set up in the registry as the default handler for hyperlinks.