I am getting the error template not found on some other email template although the template is present in sfdc - visualforce

I am using a visualforce template using cross objects via apex class as of now. My code was working and sending emails when I was using a custom template with classic letterhead. Send Test and Verify button is still working.

template's id is valid in this org? Template is marked "in development" or "deployed"? Template's body compiles ok? Maybe you removed a field or relationship and it's not valid anymore (although I'd expect the "send test" to fail then too) Template is yours or from managed package? You might not have license?
Can you paste sample of your apex code?

Related

Customize the AWS Cognito hosted UI confirmForgotPassword page

Currently via the provided flow the template responds with text in the following manner:
We have sent a password reset code by email to j***#t***.com. Enter it
below to reset your password.
Is there a way to update and or add to this copy?
Where do I even look to find this template?
context:
Vue Nuxt app with nuxt auth scheme oath2, authorization_endpoint via AWS Cognito
.../confirmForgotPassword?response_type=token&client_id=XXXXXX&redirect_uri=XXX ect...
As always any help and direction is appreciated so thanks in advance!
Okay so I found a way. It's a little hacky, but it gets the job done.
Within the hosted css add an ::after to the text span and place the new copy within that rule. Caveat, this is only an addition of text vs changing the existing provided copy.
The update flow is outlined here:
https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/set-ui-customization.html
#div-forgot-password-msg span::after {
content: " additional text that will be displayed at the end of the existing copy."
}
The way to do this is with a Cognito Custom Message Lambda. In Cognito you specify a trigger to call a custom lambda script. In the lambda script you receive an event object, which you can edit and set your own message. You then return the event object from the lambda and thats it. An example script it provided in the link.

Error Adding a Switch Mediator inside a Proxy Service in WSO2 Developer Studio

I'm trying to do a simple Proxy Service using the Developer Studio tool from the open-source SOA middleware provider WSO2.
When I drag into the flow a Switch Mediator in the graphical view there is no problem but when I changed to the text view, I'm facing the following error:
Cannot update source view. The following error(s) have been detected
Reason: XPathFactoty#newInstance() failed to create an XPathFactoty for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactotyConfigurationException: javax.xml.xpath.XPathFactotyConfigurationException: java.util.ServiceConfigurationError javax.xml.xpath.XPathFactoty: bundleresource://1013.fwk317983781:21/META-INF/services/javax.xml.xpath.XPathFa ctory:2: Illegal configuration-file syntax
And the XML is empty, so I can't to add any Switch Mediator and get it working with the WSO2 DS.
This is happening with the 3.5.0 and 3.6.0 version of the tool, and I even try one of the sample in the website but with the same result.
Anyone have any reason why this error is happening?
Thank you!
Each switch element needs to have an attribute called 'source'. This is the Xpath attribute that is checked against the criteria in each case. To add the 'source' attribute, type the Xpath and then click 'update' or 'save'. With that required attribute, a valid xml configuration file may be created and viewed as text.
Here is more documentation on the switch mediator: https://docs.wso2.org/display/ESB481/Switch+Mediator

Magento API not working with wsdl.exe but works with Soap UI

I'm trying to integrate Magento 1.7 with a C# application.
When I tried to use the "Add Service Reference" function in Visual Studio, it finds the service and all the operations but when I click OK, it doesn't generate anything. i.e. the Reference.cs file is almost empty (only has one line with namespace).
I tried using wsdl.exe to generate the proxy in command prompt and I got the following error:
R2718: A wsdl:binding in a DESCRIPTION MUST have the same set of wsdl:operations as the wsdl:portType to which it refers.
- Operation 'catalogProductAttributeRemove' on portType 'Mage_Api_Model_Server_Wsi_HandlerPortType' from namespace 'urn:Magento' has no matching binding.
For more details on the WS-I Basic Profile v1.1, see the specification
at http://www.ws-i.org/Profiles/BasicProfile-1.1.html.
Error: Unable to import binding 'Mage_Api_Model_Server_Wsi_HandlerBinding' from namespace 'urn:Magento'.
- The operation 'catalogProductAttributeRemove' on portType 'Mage_Api_Model_Server_Wsi_HandlerPortType' from namespace 'urn:Magento' had the following syntax
error: The operation has no matching binding. Check if the operation, input and output names in the Binding section match with the corresponding names in the PortType section.
I then tried using Soap UI to load the same wsdl and it works fine. The proxy was generated and I can make calls without any problems.
The original wsdl file is here: https://gist.github.com/4514723
except I have replaced line 6297 with an example url.
So my questsion is why was Soap UI able to generate the proxies and making calls without any problems but Visual Studio can't? How can I fix it?
See Generate a Web Service Client in WS-I compliance mode .
You will need to modify your Magento code to correct the WS-I compliant WSDL definition in app\code\core\Mage\Catalog\etc\wsi.xml.
The SOAP UI is probably more tolerant of mistakes in WSDLs compared to other .NET/Java tooling.

Creating an email using templates and then attaching dynamic attachments

I have been trying to write some custom workflows for our org but I am stuck on a particular issue. I know how to create attachments and link them to a new email, but I want to do the same with templates? I understand how to use the SendEmailFromTemplateRequest class, but I haven't found a way to link attachments to it. I found this article
but I need more detail on how to use the InstantiateTemplateRequest. I've tried to tinker with it using this as a guide but so far I've not had luck.
My needs are that I need to create an email from a template and then attach files to it that are dynamically generated.
I found what I needed here, but I noticed that I still needed to Create the email object using the IOrganizationService helper. Basically I created the InstantiateTemplateRequest, thend passed it into the IOrganizationService Execute() function and then retrieved the Email object from the InstantiateTemplateResponse object. After I had the Email I then edited and passed it into the IOrganizationService Create() function. After that I sent it along using a SendEmailRequest object which also needs a IOrganizationService Execute() call.
I am not very sure about how you are actually going to use the templates. But one work around could be that you can send the email in the same way you send with attachments. Create some logic to get the string content of the template, perform string handling operations as per requirement(Usually there are only a few fields in template that are to be modified and most of the text remains same). Now pass this string to the body of the email as string. I dont think there should be any trouble in this. Please correct me if I am missing some thing or misunderstood the complete question.

Grails Validation Errors - Developer vs User

What is the best way to convert the developer-oriented validation error list you receive from calling validate() on a Grails domain object into user-oriented error messages?
Example:
Property [email] of class [class testproj.AuthUser] with value [x] is not a valid e-mail address
would rather have it read:
Email given is not a valid e-mail address
Is there anything built-in that already does this?
the messages.properties files in grails-app/i18n
check out this documentation
http://grails.org/doc/latest/guide/7.%20Validation.html
To get all the error codes, look here http://grails.org/doc/latest/ref/Constraints/email.html. Enable the quick nav on the right. At the bottom of every constraint is the properties key that you use to change the error message.
There is also a nice plugin called:
grails install-plugin i18n-templates
which can be found here http://www.grails.org/plugin/i18n-templates
e.g. you have a Domain class in 'org.example.User' and you want to specify the localization messages. Use the following command:
grails generate-i18n-messages org.example.User
This will generate a list of possible messages for you in the console.
Copy and paste this output into your messages.properties for the English language and in every other message.properties for the language you want to have localizations.
Then you just have to edit these property-files in order to have your page localized.
Eclipse/STS has a nice GUI, which makes localization of these property-files even faster.
Greetings,
Jan

Resources