How can we get name of email templates using API? - salesforce

How can we get name of email templates using API? Can anyone please guide?

Which API. Come on, put bit more effort in your question
You just need to run queries? Email templates are metadata, can be queried in EmailTemplate table.
SELECT Id, DeveloperName,FolderName,Name,NamespacePrefix FROM EmailTemplate
If you're using Metadata API (retrieving config, deploying classes etc) you need to explicitly list them in the package.xml. If you don't know the names - you can query like above or use listMetadata call. Example if you're using Ant migration tool: https://developer.salesforce.com/docs/atlas.en-us.daas.meta/daas/forcemigrationtool_listmetadata.htm (it'll work per folder)

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)

Framework Advice

I have a site that was done in CakePHP but I want to redevelop to give it a fresher feel.
The object of the site is to create a document the user can download or email to them. The user will select options from a drop down menus from data stored in the DB, the user is given many forms and options in about 5 steps, and the end product is a file (which I would like to be in word, pdf, txt...something the user will select).
The user will also have the option to select the look of their document from various layouts.
Main functionality required is the ability to spell check, create a preview, create a document in various formats.
Thanks for the advice!
By seeing your posted question, I would recommend angular 4 alongwith firebase. Checkout Firebase by Google Firebase will provide you the option to mail documents and show dbs etc. very well.

How to show audit data in the front end as timeline when user adds,modifies,deletes etc

Single Page Application which is developed in angular JS. I Just wanted to know the audit of the user activity in the front end timeline based on the users interaction with the database.
The database layer is done using HIBERNATE and controller layer with JERSEY Restful web-services. I wants to Audit the user operations on add,modify,delete etc in the UI while interacting with the hibernate.
I have gone through some posts , Some suggests JPA API for hibernate auditing, some suggests Spring DATA to achieve it. I Wanted the audit data to be shown up when user interacts with the system as well as arranging it in the back-end also.
Help me from the best architecture perceptive,flow or road-map to achieve it and also give me some learning tutorials.
Thanks in advance
Based on the assumption that by auditing you mean to be able track the change history that is made to entity rows at the database level, then yes Hibernate has an extension called Hibernate Envers that does this for you.
You can find documentation on Envers here
The jist is that you simply need to annotate your entities with #Audited either at the class level or on a per property level, supply a few configuration parameters at the time you construct either your EntityManagerFactory or SessionFactory and make sure you have the appropriate tables created in your database.
Once the revision tracking has started, you can then easily query for audit changes by using the org.hibernate.envers.AuditReader interface. See the documentation for how to obtain this.

Using a collection in the where clause in the salesforce command line data loader

I'm currently trying to backup the attachment files from old cases and emails in our Salesforce org through an automated process. I first tried to do this with the Bulk API but sadly this doesn't allow me to export the body column of attachments.
I did manage to pull this data out with the dataloader via command line (and the FileExporter tool). Now what I would like to do is export only those attachments that are attached to old emails or cases.
Is it possible to use a collection of ID's (preferable in a file) from those parent objects in the WHERE clause of the query in the beans file? If so, could somebody post an example?
Something along the lines of:
entry key="sfdc.extractionSOQL" value="SELECT Id, Body FROM Attachment WHERE id IN parentIdFile.csv"/>
Would be much appreciated!

Interfacing SugarCRM with OpenERP

I am currently working on a project whereby I have to make both openERP and SugarCRM talk to each other.
For example, if I add a new Account in SugarCRM, this account is also created in OpenERP...and if I create a new Customer in OpenERP, a new customer with same values is created in SugarCRM.
I've searched the net and I found a connector which allows this interfacing.
http://www.sugarforge.org/projects/sugar2openerp
This connector is not an easy thing to work with...I had to build a module inside SugarCRM for me to input connection details (url, username, password, etc ).
Now, I dont know how to proceed with the connector...the files contained in it mentioned "accounts_cstm"... should I create it or no?
Have you looked at the import_sugarcrm module (http://apps.openerp.com/addon/6970)?
I've never used it, but it is an certified OpenERP module, which means that it is officially supported by OpenERP SA, so you should be able to get support and post feature requests if necessary.
all table names ended with "_cstm" are the upgrade safe portion of the data you create in SugarCRM (_cstm for "custom"). For example if you add a new field to accounts, the original structure doesn't change. SugarCRM creates your new field in this table, and relates to the original accounts table thru id_c field.
I didn't test the module you are mentioning here, but if well constructed there wouldn't be need of creating such table.

Resources