Drupal Entity Registration module - List of deleted registrations - drupal

I have events (sport trainings), created manually. Users can register for that events with Entity Registration module.
What I need is a list of deleted registrations. I can create a rule "after deleting a registration create a new entity" with a date field (when registration was deleted) and a field contains user. But problem is... I don't know, how to store name of that related event.
Is there a way to store a name or date of related event, when registration was deleted? How can I do it?

It has been a while since I have messed with entity registration, but if I am not mistaken, isn't there a registration state option?
This may be a bit of a workaround, but could you disable the ability for users to delete a registration outright, but allow them to change the state of their registration to a state called "Deleted"? That way you would still have the registration and still have all of the data associated with it.
For a more streamlined method, you could add a button or something that runs an action that changes that user's registration to state "Deleted" but no button to change it back, so they cannot un-delete (assuming you don't want them to be able to un-delete).

Related

How to fill fields in Zoho CRM automaticly

I have this situation:
I have custom button in Zoho CRM where I want to create new Account. When I click the button, it opens page of my Zoho Creator Form, then I fill in this form and click submit. What I want to acomplish is that when I submit the form, I want some information from that form to be filled in CRM creation Account. I was thinking about using url. For example in Zoho Creator If I extend base url of my Form and finish url by e.g.?text_field=abcd when I go to that URL, the field "text_field" is filled with "abcd", but when I try to use the same mechanism, it wont work on CRM. is there any workaround?
In CRM, there is no option to fillup data on load. on the success you can write a function or using feild update you do that.
Create a function that would get called on your form submission.
Extract the values from your creator form, then do
Zoho.crm.createRecord() if you want to create record or zoho.crm.updaterecord, with update record you'll have to provide a record ID.
If you only want to create a record its pretty straightforward, read about zoho.crm.createRecord()
To answer your question it is not possible to achieve the same functionality in CRM. Although what you can try to do us use
create record using zoho.crm.createRecord
On successful creation redirect to CRM Accounts Edit page.(using /edit it depends on your CRM and the layout id's )
record is created first and than user has prefilled information
If user wants to add extra information than they can add and save the record

Does updating a user property in Firebase Analytics update the user property value against events sent prior to the update?

We're using Firebase Analytics for an app, and looking to add user properties to the event tracking we’re currently using. However, we were considering using user properties for values which can change during the session—a user could have multiple 'profiles' in the app, and switch between them in the course of a session, which would means that we'd want certain properties to apply only to actions done when the user was logged into a particular 'profile'. Were we to set a user property to one value on user login, then update it after the user switched 'profile', would the new user property value be retrospectively applied to all previously-gathered event values, or would the values be associated with whatever the user property value was at the time the events were sent?
I assume you are asking in context of BigQuery (and UI should follow BigQuery 'way of thinking') If you take a look at BigQuery export schema then you can see that every event has associated user properties. After user does something, their event is persisted with associated user property at the time. After you change user property, new events will have new user property associated, but old events will still have old user property. User property is not retroactively updated in old events.

Persist selected values of control(s) from the Layout file across the MVC application

I have a Layout page which sets up the list of Projects in the application using Telerik's ComboBox as shown. The combobox allows user to select a project he/she wants to work on.
Once a selection is made, I want all subsequent actions in the application should correspond to the selected Project. I can preserve the Project information in a Session but then if user chooses to open this in a new tab and in 2nd tab users switches to a different Project and comes back to the first tab and refreshes the page then the session information (Project) would have changed which will create issues in my application.
So, what is the best way for me to persist Project information of the Layout.cshtml controls so that I can use it in my application such that every page that is rendered uses the currently/correctly selected values.
Tempdata / QueryStrings came to my mind but i don't know whether they will be reasonable solution to my problem. If yes, then how should I use them generically (specially querystrings) without complicating my solution?
localStroage and sessionStorage also seems like relevant solutions but then how do I use them in scenario where user opens a new tab from existing page? How will the Project # will persist on the newly opened page/window/tab?
something like this is achievable, if you make sure the url changes when a selection is made.
So let's say you select project C-1379 in your dropdown box, at that point your url could become http://localhost:58692/pid=C-1379.
from now onwards, your page can load the desired data, retrieving its required information from the query string. Do not use session or localstorage or anything like that as it won't work.
This way, you can still load your list of projects in your layout page, and you can select one based on the query string value and then load some default values via api calls to the back end.
If all your work from now on is done based on api calls, for example, you have some properties that you change and then you issue a POST to update said details then this is very easily done as well.
telerik controls usually have some events associated with them. the one you are using should have an onChange or something like that. This where where you would update the query string with the value of the project selected and then you can proceed to do what you need
I can preserve the Project information in a Session but then if user
chooses to open this in a new tab and in 2nd tab users switches to a
different Project and comes back to the first tab and refreshes the
page then the session information (Project) would have changed which
will create issues in my application.
I would have thought this is the desired behavior... take stackoverflow.com as an example, if I change my username in one browser-tab, I would expect my username to be updated in other browser-tabs as well... and that's what happens if I refresh my other tab.
There is no built in solution for maintaining user info in different browser tabs separately... the only way to achieve this, is by sending project name back and forth in the URL... but then you would loose this info if user changes the URL... In my opinion, this is an ad hoc solution and does not worth the effort of development, because it's a very uncommon scenario.
Getting to your options:
Storing user info is a very typical use case for session variable.
TempData is stored in Session by default. Though you can write
your own custom TempDataProvider and store it somewhere else (e.g.
database, cookie, etc). See Brok Allen's Cookie TempDataProvider
as an example. One advantage of using Cookie is that you send your
session variable back and forth with the request so you don't need to
worry about Sticky Sessions.
You can of course use a permanent storage, such as DB/Disk.
If the project name is not a sensitive info then I don't see any issue in passing it in Query String.

Cannot filter a view based on the field value

Drupal 7
Problem statement: Cannot filter a view based on the field value
I have a content type called support ticket
It has a field called assigned-to which has the list of users to whom the ticket will be assigned
I created a view for support ticket content
I have added a contextual filter Content: Assigned to, configured display based on “User ID from logged-in user”
Works fine for admin but not for other users
Can anyone please help me resolve this
The setting you're using in the view are perfectly fine. Couple of checks that you could do:
Make sure that the field assinged-to is a user reference field or an entity reference field reffering to the user entity.
Make sure there is value in the assigned-to field in some nodes for the current user you're logging in as.

How can I use current user (default membership) as a data field in DetailsView?

I am new to asp.net. I have a details view control on my page. I use linq to sql. My details view is an admin panel for data entry page. So some members will enter some news to my database. I want to use "Writer" Data Field to be filled automaticly with the current logged user. How can I do that?
Thanks
You will simply need to inject the username into the field at some point.
There is not a point-n-click drag-n-drop solution to this case, and there are many ways to accomplish this and to go into further detail is likely not necessary.
Just get the value into the textbox or field as the page is served where L2S can pick it up on the postback.

Resources