Hide an activity on their feed on getStream.io? - getstream-io

There is a way in which personalisation can be achieved on GetStream.io. We have a use case where we want the user to hide a particular type of activity.

Related

Netsuite: customizing bulk process screen

I am wondering if there is a way to customize the salesorder manager form /app/accounting/transactions/salesordermanager.nl?type=fulfill&whence=
We need to add a custom field that is to be populate for the fulfillment (it is used during the one by one process, it is also needed during the bulk process)
Not sure if you can customize this page but for your use case, there is a Set Fields tab under the filters. You can choose your custom field in the tab then assign the value.

Use Case Diagram Show Submit or Empty Form

When creating a use case diagram, I want to show that a user can submit a form or empty all fields (or cancel the action)
Since both submitting the form (let's call it add user) and empty fields are related, how can I show this in a use-case diagram?
I was thinking of extending add user with empty fields, but as the extended use-case depends on the base use-case, is it correct to show something like this?
Don't make atomic actions use cases. The use case has to provide some business value.
What you're describing is a flow of a use case. Use case diagram documents list of use cases and relationship between them (and to actors), but not flows of the use cases.
To show show the action flow inside a UC you should create activity diagram. It'll show a possibility of clearing or submitting the form.

Marking a Form Element as Required Inside an EventSubscriber in symfony2

I have an entity with a member called 'mediaType', which tells me which of two other members to pull data from. When I'm building the form to create the entity, I have mediaType as a drop down and then two text fields for the other two members. What I want to do is force one or the other two fields to be required based on the mediaType selected (or neither, if the user select None. I'll handle hiding the fields with JS).
Since I'm manipulating the form after binding, I set up an EventSubscriber to listen on the PostBind event. My subscriber fires just fine, but I'm at a loss to figure out how to mark one of the fields as required. I can get the field, and I can check to see if it is required, but I just don't know how to make it required.
Is there a way to do this? Or is there a better way than using EventSubscriber?
You could use validations groups http://symfony.com/doc/current/book/forms.html#book-forms-validation-groups see "Groups based on Submitted Data"

How should I implement `OnLoad` event handler when creating an activity using a contact?

I've created my own solution with a custom entity of type activity. I'd like to show a message whenever a new instance of it is created using an existing contact but not allow the user to create one, if only attempting to do that without going via contact.
Basically, my aim is that it won't be impossible to just create that activity (the form will be hidden directly at any attempt except for one way only). The user will have to go to contacts (or leads etc.) and in there add and create an instance of the custom activity entity. That way, I can assure that the field "regarding" will be filled out already.
I'm guessing that I need to detect somehow that the opening of the form is a creation attempt. How can I do that?
Also, as it is now, the user can't create a contact-less activity of the custom type because it doesn't appear on the menu with other activities. I must have disabled it somehow but I have no idea how. Anybody who has one?
You could do this a bunch of ways but the easiest would probably be to:
Make the regarding field read only.
Make the regarding field mandatory.
That way if a user opens a create new form they wont be able to set the regarding and because its mandatory they wont be able to save the record. When they open via an existing contact the regarding field will be mapped automatically. That said in this case just making it mandatory my be enough.
(As a side JavaScript can be used to identify the current form state, but I'm not sure how useful that is here).
In terms of where custom activities appear, by default mine show in a number of locations, for example:
CRM > Workplace > Activities > Ribbon > Other Activities > XXX.
CRM > Workplace > Activities > View Selector > XXX.
They don't show under the left hand navigation of the workplace because they are grouped under 'Activities'. I'm pretty sure these are all the default settings.
You can exercise greater control by editing the sitemap, where you can put pretty much anything, anywhere.
In addition to Mr Wood, I'd like to show you some code. It works as supposed to but I'm not sure if it's optimal.
var foo = function () {
var whatIsGoingOn = Xrm.Page.ui.getFormType();
if (whatIsGoingOn === 1)
alert("Let there be an entity!");
else
alert("Not a creation...");
}
The other states' (deletion, update etc.) numeric values are listed here.
Answering the second part of your question:
When you create a custom activity you can choose whether to have it appear in 'normal' Activity menus or not by checking the box at the top right of the entity form. This is a once-only choice as far as I know and can't be changed later.
For your setup, I would suggest NOT checking this box, so it does not appear in the activity menus to avoid users even being tempted to do it that way.
Instead, add an explicit relationship to the activity N:1 to Contact, and another N:1 to Lead. Use this relationship to add your activity to the left navigation of Contact and Lead forms, or add a grid for them (depends on how you want to use this and if you need to filter the view to something other than the default "Associated View").
When a user navigates to this section they will see if any previous activities of this type exist, and be able to add a new one. BUT this means that the child record is a child via this relationship, not using "regarding", so use a script on the form for the activity so that if Contact is filled in, it is copied to Regarding, and if Lead is filled in then that is copied. If neither, then use an alert or other means to warn the use that something is wrong (see comment earlier). If you want Regarding to be read-only but filled in by script, you will need to make sure to use the force the value to be saved:
Xrm.Page.getAttribute("regardingobjectid").setSubmitMode("always");
You must have the lookups for Contact and Lead on the form to be able to use them in your scripts, but you can make them not "visible by default" so they are there but not seen by the user (and taking up no space).

With SharePoint/InfoPath: Is it possible to switch default views, and then save this setting with a button?

So lets say that I have two views, one that is the default and another that can be triggered with a button. Is it possible to switch views, then have the view that you switched to become the default view? So that if the form were opened again it would still be on the view you switched to?
If not, is there a way to have a part of a form read-only to a certain group in SharePoint and editable to another group?
Or even better, could I have an email sent out to with different views to different people?
Thanks!
No, it's not possible to set the default view with a button/code. You'd want use a different approach (something similar to the State Machine Pattern)
Create a "State" field, that represents the actual state of the form (usually the same as the views). So when the button is pressed, it sets the State-field to "View2" and switch the view to View2. In the form load rules (Data - Form Load) you create a new Rule that changes the view based on the value State-field.
Yes, setting different section of the form to read-only for specific groups is also possible, however it requires custom code. For each section create a new field (like "Section1Enabled"). Then create a new conditional formatting rule that disables Section1 if Section1Enabled is false. In your form's load event, you add code that that decides whether the current user is in the specific group or not and based on that, you set the value of Section1Enabled.
You can do with SharePoint's UserGroups.asmx or with the SharePoint Server Object Model (google should help you out with that).

Resources