Display the responses to the current form inside an embedded view - lotus-notes

I am trying to create a new Lotus Notes Database (classic, not using XPages) using the Domino designer which will be used to manage customers and orders.
As orders belong to customers, I implemented orders as responses to customers (this seems to be the only way to create a hierarchy).
Now, the form representing the customer should contain a view displaying all the orders which belong to the customer.
However, I don't know how to implement this view:
First, every embedded view based on a formula (I tried SELECT (Form = "Order")) creates an error message: "Unable to launch at this time".
Second, I have absolutely no idea how to restrict the result to responses to the current Form (in my case: Showing only the orders belonging to the current customer and not all orders in the database).

To embed the view in the 'customer form', open that form, place the cursor on the place you want the embedded view, and from the menu select: Create -> Embedded Element -> View...
Select the view you want to embed, and click 'Ok'.
Now, to show only orders for current customer, you will see in the Objects tree list 'Embedded View' with 2 option, select the second 'Show single category'. There you can specify with formula only the current customer. For example, to show entries only for the current logged user I would put:
#Name([CN]; #UserName)
Hopefully, this info will help solve the problem.

Related

Search with Customer Name in Customer ID field

In Sales Order screen the Customer filed allows to select the customer ID by typing customer name also, how we can add same functionality for Customer ID field in Customer screen. Please have a look at below screenshot for more reference. Any help really appreciated.
Sales Order screen screenshot # https://i.imgur.com/03UWk5A.png
As you mentioned this functionality is present on most screens when typing in the Customer ID field. However when working with a maintenance screen such as Customer maintenance the key field here IS customer ID. Or more accurately BAccountID. So the look up feature behaves a little differently. This is the same for vendors.
You have a couple options (probably more..)
Suggest to your users to type in the first few characters of the customer ID and click on the F3 key. This will show the select dialog box and jump directly to the first customer match. Even if the match is the Customer ID itself.
You could extend the Customer DAC, add a new unbound field with a PXSELECTOR attribute and write an event to fetch the selected customer and refresh the screen.
Option 2 is not encouraged because it could be confusing to your users and would introduce a quirky way of interacting with the screen. Also it might be a little tricky to code.

How do you limit the Leads viewable to an owner, role, or workgroup?

After opening record from the GI, I am still able to page to the next record that is not within the GI's scope. How can I limit this to a specific workgroup, role, or owner?
The row-level access screens do not have anything for CRM there, owners nor workgroups seems to limit who can see what... there must be a way to limit the leads viewable for a salesperson... how is this done?
With the Entry Point tab from the Generic Inquiry screen, you can match the selected inquiry to a data entry form. Once you have replaced the data entry form with this inquiry, when you try to click the name of the entry form in the navigation pane, you are redirected to the inquiry. If you select a record in the list, the data entry form opens and displays the details of the selected record. Also, if you create a new record from the inquiry, the entry form opens.
There is no mechanism to automatically match behavior of a data entry form with the associated inquiry. When you select a record in the inquiry list, the associated data entry form opens. The opened entry form is not aware of filter conditions set up for the inquiry. To limit access to records in the data entry form, you should create a custom data entry screen with filter conditions for primary view and Lead ID selector identical to those defined for the associated inquiry.

Want to create an column in Dynamic View Panel that displays "Favorites" icon

I am using a Dynamic View Panel and would like to create a "Favorites" column in the view. The underlying view has a "Favorites" multivalue names field that contains all users that have flagged the document as a favorite. What I would like to do is to handle this conversion in a "Customizer" bean where I can compare the current user with the stored vales in the "Favorites" column and see if they are in the list. If they are I would present a "Green Star" icon (not a standard Notes icon) else I would present an empty star icon. I would also like to make the star icon live so if you click on the star it would toggle the favorite value in the database on/off.
How do I implement such a feature?
What are the DominoViewCustomizer methods I need to override? (looking at afterCreateColumn)
How do I get and set the column values? (really lost here)
How do I get the column to display a Notes resource image (my stars) or do I need to store it in a directory on server?
How do I make the star icon clickable?
How do I capture that click event?
Using Domino v9.0.1
If you don't have to use a dynamic view panel here's a way of doing it that will work with a view panel, repeat, or data table...
Use a "favorites" document for each user. Have it contain one multi-value item to store the Note IDs of all the documents the user favorited.
When the user logs on read the contents of the multi-value field into a sessionScope variable. Then in your view column all you need to do is check if the NoteID of the current row is in your sessionScope variable and display the appropriate icon.
For the part when a user clicks on a star you would have an event handler on that column that does a lookup to the user's favorites document (create it if it doesn't exist) and add or remove the NoteID then do a partial refresh on the view.
You can probably still do this with a dynamic view panel but I can't speak to the particulars of it since I don't use it much.

checking if current user is author of the document

I have a formA where I have a field '_author' which is of type Authors/Computed for display with value (#Subset($Updatedby;1)). I display information from formA on viewA. What I want to achieve is that documents that are created by you are only visible to yourself on viewA. I tried the following formula in viewA 'View Selection':
SELECT (form = "formA" & #UserName =_author). Even though I know that these two variables have the same values when I read it from the document's properties, the condition is not satisfied and I do not see a single document. If I delete everything after "&", the view shows all documents.
All is hosted on a server which handles users.
A handy workaround is to create a Page with an embedded view. This view is exactly like your view but has an additional first categorized (!) column with your field _author.
Put into embedded view's property "Show single category" the formula #UserName or #Name([CN]; #UserName) depending on how your categorized column _author is formatted. Show then always the Page instead of the view.
This way you avoid trouble with "Shared, private on first use" views and users see exactly their own documents only.
#UserName works in a special manner in selection formulas in views. In your case the view should be Private on First Use. Read further here: http://www-01.ibm.com/support/docview.wss?uid=swg21089773 .
Be aware that this lead to all sort of issues, e.g. when you update the design of the view users must remove the view manually to get the changes deployed.

Using orchard how to display content itmes & send email to user

Using Orchard 1.6 i've setup 3 content parts, each viewable from 3 separate forms, which will automatically navigate from 1,2,3 as the user fills them out (by selecting the booking option on the main menu):
1) Records Name & phone number as input fields
2) Records equipment user has selected to rent (from drop down and input fields)
3) Confirmation which should display what the user has entered on the first 2
So far im on part (3) so I want to display what the user has chosen for the first 2 forms (I know they are stored as content items) but how can i get both of them to display on the confirmation page.
Also when the 'Submit' button is clicked on the confirmation page i would like to send an email to the owner. How can I do this?
Thank you
Use the rules module (workflow in 1.7+) to send an email when the content item is created.
To display the data you could create a simple little module that displays the latest two items created by the current user. Or something. I've never really used Orchard Forms so I'm not sure if it has better ways of accessing content you have created with it.

Resources