Form and Report on same page (Form as detail of selected report page) - oracle

I am curently moving my small business app from ms access to Oracle Apex 20.
What I need is a page that shares both the report where I would select a row with record and form element at the top of page that would show details of the record.
Can someone give me an advice on how to start? I tried creating a blank page and inserting report and form elements manually but I am getting error No Primary Key item has been defined for form region rep7.
I suspect I need to connect the form and report with primary keys but don't know how. Closest I've been to solving my problem was watching this:
https://www.youtube.com/watch?v=H-hoMcMIs9g&ab_channel=MostafizMitul
but I couldn't quite decipher it.
Thank you
Jakub

The way you described it, it is a page whose type is Master Detail. Just follow the wizard, it'll create everything for you.
True - you can do it yourself, manually, but - why reinventing the wheel? The whole idea of Apex is to make things simpler for us, developers, to save us from boring actions we'd repeat over and over again. Let the wizard do it!

Related

Which region would work best to display what I need on Oracle APEX

I am trying to make a page that returns header information for all employees, but when an employee is clicked it returns all details of that employee. I have drawn up an example that may better help explain what I am trying to do. I am curious on what type of regions I should choose, and if there is an example application that I could use to base mine off of. Thanks!
https://i.stack.imgur.com/lMfjH.png
Using the wizard:
create page
report
report with form
It'll create two pages:
an interactive report (you'll use to view some info for all employees on the same page, as if they are in an Excel worksheet) and
a form, which lets you show all details related to selected employee (which means that form can contain many more items than report)

Oracle APEX Interactive Report Column Hyperlinks & Variables

I'm using APEX 5 for the first time and trying to link users to the same page from an interactive report column.
The page being linked to will display different data, depending on which row user clicked.
I don't know what data to depend on to generate the new page, my thoughts are to write (a href) statements but not sure how variables are supposed to be stored this way.
Any advice or help would be greatly appreciated!
Wrong approach, in my opinion.
You should have done this:
create a new page
choose the "Report" page type
choose "Report with Form on table"
It'll create both Interactive Report and a "linked" Form which will be used for the purpose you described. You don't even have to write a single line of code, Apex will do everything for you. You'd just click the icon at the beginning of the Interactive Report row, and it'll lead you to the Form and display values related to that very row.

Composite Fields In MSCRM 2013

I have a question on the subject of composite attributes that I would be grateful if you could help me with.
I posted this before on other question blogs but got no response I am satisfied with.
I am writing JavaScript that will update the fields (i.e. address1_line1, address1_line2, address1_line3, address1_city, address1_stateorprovince, address1_postalcode, address1_country) in the composite (address1_composite). When the fields are updated the composite does not seem to update. I have to open the composite and close it again. Is there a way of doing this automatically in JavaScript?
I have tried the following ideas:
Idea 1:
Xrm.Page.data.entity.save();
This is recomended at http://community.dynamics.com/crm/b/magnetismsolutionscrmblog/archive/2013/10/22/working-with-dynamics-crm-2013-composite-fields-fly-out-menu.aspx
This is not any good as my customers want to view the composite before saving the page. Also I would not want to save the page for my customers as they do not want this. They would like to decide when to do this themselves.
Idea 2:
Xrm.Page.data.refresh();
This is not really what I wanted as I do not want to refresh the whole page. I just want to refresh the composite. Also it bring up a popup that warns you about not having saved the page which will be annoying for my customers.
Idea 3:
Writing the address from the address lines to the composite.
This feels like a nasty hack.
There is probably more than one way of doing this. I used the function
Xrm.Page.getAttribute("address1_composite")._attribute.setValueForCompositeField();
I do not like this for the following reasons:
This is a hack as it is not using the system functionality of the done button to write the data.
You do not get the system formatting you get with the done button although this will get done when the form is saved so it is not so bad.
In the future if customers are allowed to add their own composite fields it could cause problems as the field names could be different.
It requires me to write extra code for each form that has a composite which has fields with different schema names. E.g. I have to write different code for forms with ShipTo and BillTo addresses as the code for the account form will not work.
Another idea was to set the focus to the composite field after a change has been made to any of the fields inside the composite.
Xrm.Page.data.entity.attributes.get("address1_composite").controls.get(0).setFocus();
This is the best idea so for but it is far from perfect. This forces the user to press the done button and hence the fields will be written. I was hoping for something more automated.
My Question:
What would be great is if there was a way to click the composite done button in JavaScript. This would give me the formatting of the done button and the automation I need.
Update - 14/04/2014
Since posting this question I have been in contact with Microsoft and they say there is no supported way of clicking the done button via a program.
If the field is locked down CRM JavaScript does not send the data back to the server for updating. Another approach would be:
perform the update using JavaScript (so the user sees the change); and
use a server side plugin on the Update event so the value is persisted.

Search View For Admin In magento

I have created a Sample Module (Admin Side) in Magento.. I managed To created a form and Then Stored the form field values in Database. Now I am trying To create a search view for that. to show me all the values which i have stored in my table. however i am not able to get it. when i press the tab I directly get the form view. I want the search view first and a button there which ll direct me to this form. I want it the same way as it is for product, category or any other module. Do anyone Know How can I do it.
It's called a grid. The process is kind of long to explain here, but if you search online there are a few tutorials that explain how to do it (here's one that I found useful: http://www.webspeaks.in/2010/08/create-admin-backend-module-in-magento.html). Keep in mind that you can also model your own code after core code. If you want to make a grid like the Category grid, then go look in the code how its made.

Insert relational data in lookup table

I am managing to construct a form (with FuelCMS) that has a look-up table, and the look-up table has a field that must be inserted at the same time as the relation (Figure 1).
Using a model inside my module I have finished the form to insert the data, I have a control (Figure 2) to select the relation between the two tables, and here is where my question comes. I need to show a pop-up (like the one when you press the "ADD" or "EDIT" button that allow the user to insert the value of the "objetivo" field (Figure 1) at the time you assign "Hitos" to the "indicadores".
What is the best way to do this? Can I attach a JS file to the form from the module to be able to capture the button click and show the pop-up? There are another better way already to achieve that task?
I hope I made my point clear, if not, please tell me and I will try to explain myself better.
Thanks :)
Figure 1
Figure 2
Thanks to the kind of the FuelCMS team I was at the end able to solve the situation I explained before, to achive the aim you should follow the next steps:
Add a javascript file on the module config (fuel/modules/MODULE_NAME/config/MODULE_NAME_fuel_module.php)
Use the Javascript hooks 'selectionAdded' and 'selectionRemoved' to launch the popup (FuelCMS uses jqmodal as popup) the functions pass as a parameter an array "vals" that contains the ID of the selected items.
Add a AJAX request in the popup code to retrive the form
Process the form and keep the values for later saving on database or manipulatiĆ³n.
It could be a bit tricky if you need a complex logic but is an effective way of do it :)
Once again TAHNKS to the FuelCMS support people, i hope this help someone.
Best regards.

Resources