Inject customer-specific data into Outlook add-in - office-addins

For our add-in, we need some data that will be different on a per-customer basis, such as a customer ID, base URL (changes based on region/environment), API key, etc. We will need this data in order to contact some of our external microservices.
We've looked into RoamingSettings, and that seems to be a good way to save this customer data for later use, but this would only be possible AFTER our data gets injected and is available to the add-in for saving.
We've looked into this question and its corresponding answers: Read parameters from Outlook 365 Add-In manifest. Michael Zlatkovsky's answer, regarding appending an encoded string with that data to the add-in's start URL in the XML manifest, and later grabbing that URL with JavaScript and decoding/parsing that query string seems to be our best option yet.
Is there a standardized or more common way of injecting data into an add-in?

Related

Enhanced Domains - What to Check in your Org?

As you know Salesforce is enforcing Enhanced Domains. I found from Salesforce help that:
Custom components in your org must be evaluated in order to check
whether they use domain name/static URLs
Some embedded content stored in Salesforce might no longer appear
Third-party applications can lose access to your data
Single sign-on integrations can fail
However, I'm struggling with finding out which particular Salesforce elements/configurations should be checked in order to detect potential gaps? Do you know which areas exactly can be affected and shall be evaluated (like Apex Codes, Email Templates and so on)? Is there any guide on that?
Your biggest concern should be inbound integrations. Things that log in over REST/SOAP API, get response with session id back, ignore the "url to use for all subsequent requests" and just use hardcoded url, whether it's prod or sandbox.
Look at this guy, he's victim of either enhanced domain or "disable api versions < 30" thing: The requested resource no longer exists with rest PHP. Look at these guys, they had hardcoded url: how to solve python code error (TooManyRedirects: Exceeded 30 redirects), Salesforce API via postman error INVALID_SESSION_ID.
As for stuff inside Salesforce itself - best would be to download whole project with sfdx and run a text search for your domain name (and site/community name if you have these). Email templates that use merge fields for forgot password etc should be fine, merge fields with record link should be fine... But if you manually craft email body in apex - might be a problem. A lot depends how creative the developer was. If you find getsalesforcebaseurl().toexternalform() it should still work. If it's hardcoded / read from custom setting / custom label / custom metadata it might be more fun.
If you have external apps that display pieces of salesforce (embedded live chat? some iframe with FAQ? CMS Connect) - the domain change might mean they need to be updated, both in terms of updating url and changing security rules (CSP for example)

how to parse Excel worksheet/table and map excel columns to a data entity in Dynamics 365 Operations

what actions/connectors one could use to parse a excel file and map columuns from a excel table to and external store, in this case i wish to make a record in Dynamics 365 operations using OData entity.
Thanks
Why exactly are the obvious RapidStart Services no option for you?
If you definitely need to use OData, I suggest building a publishable OData page via WebServices. You then can implement a parser in any environment/language you prefer and submit the new record via a RESTful Webservice-Call (which nearly every framework should allow) to this very same page, in order to submit the record to your productive environment.

Can I use deep links for Google Data Studio report and/or pass data source parameters in the report URL?

Is it possible to build one Google data studio report (i.e., template) and use a URL that links it to a specific data-set or defines a hidden filter that creates a sample of a larger data set?
I understand Data Control allows this for users operating under the same Google domain.
However, I want to provide multiple university student teams with their personal information but not allow the other teams to see or filter for information that they should not see. Ideally I could simply share a customised URL with each team that takes care of this filtering/sampling.
Any guidance appreciated - many thanks!
You can do this with custom bookmarks and URL parameters.

How to save facebook data

I am very new to Facebook applications and have very basic questions.
I use javascript SDK for my application, that loads friends' names and their profile pics.
How can I store this data into a MySQL database?
Since you want to store data in a databes you need to have the server process the information and put it there, thus a server script is required.
Most commonly people use php, so what you need to look at is how to get the data from facebook:
https://developers.facebook.com/docs/reference/php/
and then how to store the date you got from facebook:
http://www.w3schools.com/php/php_mysql_intro.asp
(you can do a google search there are loads of resources)
Keep the facebook guidelines on storing data in mind (not quite sure what they look like anymore)
Happy coding!

How to I access reports programmatically in SalesForce using Apex

I'm trying to write an app on the SalesForce platform that can pull a list of contacts from a report and send them to a web service (say to send them an email or SMS)
The only way I can seem to find to do this is to add the report results to a newly created campaign, and then access that campaign. This seems like the long way around.
Every post I read online says you can't access the reports through Apex, however most or all of these posts were written before Version 20 of the API was released last month, which introduced a new report object. I can now programmatically access info about a report (Such as the date last run etc) but I still can't seem to find a way to access the result data contained in that report.
Does anyone know if there's a way to do that?
After much research into it, I've discovered the only way to do this at the moment is indeed to scrape the CSV document. I would guess that Conga etc are using exactly this method.
We've been doing this for a while now, and it works. The only caveats are:
Salesforce username / password /
security token has to be shared to
the app connecting. If the password
changes (and by default it is changed
every 30 days or so) the token also
changes and must be re-entered.
You have to know the host of the account, which can be difficult to
get right. For instance while most european accounts would use emea.salesforce.com to access CSV, our account uses na7 (North America 7) even though we're located in
ireland. I'm currently sending the page host to the app and parsing it
to calculate the correct subdomain to use, but I think there has to be a
better way to do this.
Salesforce really needs to sort this out by supplying an API call which allows custom report results to be exported on the fly and allowing us to use OAuth to connect to it. But of course, this is unlikely to happen.
In the SalesforceSpring 11 update, it seems you can obtain more informations about the Reports:
As stated in the API for Report and ReportType, you can access via Apex the fields used in the query by the Report, reading the field "columns", as well as the field used to represent the filters called "filter".
Iterating through this objects, should allow you to build a String representing the same query of the Report. After building that string you can make a dynamic query with a Database.query(..) call.
It seems to be a little messy, but should work.. (NOT TESTED YET!)
As header states, this works only with Custom Reports!
Just to clarify for fellow rookies who will find this, when the question was asked you could access your report data programatically, but you had to use some hacky, error prone methods.
This is all fixed, you can now access your reports via the API as of Winter '14.
Documentation here - http://www.salesforce.com/us/developer/docs/api_analytics/index.htm
Go to town on those custom dashboards etc. Cross posted from the Salesforce Stack Exchange - https://salesforce.stackexchange.com/questions/337/can-report-data-be-accessed-programatically/
But Conga (appextremes) do this in their QuickMerge product, where the user specifies the report Id, and the apex script on the page runs the report to extract the results for a mail merge operation.
the v20.0 API added metadata about the reports, but no way to actually run the report and obtain the results. If this is a standard report, or a report you've defined, you can work out the equivalent SOQL query for your report and run that, but if its an end user defined report, there's no way to do this.

Resources