Generic Inquiry as Primary List/Entry Point - acumatica

As I build custom entry screens for our business requirements, an objective is to utilize generic inquiries as the entry point for a consistent user experience with the rest of the system. I have 3 user entry screens, each of which is on the Site Map in the same place. Two of the GI's allow me to select the Site Map node for these user screens and assign the Entry Point to display the GI instead of the user entry screen. One does not. All of them appear to have very similar DAC structure as well as Graph structure including naming the primary graph in the DAC.
What causes the site map node to be available (or not) for assignment of the GI as an entry point. (For instance, is there an orphaned record I might seek out in SQL from deleting a previous attempt?)
I am on Acumatica ERP 2018R1 (Build 18.113.0018).

There were a couple of issues that prevented the Generic Inquiry from allowing it to be set as an Entry Point. If you have this same issue, review the related DAC's carefully for errors that may not be compile time issues. Also, double check all of the definition tabs in the generic inquiry for fields that you renamed or dropped but failed to adjust in the GI. In my case, the last issue resolved that allowed the GI to be turned into an entry screen was a poorly defined parameter.
To troubleshoot, try making the GI very simple. If you cannot reach the screen to select as the entry point and the GI is very basic, odds are that you have a problem somewhere in the DAC. In some of the DAC's for screens that I could not setup as an entry point, I had reference to a setup DAC that was not using Currrent when it should. This small error in the DAC was the problem on 2 of my 3 screens.

In my case, the primary view name in the graph was not 100% the same as the datamember on the screen. One was camelcase and the other pascal case. Make sure the view name on both the screen and the graph is exactly the same.

Related

Add Select tickbox to PXSelectReadOnly View

Is it possible to add a select tickbox to the PXSelectReadonly View, and make it available for the user to tick items from the grid?
I tried adding it but it is always disabled. I can understand that this is because the PXSelectReadonly does not allow updating so everything would be read-only, but is still a way to achieve this, or do you need to use a standard PXSelect view, and then disable everything except the select tickbox?
Difference between read-only and regular data views is explained in detail in the Merged and Read-Only Retrieval Modes section of the T200 training class, which can be downloaded from Acumatica Open University). Read-only data view types do not contain or execute any UI presentation logic and, in terms of presentation, logic are identical to regular PXSelect types. Have you tried enabling Select field in the RowSelected handler or BLC constructor? It would also help if you update your question with source code of your DAC and BLC.
Update based on the comment from Joseph Caruana below:
Besides the difference in data retrieval modes, PXSelectReadOnly data views now make entire grid read-only ignoring all field state configurations made at the runtime via PXUIFieldAttribute.

How can I activate (display) a view using Revit API?

I am trying to activate a view using Revit API. What I want to do exactly is to prompt the user to select some walls, but when the user is asked that, he can't switch views to select more walls (everything is greyed out at that point).
So the view I want to activate (by that I mean, I want this view to be actually shown on screen) already exist, and I can access its Id.
I have seen threads about creating, browsing, filtering views, but nothing on activating it... It's a Floor Plan view.
So far I can access its associated ViewPlan object, and associated parameters (name, Id, ..).
Is it possible to do ?
Thanks a lot !
Arnaud.
I think the most preferred way is the UIDocument.RequestViewChange() method. The tricky part about this is that unless you've designed your application to be modeless with external events or idling, it may not actually happen until later when control returns back to Revit from your addin.
(There's also setting the UIDocument.ActiveView property - not positive if this has different constraints).
The other way that I have done it historically is through the use of the UIDocument.ShowElements() command. The trick here is that you don't have control of the exact view - but if you can figure out the elements that appear only in that view, you can generally make it happen (even if you have to do a separate query to get a bunch of elements that are only in the given floorplan view).
Good Luck!
I think the solution to your problem may be:
commandData.Application.ActiveUIDocument.ActiveView = View;
The ActiveView is a property and it has {get and set} options.
ActiveView has only a get accessor, what Mostafa suggests will not work.
I have used the RequestViewChange() method with a modal dialog and have not had problems so far.

Orchard 1.9.1 Container Layout

I set up the following Content Definition in an Orchard 1.9.1 site:
Manufacturer
- Logo (Media Library Picker Field)
- Container (single supported type - Product)
Product
- Containable
- [Generic Fields]
I added a few sample Product items to the site, and as part of that it had me select the Member Of option, which was a list of Manufacturer items I had already added.
The issue I have is, when I try to build a query to use with a projection widget, I can't seem to find a way to get either a Manufacturer's children, or a Product's parent container since I need to display all content on a single view. There are only going to be ~20 line items here, so performance is a non-issue. If I do multiple queries (one for each type), everything shows up individually but the Shape Tracing tool, when showing me the various Model items on the view, can't seem to show me either of these options.
My end goal is building a custom view to display this information, but I can't figure out how to traverse either up the Product to what its' parent container is, or traverse down from a Manufacturer to the child Product items below it.
How do I build a query that lets me see all of this so I can build a projection widget off of that?
Edit
I played with this some more and came across the ability to take a query and attach a layout to it. That is definitely getting me closer, however the grouping option says No properties are currently available in order to group this view, however I would think being part of a container/containable would define grouping automatically. As it stands, this lets me show everything, but unfortunately the parent/child show, and then the children repeat again, independent of the parent. It's so close, but I can't quite get it right.

Controlling an NSArrayController and Core data relations

I am new to stackoverflow because I almost never ask questions in forums as there are plenty of questions out there already answered. However my head is about to explode from trying to figure out how to do this app.
First I do this using XCode 4.5.2 for OSX 10.8 deployment of a personal (that is for my use only) double entry accounting software.
Each accounting entry consists of a header of various text fields such as the entry date, a serial number, etc. which I created an Entity called "Entry". Also each such entry has multiple lines such as the various accounts related to that entry, amounts, etc. called an Entity "EntryLine" linked in the model nice and easy.
The thing is that I intended to use text field for the basic header info and below it a linked Table View for each of the line. Being an accounting software there are several checks (validations) that I need to make and I need full control of what is going on. Already tried binding two array controllers, one for each entity and linking the two and saving them to the sqlite file but to no avail!
Now I have an app with just the header up and running by manually getting and setting the info in the top text fields as I please and saving them to the file. But I have no idea how to do the part with the Entry Lines in the Table view. Can I do that manually too or is it better to do bindings through an array controller?
Also tried already with array controller but I get "Table View Cell" when I add a new line in the table. Any ideas on that?
In the Table View there is also an "Account Name" part that is NOT part of the EntryLine entity but my intention is to obtain this information from another entity called "Account" that stores the Account Number and Account Name. On input of the account number that is, the app would skip the name field and move to particulars for input but also bring up the name of the account already inputted. Is this even possible?
Sorry for being a bit vague in my questions but I come from routine program oriented languages and not object oriented one, though I have some Java experience. Any help would be appreciated. No screenshot sorry as I am not yet allowed:(

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).

Resources