Hybris Backoffice Action Validation Success and Error Messages - customization

Need help for custom backoffice extension to design an action class.
I need to create an action class for a backoffice wizard 'NEXT' button. When the NEXT button is clicked after filling in the details, these must be validated from the response of the REST API's and based on that the SUCCESS AND ERROR POPUP messages need to be displayed and also the data must be saved in the Database. Can any one please help me with the basic java code for this?

Related

How to customize a error message in sitecore 9 forms submit action(Not WFFM forms)

While implementing a custom login form , i need to show why login failed on submit action, for eg message like no such user ,invalid credentials etcc..in sitecore 9 forms there is a field to provide general error message for all errors...but i want to provide custom messages..is it possible?
Are you asking if you can have different error messages depending on which input failed?
I know there is a way to customize the error message for the submit action. Switch to the core database and navigate to /sitecore/client/Applications/FormsBuilder/Components/Layouts/Actions and select the submit action you want to add a custom message for. I believe the default message is "something went wrong".
I haven't had the need to try to implement multiple unique error messages, but there are subitems under each submit action with templates for the form mapping fields. You could check those templates for a similar field.
You could try to use the code as below to show your own custom error message.
formSubmitContext.Errors.Add("your error message");
formSubmitContext.Abort();

Skip Glympse wizard view iOS

I want to integrate Glympse in my application, but without the wizard view.
In detail:
After calling the sendTicket() method the application opens an URL which leads to the wizard view of Glympse. Here the user can apply the settings and finally send the Glympse.
To react on a successfully sent Glympse a listener can be added.
But I don't like the wizard view to pop up. I want a method which sends the whole Glympse, i.e. I don't want to "leave" my app.
Is there a possibility to do that?
In order to skip the wizard view, you'll need to use the Glympse Commercial SDK. See a comparison of the differences between that and the Lite SDK which you're currently using here: https://developer.glympse.com/sdk/comparison
Drop us a note using the form on the bottom of that page and we'll send you what you need!

Using Facebook Graph API Explorer to publish an action

Background
I'm creating a simple Facebook application, first time working with Facebook.
* Using an "Action Type" of "Read"
* Using an "Object Type" of "Article"
I can't submit the application because the Action Type shows an error "You, or this app's Open Graph Test User, must have published this action at least once."
Immediate question:
I'm trying to publish the Action using the Graph API Explorer so that I can then submit the app for review.
I tried a GET /me/news.reads which didn't generate an error but only returned a blank results {"data":[]}
Also when I go back to look at the Action Type, it still shows the same error about needing to publish.
I tried the same request as a POST which did give an error "The action you're trying to publish is invalid because it does not specify any reference objects. At least one of the following properties must be specified: article."
On another notes, a more generic GET request I tried /me?fields=posts,feed gets me the data I want in the Graph API Explorer, but what would I set as my Action Type and Object Type to use that request?
Any comments on the overall approach I'm using would also be welcome.
More background: The underlying goal of this is that we want our separate corporate website to pull in the latest post to the Wall on our Page.
Any help would be much appreciated. Thanks.

Sitecore ECM Engagement plan Custom action in "Message Opened" state

I need to update few information regarding the visitor when a visitor is in Message Opened state of Sitecore ECM standard engagement plan.
Therefore I need to create a custom action or something where I can push in my custom code to do the visitor data manipulation.
I tried doing it via creating a script and attaching it to a trigger and finally attaching the trigger to the state. but no luck unfortunately.
Is this task even possible or am I missing something ?
Thanks in Advance
The Message Opened state is forbidden to change. It is a kind of a system ECM state. You can customize only states of the green area (Productive, Unproductive, etc.).
However there is a way to do what you want.
The moment of message open is handled with the help of small image added at the bottom of a mail. Image source is an ASPX page. When a recipient downloads mail images, the ASPX page is requested.
You can customize the ASPX page requested by the image (add your code there).

How to create a facebook event on users behalf using javascript sdk

I'm trying to piece together information and different chunks of code scattered throughout the documentation on how to make this happen, since there aren't good examples.
I know I have to first get the create_event extended permission which I get with this code:
FB.login(function(response) {
// handle the response
}, {scope: 'create_event'})
;
I know that I also have to issue a HTTP POST request to 'PROFILE_ID/events' with the create_event permissions and the necessary parameters.
My problems are: 1. I don't know how to collect the create_event permission once it is given. If I run the code above, a dialog box will open asking for the permission but once I accept, only a blank page follows.
2. If everything works the way it supposed to with the permissions request and the post request, will my app see a create event page like I would if I were to create an event on my own from my profile? What interface gets seen from the app? Can I take a user from my app directly to the facebook create event page?
I don't know how to collect the create_event permission once it is given. If I run the code above, a dialog box will open asking for the permission but once I accept, only a blank page follows.
That’s how it works. Everything you want to show to the user after successful login, you have to implement yourself.
If everything works the way it supposed to with the permissions request and the post request, will my app see a create event page like I would if I were to create an event on my own from my profile? What interface gets seen from the app?
No “interface” at all – it’s up to you to build that.
Can I take a user from my app directly to the facebook create event page?
The user can go their by themselves. Why would the need your app for that?