Detect Salesforce edition and/or capabilities from Apex/VisualForce - salesforce

From within an Apex class, how can I detect the Edition (ie, Group, Professional, Enterprise, Unlimited). More specifically, is there an API to retrieve the capabilities (or lack thereof) for the user's edition?
The problem I am trying to solve is that from the Group/Professional edition, users cannot access the custom Web Services in my app, receiving the error LOGIN_OAUTH_API_DISABLED. Is there a way to detect whether this is going to work from within Apex?

You can use the following SOQL to determine the Organization's license type:
SELECT OrganizationType FROM Organization
For Professional it will return "Professional Edition". This is detailed on the Organization object page.

Are there any specific capabilities you're looking to discover? There's no way to determine the edition (and this would be mostly a red herring if you could). A lot of differences end up being reflected in the data model, and you can discover that using the describe features.
If you want to check from apex if your web services is enabled/available, then you could use apex callouts to try and make a call to it (and FWIW, the error code is from OAuth, and not from your apex web service)

Related

How do I create access control

Hi I am new to oracle express application and I am having trouble trying to create access control for different levels of users. I am not the admin, I am just the developer and cannot create users.
So far I have zero users. I want to create users. Not sure if it is possible. I don't have the function available.
The image below shows an error. Don't know how to solve this. I am assuming it is not possible to create access control if I don't have users. I am not sure.
This won't help you right now, and I know you're not in control of this, but you should encourage your teacher or administrators to update the version of Oracle APEX which is being used.
The version you're using (APEX 5.0) implemented access control by creating a table in your database schema. In newer versions of APEX, local access control is embedded as part of the framework itself.
Your instructions may be using a specific curriculum associated with this version of APEX, and it would be time-consuming to update. But please do let them know for future classes that Oracle does provide a completely free curriculum, with a permissive use license.
Here is more information about the curriculum, and here was the blog announcement.

Adobe Experience Manager WorkBench Check out/in Issue

Shortly I ve Windows Server 2012 R2, AEM Forms(6.2), SQLServer(2014) and Workbench(6.2) in same server. At first when i install and configure all of them, i can check out or in my applications from Workbench succesfully. However After my software team executes some scripts at Database, we can not check in/out from workbench. The worst thing when i click check out, workbench gives any error. any log. on event log or server application. It gives nothing and don't do my transaction. I saw at forums some people have same issue but nobody writes solution.
Please if any one knows the solution, share with us. What's wrong with my workbench? what to do fix this issue?
The query that your software team ran turns off security on every single LiveCycle service and makes them run as the system user. This includes the services used by Workbench and is very bad. Some of the services rely on knowing who is logged in to operate correctly. In particular, how can LiveCycle know who has checked in/out a resource if the service always runs as system?
Your best bet is to restore the LiveCycle database - or at least the tb_sc_service_configuration table to be where it was before you ran the script.
If you need to remove security on individual services, you should do it through the admin console, but only do it for your processes. Never do it for systems services unless the Adobe documentation says it is OK.
As JeremyP pointed out, modifying the Adobe database directly is a bad idea. The database should be treated as a black box that is only manipulated by Adobe code (either by doing things in the Adobe tools or making calls to Adobe APIs).
You can either make security changes manually through the adminui (as he indicates, which is the most common way of doing it) or programatically using the Adobe client APIs. See the following links for sample code that uses the APIs:
Removing Security - http://help.adobe.com/en_US/livecycle/10.0/ProgramLC/WS624e3cba99b79e12e69a9941333732bac8-7f35.html
Setting the runAs user - http://help.adobe.com/en_US/livecycle/10.0/ProgramLC/WS624e3cba99b79e12e69a9941333732bac8-7f38.html
My company, 4Point, offers AEM Forms consulting services. We have an in-house Apache Ant library that wraps the code above to automate this (and other) common tasks that are typically required when deploying (and redeploying) AEM Forms solutions. It can be included as part of a consulting engagement.

QuickBooks connection using asp

May not be the best place to ask sorry if that's true.
I have worked on SQL and while I never worked on QuickBooks I am hoping it is possible to connect to it and just use it similar to a SQL Database. I am wondering I am wondering if it is possible to connect to QuickBooks using ASP. My purpose is to create simple forms and insert the data into QuickBooks similar to what is done on SQL.Occasionally I would just generate reports as well using web pages. All I am wondering is does ASP have the capability to connect to Quick Books and if so can I also run query's similar to SQL and is there any sources or reference available for research ? And what my options are for setting this up. If I have to use asp.net as a last resort that is fine too, though I would prefer to have to be without it.
Thank you
Update #1
While i am working on getting the Version of Quick-Books here is what information I have.
I plan on using ASP-Classic, and I want to develop web forms so this would be a website that can be accessed. This will not be a desktop application I plan on making but various webpage's where you can view Quick-books data, and insert records into Quick-books using forms, similar to what I do for SQL. And the Version of our Quick-Books is 2013 Enterprise Windows Desktop USA edition.
All I am wondering is does ASP have the capability to connect to Quick Books
Yes.
can I also run query's similar to SQL
Maybe.
QuickBooks itself does not provide an SQL-based interface. Communication with QuickBooks is via XML. However, QuickBooks Enterprise comes with something called QODBC which provides an ODBC interface to the XML interface QuickBooks provides, which might get you what you need.
One problem you want to watch out for -- there are times when you won't be able to connect to QuickBooks. e.g. it is not an "always-on" solution like a typical SQL database is. If you're in single-user mode in QuickBooks, or someone closes QuickBooks, or someone is doing a QuickBooks backup, or someone is updating QuickBooks, then you won't be able to connect. You'll have to plan for this in your application.
A better solution might be to use the QuickBooks SDK (specifically the QuickBooks Web Connector). If you download and install the SDK there is example code included. The SDK install also includes about 600 pages of PDF documentation on topics which you are asking about.
Striking out the below stuff since you've provided more details now: But unfortunately you didn't provide anywhere near enough information for anyone to actually give you a decent answer.
How about providing some actual details so that people can actually help you? Like, maybe:
Is this QuickBooks ONLINE, or QuickBooks for WINDOWS, or QuickBooks for MAC? (they are three entirely separate products, with entirely separate sets of capabilities)
What version/year/edition/country of QuickBooks?
ASP classic or ASP.NET?
Is this a website you're connecting from, or is this a desktop application, or...?

Integrate Access report

How can I integrate Reports done in Microsoft Access in my WPF application?
You'll have to define a little bit more what you mean by integration.
You are talking about a desktop application like word or PowerPoint or in this case Access. You can certainly automate or use Access as a com object and have access reports output their results as RFT or likey even better as a PDF document. So, it not clear when you speak of integration is really much centered around how you going to prompt the user for those report paramters and ask the user for filtering etc. So, choices you have range from a simple nightly batch job that runs and creates a bunch of PDF files on the users desktop and then are copied to a server, or perhaps even FTP up to the server.
Perhaps you talking about something a little bit tighter here?
So I'm not really sure if your questions any different than how would you integrate some PDF documents, or PowerPoint presentation, or in this case some Access reports. They are all the same concept and your question not really different then asking how to do this with power point.
However keep in mind that for Access 2010, there is WEB based reporting now. Those web reports actually use behind the scene are fully built around SQL server reporting services. In this case, the data will reside on SharePoint, but the WEB report side of Access are WPF presentation compatible reports since they are web based and run using sql server reporting services (they are RDL reports).
On the other hand if you're not really using Access in this case. You might as well just use the web based SQL server reporting service then. So do keep in mind that the web based reports Access uses for access 2010 is/are based on SQL server reporting services and it's actually creating RDL compatible reports.
However if you're not talking about the web based edition of access available in for 2010, then you're back to any old desktop program like excel are word or PDF documents or in this case Access. So, there's nothing different here about any old desktop program in windows and Access is one of those programs (sans the new weeb stuff for 2010).
So, the approach (or shall I say challenge) to getting that data into your presentation layer is not really a specific question to access alone, but is really much like a asking how can you have the output of your PowerPoint presentation brought into WPF.
You likely be best to have the report's render its output as PDF, or perhaps the XPS document writer is a sutiable output. So, your code take it from that point onwards for printing or display. So if you have the means to display a PDF or XPS doc, now then this would be a possible road to go down.

Update a local/client Microsoft Access Database from a server (MS SQL Server2005)

I've got a website that runs on a shared hosting environment, using ASP.net 2.0 (C#) and MS SQL Server 2005. I've recently been asked if I can integrate my website with a piece of third party desktop software that uses the Access runtime as its database (transparent to the end user).
Primarily I want to be able to offer users of my website the option of exporting their data into the Access database on their local machine. The data schema's match sufficiently, the question is how to actually do this, and in the simplest way possible for the user.
Simply having a webpage update the local Access database isn't possible due to the obvious security restrictions. I've considered asking them to upload the Access database to the server, so I can migrate the data then allow them to download it again, however the competency of the users of this software is such that even locating the Access database, let alone uploading and downloading it from the website might be too complicated.
I've also considered if Adobe Air or Silverlight could help here, but don't know them well enough to know for sure. Similarly I'm assuming another exe could be written to perform this task that the user could simply download and run, however my experience is in web development, not program development, so this isn't a 100% certainty for me, or an ideal development option for me.
So, can this be done, and if so what technique can achieve this, with the stated aims being ease of use for the end user, followed by ease of development by someone with web development as their main skill. Many thanks!
You may find this answer of interest: Best way to stream files in ASP.NET
It is about transferring a file from the server. You could save Excel or CSV and use that to update Access.
Instead of trying to do this in a web page you might just expose some views from your sql server to some client specific logins.
Then within the Access application, allow them to tie to your sql server. You might even provide an access application for getting the data from your site and stuffing it in their local access database.
In my work we have done something similar that is transparent to the user by creating an ActiveX control. The problem is that you are limiting the users to use only Internet Explorer.
I think that the best way to achieve what you are trying to do is by installing a service in the client's computer. If creating a service is beyond your experience you can post a project in a place like oDesk and find somebody that can help you with the development for the money that you are willing to pay to complete your project.
Good Luck.

Resources