Moving Reports in Salesforce using Force.com IDE - ide

I'm trying to mass move reports to different folders in salesforce using the Force.com IDE.
I've followed the instructions provided by SarathPM here:
http://success.salesforce.com/questionDetail?qId=a1X30000000IEOSEA4
I update my package.xml, move the corresponding files and then try to save to server.
However, I keep getting the following errors:
When deploying:
Save error: DeveloperName: This Report Unique Name already exists or has been previously used. Please choose a different name.
When saving to server:
Unable to save resource 'All_Leads.report' to server: IllegalArgumentException: Project and/or project package list cannot be null.
There must be a way to move reports in salesforce other than manually saving each report to a different folder. Thanks in advance.
EDIT:
I did a fresh checkout of the reports folder only.
package.xml before
<members>SampleConsultingDashboardReports</members>
<members>SampleConsultingDashboardReports/AvgEngagementLengthByPracticeArea</members
<members>Utility_Reports</members>
<members>Utility_Reports/X10_reports_Account_activities_last_7d</members>
package.xml after
<members>SampleConsultingDashboardReports</members>
<members>Utility_Reports</members>
<members>Utility_Reports/AvgEngagementLengthByPracticeArea</members>
<members>Utility_Reports/X10_reports_Account_activities_last_7d</members>
Save package.xml, move AvgEngagementLengthByPracticeArea.report to Utility_Reports. Refresh in Eclipse, I see the changes. I try to "Save to Server" and it tells me the "Project is not synchronized with the associated Salesforce organization." I bypass the message and try to save anyway, which is when the "Unable to save resource 'Utility Reports' to server" message shows up.
I tried Synchronizing everything with the server before making any changes. Still get the same error messages.

I can confirm that the method described by Sarath, when followed exactly, works. You'll need a more specific repro scenario. I'd suggest trying to move just a single report. Just to be clear, the steps are:
download a fresh copy of your reports metadata via Eclipse
manually edit the package.xml to change the folder of a report. (I think you need to make sure the folder exists on the server, and that you are referring to the developer name of it, e.g. Folder_A/My_report)
in the underlying file system, move that report to a folder of that name
in Eclipse, do a project refresh from the local file system (NOT the server)
in Eclipse, do a save to server
the report should move
If this also does not work, post your package.xml before and after, and the exact steps you followed.

Related

How do I fix Directus error code 3 when downloading stored files

I can store files to the specified storage location via the GUI. I can see the files are in the storage location.
When I try to download them using the GUI, I get this every time.
{"error":{"code":3,"message":"Unauthorized request","class":"Directus\\Exception\\UnauthorizedException","file":"\/var\/www\/directus\/src\/helpers\/app.php","line":287}}
When I try the links from the File library, I get the same error.
I found some old topics concerning a "_" project. I do not see any "_" entries in my project.php configuration.
Everyone has read permissions for the storage directory.
The rest of the system appears to run without error.
check the folder in the server and what is been set, the default should be, like
So then if you want to access the 300x300 the URL should be like:
domain.com/public/uploads/Directus/generated/w300,h300,fcrop,q80/file-name.jpg

Deleted VS Form Designer

I got this problem in visual studio project were i was able to clicked the FILE menu and Clicked "Save as 'FormDesigner'" to a separate folder expecting that i would be able to save the whole project to separate folder as backup file. But i was wrong about it. And then i permanently deleted the file. When i run my project this errors appears:
Unable to open module file
'D:SISBackup\StudentEnrollment.designer.vb': The system cannot find
the file specified.
Unable open module file
'D:SISBackup\StudentEnrollment.vb': The system cannot find the file
specified
But luckily the form still run the code. But i can no longer open the Form from Solution explorer. This error always appear from it:
Cannot find the file 'D:SISBackup\StudentEnrollment.vb'. It may have
been moved or deleted.
Can anybody help me with my problem. PLEASE i don't know what to do anymore. It's my school requirement. Please help me with this.
HELP!

How to overwrite Files for Update Procedure

I'm trying to create an updater for my app in VB.NET, No, I do not want to use clickonce, it sucks because I have to deal with managing self signed certs etc.
I know the code to check for new update files:
http://pastebin.com/ZjYBWABu
I also know the code for specifying where those files download to, the issue is I dont want to just download 1 .exe...I want to download all the latest build files which I would have uploaded to my server, which i would have taken from my Bin\release folder of my project.
Then when the updater downloads the files to a directory, it would go to the directory of the application, and somehow overwrite/replace all the files that have changed...maybe by using a hash or something?
I do not know how to proceed with this. What I do know is this.
The updater and the main app would have to be separate so that the updater could do the replacing while the app is closed so it doesn't get file in use errors. After the updater app has finished it would then start up the main app from the new exe.
Would appreciate help here thank you guys.
I am currently working on a project for which I have to implement a similar approach for updates. The project is lengthy, it would take some time to finish. But this is how I have planned to apply the updates:
There will be two main parts of the application Launcher (main application program) and Updater (To download files from server and replace them with the new ones and then launch the new file)
The application will have the option to manually check for update and also to check for update on startup.
If an update is available, it asks the user to apply the update now or later.
If the user selects to apply the update now then Updater application is executed in a separate process and then Launcher application is closed from within the code in Launcher. I have following approaches in my mind to launch another program from within first one and then exit:
Execute the Updater directly from within the Launcher using Process.Start
If that causes problem then as second approach launch command prompt from Process.Start, execute another program (Updater) from command prompt, close the command prompt and then exit the Launcher.
The Updater application then downloads all the relevant files from the server and upon completion old application files are replaced with the new ones.
Update availability information from server will include the new Version_No of application. For the purpose of providing all files for update, I will compress (zip) all of them in a single file named as Application.Version_No (as given by the server).
Upon download completion decompress (unzip) them to a folder named as the same Application.Version_No.
After decompressing all the files in this (Application.Version_No) folder will be copied to the Bin folder of application.
The new application Launcher file is executed in a separate process and Updater application is closed from within the code in Updater.
I have NOT yet tried this scenario as currently my focus is on completing the main application, but surely this must work.
UPDATE:
Another approach to check for updates is to use a bootstrap like application startup. It will be the main entry point of the program. Upon execution it will check for the updates and if there is none the Launcher is executed otherwise it will download the files, replace the old ones and then execute the new / updated Launcher.
For copying / overriding the files
One approach is to include only those files in the compressed (zip) file which are required to be replaced with the old ones and then after the download completes, either directly decompress them to the Bin folder or decompress them to a designated folder and then copy all of them to the Bin folder.
As another approach which seems somewhat lengthy, an additional helper file (XML, text or any other format) could be prepared for the download.
This helper file contains information of updated files like version number of each file, location where these are to be copied etc.
The files may be downloaded to a specific folder named as the new application version.
After downloading all the required files to a specific folder process each file mentioned in the helper file. Compare version of every old file with the new downloaded file. If it is latest then replace it in the folder mentioned in the helper file.
As another step in between all the downloads may be verified prior to copying and replacing.
Built an updater that ships with a daemon. Main project here:
https://github.com/UVLabs/dotNetUpdatify
There should be a way to eliminate the use of the daemon, if i figure it out i will update.

How do I share IntelliJ Run/Debug configurations between projects?

I have many different versions of my app. Each one is a separate IntelliJ project. Every time I open a new one, the list of configurations starts blank:
The annoying thing about this is I deploy to 1 VM and I have to copy and paste the debug configurations each time I want to test a different version. IntelliJ makes this dialog modal per IntelliJ Instance, so I can't copy and paste the fields between Project Instances.
I end up taking a screenshot of one configuration and copying the fields by hand into the other project. It's a pretty primitive solution. Is there a more convenient way to get a run configuration from one project to another?
I'm using IntelliJ 13 on Windows 7.
Can I share settings for IntelliJ Idea across different projects? may have the answer to this, but the question is different. It's about window layout. Therefore I don't consider it a duplicate.
The best way to do this is to click the "share" checkmark next to Name field when you edit/create the configuration. You can get to this Dialog with Run > Edit Configurations.
The share check-mark pulls the setting out of your workspace.xml and instead puts it in the directory .idea\runConfigurations. This is designed so you can share the setting with others.
You could copy this file and put it in the same location in all your idea projects.
However, in the future, you might want to consider using source control branches for app versions rather than separate projects. IntelliJ handles these very well.
UPDATE (June 2021):
IntelliJ now puts this in the .run folder as its own file, no longer in .idea/runConfigurations.
Run configurations are stored in .idea/workspace.xml by default. First alternative is to share this file but it is not feasible because you also share a lot of unnecessary configurations.
As already said, the first step is to check "share" option to separate run configurations from workspace.xml.
After that, I recommend adding runConfigurations to source control. But the main problem is, probably you have already marked .idea folder as ignored.
You can unignore the folder by configuring your source control system. For example, if you are using git, you can change .gitignore file as follows:
.idea/*
!/.idea/runConfigurations
don't forget adding * after .idea/
As the last step, add your run configurations to source control and enjoy your shared configurations!
goto
Run > Edit Configuration > create or select existing configuration you want to use > click save and persist it on file system > click on share check mark
now copy this file from
PROJECT_ROOT_DIRECTORY/.idea/runConfigurations/ConfigurationName.xml
to your NEW_PROJECT_ROOT_DIRECTORY/.idea/runConfigurations at the same place and it is available now to your run configuration
You should copy the folder
~/your-old-project/.idea/runConfigurations
to
~/your-new-project/.idea/
That's the folder that contains the run configurations.
An update for this question with the new IntelliJ updates:
Now you can "Store as project file" which will create a folder named ".run" and export your setting to that folder. In the example below, I did it for all my test settings. This removes the requirement of editing .gitignore since files are now not outside of ./idea
This is not exactly an answer to your question but it answers a question similar to your question and one that I had, and I'm assuming others might as well.
That is, How to save unit and instrumentation test run configurations? I usually right-click on the test directory which brings up a menu with the option to Run whatever is in that directory. AndroidStudio then creates a run configuration on the fly and in the Run Configuration drop-down menu a new option will appear, "Save new configuration?" or something similar.
Clicking that option brings up the Run Configuration menu and at that point I check the Share box as many others have already mentioned. This then will prompt the version control system to ask me if I want to add this new run configuration file. If you haven't registered your version control system you can find the new files under .idea/runConfigurations.

SQL Developer source control option

I have switched from Toad to Sql Developer and was just looking for certain features in SQL developer which I really found beneficial in Toad.
It had a team coding viewer option which is nice to keep a check on the source codes and versioning, though it had nothing to do with subversion.
Do we have any such feature in SQL developer. How can we manage team coding in SQL developer?
Thanks a lot.
SQL Developer allows the source code control feature which can full fill your requirements, here are the steps:
1. First connect to oracle database(using sql developer) by providing following info:
username, password, hostname, port(1521 by default), sid (orcl by default)
2. Create a repository:
versioning>create local repository>give local folder for the repository path and also provide connection name that you have created in sql developer application.
Next, expand the subversion node in the versioning navigator.
Next, right click on connection and choose new remote directory and provide sql files then click on Ok.
3. Import the files to be versioned:
In the files navigator, select the directory where you unzipped the files from the prerequisites under the files tab.
Next, versioning > import files
4. veiw the files which you want to be versioned:
view> files> choose the file for inside the navigator> then click on Next.
Now, confirm that connection name is mapped to the local directory and select the node sql files, then click on Next.
Click Browse and select the directory where you unzipped the files from the Prerequisites as the source directory, then click Next.
in the filter page, click next.
In the Options page, deselect the Perform Checkout check box and click Next.
Review the options for the Import operation and click Finish.
In the Versioning Navigator, expand hr_orcl > SQLFiles.
Please follow the link for the details along with the pictorial reference: http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/prod/appdev/sqldev/srccodexmlext/srccode_otn.htm
Thanks.
There are commercial options such as Red Gate's Source Control For Oracle if your employer is willing to stump up some hard cash (and it is well worth the money IMO). But failing that, I've found another guide which is for SQL Developer 3 - it's probably not that different to Suresh's but it is specifically for 3 which is the version you are more likely to be using so I'll include it here. The author seems to be anonymous, but kudos to them for writing it up. I haven't been able to find a guide for version 4 and I haven't used it yet so I can't say if it's changed much.
The essence of this guide is as follows. Note that I have omitted anything relating to setting up an SVN repo as that information is easily available elsewhere.
Integrating SQL developer with SVN
In sql developer, choose, View > Team > Version Navigator
In Version Navigator, right click on Subversion, and select New Repository Connection and Provide the following details:
Repository URL -> http://ipaddress/svn-repos/project-repos
Connection Name -> Any user defined name.
User Name -> User name of user who is allowed to login into the repository.
Password -> Password of the above user.
Click Test Read Access, to ensure that connection to repository was successful.
Adding Files to repository.
Initially the repository (project-repos) is empty. To add files to the repository follow the steps below.
Choose View > Files. Files tab will appear in Sql developer.
In the Files tab, expand My Computer and select the folder which contains the files to be added.
Choose Versioning > Import Files. Follow the six steps of the import files wizard, by selecting destination(svn repository), source (your hard disk files), filters, options.In step 5 of the wizard (options step), check the “Perform Checkout” check box.
Finally click Finish. All the files of the selected folder (step 2) will be imported to svn repository.
In the versioning Navigator, select the connection name for the repository and click the refresh button. All the files that you have added will appear with their version number in brackets.
Accessing the repository.
Now the repository has been created and files have been imported to repository, other users will need to access the repository.
Create the connection to repository as shown in section 1.
In Version Navigator,expanding the connection name will show all the files imported in Section 2.
Under the connection name select the folder containing the files.
Right click the folder and select Check-out.
Select the destination folder where you want the files to created on your hard drive.
Click ok.
Go to Files tab and click refresh.
Expand the tree and look for the folder the you selected in Step 5. This folder will now contain all the files that you have exported from the repository to your hard drive.
Making changes to files and committing changes to repository.
Any user can make changes to files (files that he has checked out (exported) from repository in section 3 or he has added to repository in section 2).
From the Files tab, go to the folder that you have imported/exported to/from the repository.
Select the file to modify,by double-clicking.
File will open in edit mode. Make the required changes and save it. After you save the file, an asterik(*) will appear near the name of file in Files tab.
Right click the file/folder that contains modified files, and choose Versioning > Commit.
In the dialog box, give your comments for the changes and click Ok. When the commit is successful, the version number of the file will increase by one. All the changes made are now saved in the repository and other users can take these changes as explained in next Section.
Updating changes from the repository.
If a file has been changed and committed by any other user, you can update your local file from the repository version of the file.
In the Files tab, select the file/folder to update.
Right click and choose Versioning > Update.
In the dialog box, choose required options and click ok. Now the file on your hard drive is in sync with the repository file.