How save any apex class code when i write in developer console? - salesforce

I am writing apex class in developer console but it cannot save in my
salesforce account help me in this regard

There is a Save Option in the File Menu. It is also bound to the keyboard short cut CTRL+S.

If you open a new file it asks for class name and automatically saves to your org.
File-->New-->Apex Class
Regards,
Naveen
autorabit

Related

Apex Class Editing - Class name is already in use or has been previously used

I am learning Salesforce and am working on the following Trailhead unit:
https://trailhead.salesforce.com/content/learn/modules/identity_external/identity_external_social?trail_id=identity
(Setting up a social sign on for the sandbox environment)
I make an authenicated provider (google) by going to setup -> auth -> auth providers
For the registration handle I click 'Let salesforce create an automatic registration handler'
I then go to setup -> find-> apex classes, find the newly created apex class. I delete the code that is in the apex class and insert the code that is available here:
https://github.com/salesforceidentity/IdentityTrail-Module3/blob/master/Module3RegistrationHandler.cls
According to trailhead, the code should be active, and the social sign on for google should now work. However, when I go to save it, I get the following message:
" Error: Class name is already in use or has been previously used "
So, how do I save my edits to Apex?
What is this error and why am I getting it?
I'm assuming then that when edit the text inside an apex class, and go to save, that it's not over-writing the current apex class; rather, that it's trying to make a separate instance of the same class with the same name, and is throwing an error. I would appreciate any assistance on to how I can successfully edit this APEX class!
Ok - so I checked, and it looks like when I had previously saved one of these apex classes, the class name in the code is module3registrationhandler and it auto created another class in the drop down list. so when I tried again to save it from the autocreatedhandler, it said that you had previously done this. Error found. Salesforce rejects duplicates.

Implement AutoSave feature in Salesforce

I want to implement Auto Save feature in the comment tab of Case in Salesforce.
That means, whenever a user is writing a comment in any case, rather than clicking on the Save button, it should automatically get save after every 10 seconds for example.
How can this be achieved? I am extremely new to Salesforce.
Have attached a sample screenshot below.
Thanks!

how to change settings without app.config devexpress?

I need app.config automatically database informations setting according to a user control ..
Normally, we are setting up database informations in app.config. But when standart users run this program, it must login database setting on a interface . so, they should enter their database informations . not in app.config.
how should I do this?
if you are using visual studio for Windows Form Application then you can create Settings to store your different type of values in it. You can write and read settings programmatically like this.
//To Write
Properties.Settings.Default.DatabaseName = textBox1.Text;
Properties.Settings.Default.Save();
//To Read
textBox1.Text = Properties.Settings.Default.DatabaseName;
You can find article about User's Settings on MSDN
Edited
Full Example given here:
http://www.c-sharpcorner.com/UploadFile/5089e0/create-single-connection-string-for-all-windows-form-in-net/
If you are developing using DevExpress XAF, you can display a standard Windows form just before the application startup. Technically, this form can be invoked via the ShowDialog method before the winApplication.Setup() call in the Main routine (of course, the invocation must be done only if no user settings are saved yet). Once you display this dialog and gather user input, update the winApplication.ConnectionString property accordingly (see also).
Another more complex solution is to embed this database settings UI into the logon form as described at https://www.devexpress.com/Support/Center/Example/Details/E1344.
Do not hesitate to contact the DevExpress support team if you want to further discuss the implementation of this task.

ExtJS 3 export textarea content to a text file

I need to export the contents of an ExtJS TextArea to a text file. I searched around the documentation but I didn't find anything related to a textarea. Is this possible?
It would be also ideal to prepare the filename as well together with the ability to export the textarea content to the file.
Help is appreciated.
Thanks
You can't just save something from JS file into any place on user's local computer file system. It's huge security hole and it's just doesn't work this way. You have couple options however:
Send this information to your server and provide user with a link to a file. User clicks that link server will respond with the information - browser saves that data. You can even make so content will automatically be downloaded by the browser (well, by most of them anyway)
Or you can ask user to right click and copy this information into the clipboard.

How to auto generate a webpage after user submits form

I am looking for some initial direction on this one because I cannot seem to find my way with it. Let me explain...
I am developing a website wherein a logged in site member (Joomla 1.6) can fill out a simple form and attach a pdf to be uploaded upon submission. The user then clicks the submit button and the page will refresh to a new and unique web page.
User Submits data on http://www.examplesite.com and then after submission a new web page is generated that is called http://www.examplesite.com/userSubmittedValue
This newly generated web page would come from a template that is specified by the administrator and, most important, it will display all of the information that the user submitted. Also, there would be a link to download the pdf they uploaded. The user could then view a list of all the pages they have created in this manner via their profile.
I have seen this all over, but I am at a loss for how to generate this. Any help is much appreciated.
This is not something you will be able to easily do or get a detailed answer for here. If you just wanted to do the submission form with a thank you page that shows the data submitted you could use any number of form wizard type extensions - http://extensions.joomla.org/extensions/contacts-and-feedback/forms
If you just needed a way for users to upload PDfs and have access to them you could use one of the file management extensions that offer front end upload features - http://extensions.joomla.org/extensions/directory-a-documentation/downloads
If the additional data that is being submitted is simply data related to the file - title, description, etc then one of the file download components should work fine for you. The choices are limited in 1.6 at this time though so you might have to go with 1.5 to get the extension that works best for your needs.
So this probably isn't the best way to do it if your using Joomla but it just might help.
I would use PHP and inside of you're directory have a file like "template.html". Then I would create some php to handle the task of....
Opening "template.html"
Finding and replacing the values that the user passed you
Save the "template.html" under a new name (userSubmittedValue.html)
Again, I never really use Joomla. If you were to try this I'd suggest checking out php's file system functions (http://us2.php.net/manual/en/ref.filesystem.php).
Hope this helps a bit.

Resources