On my screen, we have 3 level of master child relationship,
with the default Copy Paste functionality of Acumatica ,Parent and first child is copied but the second child Data is not getting copied.
Is there any place/function to debug the default copy paste functionality, or write our own custom paste function on top of what Acumatica is providing with same Paste button?
Edit for Brain Comments -
I have not added any attribute on the View.
First DAC of DATAview is perfectly OK with me, but it is not getting data for second view defined.
Data View -
As the Maint class is inheritade from PXRevisionableGraph -
Document (Default from Base graph)
public PXSelect<
Detail,
Where<Detail.CD, Equal<Current<Parent.CD>>,
And<Detail.revisionNo, Equal<Current<Parent.revisionNo>>>>,
OrderBy<
Asc<Detail.lineNbr>>>
details;
public PXSelect<
Detail2,
Where<Detail2.revisionNo, Equal<Current<Parent.revisionNo>>,
And<Detail2.formulaCD, Equal<Current<Parent.formulaCD>>>>,
OrderBy<
Asc<Detail2.lineNbr>>>
detail2;
Issue - details view is copied but details2 view is not getting copied
Finally I got to the root cause of the issue,
Copy paste works as expected for PXRevisionableGraph as it should, the issue was with the Attributes used with the DAC fields.
IN my case we have used PXFromula attribute that was used to calculate the SUM of the Child rows.
Once that is commented everything start working as expected.
we added the events for calculating the SUM instead of PXFormula now.
Related
I added the copy-paste function to the tasks screen (CR306020) but somehow the detail section richtextbox of it wasn't being copied.
I tried to override the PXSelect view of it by removing the
[PXCopyPasteHiddenFields(typeof(CRActivity.body))]
and declared it as a public new PXSelect. but somehow it doesn't work.
any suggestion or ideas on how to make it work would be appreciated.
I have a problem that have me stumped.
I have been searching for a solution, but haven't found a working one yet. The solutions I seen introduces other issues.
Here is the scenario:
I have a frameset with two frames: 'Navigator' and 'Main'.
In the 'Navigator' frame I display a form called 'Navigator'. It contains an outline, to display a menu.
In the 'Main' frame I display the view selected by the user in the navigator.
So this is a very traditional Notes client application.
I now want to add a checkbox at the top of the view (in the action bar), allowing the user to filter the view by his/her own name. I use #SetViewInfo for this, and it all works perfect.
The issue is when the user switch views. The #SetViewInfo filter stays active when switching to a different view, so after some searching I found some solutions:
In http://www-01.ibm.com/support/docview.wss?uid=swg21204481 IBM suggests to put the following code in the QuerySave event:
#SetViewInfo([SetViewFilter]; temp ; 0 ;1)
When I am switching view or closing the view, I get the error message "Cannot execute the specified command".
In http://www-10.lotus.com/ldd/bpmpblog.nsf/dx/using-setviewinfo-in-a-notes-client-application-to-create-a-user-specific-view Andre Guirard suggests to put the following code in the QuerySave event:
#SetTargetFrame("frameName");
#UpdateFormulaContext;
#Command([OpenView]; #Subset(#ViewTitle; -1));
#SetViewInfo([SetViewFilter]; ""; "columnName"; 1)
I modify this to match my frame name and the programatic name of the first column in my view:
#SetTargetFrame("Main");
#UpdateFormulaContext;
#Command([OpenView]; #Subset(#ViewTitle; -1));
#SetViewInfo([SetViewFilter]; ""; "Adjuster"; 1)
This works perfectly when switching between view. But when I close the application while I am in this particular filtered view, the application is re-opened automatically. This happens no matter if the filter is enabled or not when closing the view.
However, when the view repopens, the frameset is not reloaded, it is just the view with the built-in view navigator to the left.
I finally got this to work by (in the built-in view navigator) selecting another view that the one where I filter data. This fixed the issue for a while, but then it starts again, and the filtered view is active in the navigator.
Obviously it is the OpenView command that is causing this, but if I remove just that line, I get the "Cannot execute the specified command" error again.
Any suggestions/pointers? I am using Notes 8.5.3 running on Windows 7 Professional.
This question can also be found in the IBM developerWorks forum for Notes 8.5:
http://www-10.lotus.com/ldd/nd85forum.nsf/DateAllThreadedWeb/08c73910571306c485257b2b0061ef91
First thing, I would suggest to make sure your view frame is always called "NotesView". You will have much less compatibility issues if you do this.
Secondly, I presume when you say you put it in the QuerySave event you really mean the QueryClose event? Views do not have a QuerySave event.
Thirdly, I find the #UpdateFormulaContext line is not needed. This is what I have in my view QueryClose...
#SetTargetFrame("NotesView");
#Command([OpenView]; #Subset(#ViewTitle; -1));
#SetViewInfo([SetViewFilter]; ""; "<programmaticColumnName>"; 1)
And I can close the app while in the view without any problems.
I have a CoreData / NSPersistentDoc app. It works fine.
I added a new entity to the MOM, and updated the version.
Now, when I create new instances of that Entity inside the MOC, the "Save" menu item remains disabled until/unless I create any instances of the old Entities that were already in the app.
The red dot button on titlebar correctly goes black to show that the document has changed - but OS X / NSDocument refuses to acknowledge this - it is impossible to do a Save.
Any ideas?
I found the cause / solution - it was my own bug, but this answer may help others with similar issues.
I was using Apple's official approach for enabling the Copy/Paste menu items (by implementing validateMenuItem), and returning true/false for copy and paste at the right times.
And I was returning NSPersistentDocument's implementation for everything else (which included Save, although I didn't see that).
Then, when I added my new NSManagedObject, I added a sub-view, and sub-view-controller, and I delegated the validateMenuItem to this - i.e. so that it could handle it's own copy/paste status.
...but I had no code path for "if it's not copy paste, and it's not handled by the child, and it's not handled by my NSPersistenDocument subclass ... then hand it to NSPersistentDocument to decide"...
...and so the Save menuitem was never being enabled.
First I apologize for the length but I want to ensure I get enough information out. I have an interesting problem that really shouldn't be difficult. I know that if you want to have the NSOutlineView scroll to and want display a specific row you simply use this pattern:
NSInteger row = [self.myOutlineView rowForItem:myItem];
[self.myOutlineView scrollRowToVisible:row];
I am not using a NSTreeController in favor of using delegation.
I am using an adapter pattern class to act as my data. The adapter wraps a number of different types. It is a simple structure:
[adapter children] ----- *[adapter parent]
So the adapter takes care of dealing with child count, can add, can remove, can expand, etc. and also acts like a data transport object.
So with that all out of the way here is the crux of the problem. When I add a new item to the NSOutlineView I start by adding a new child adapter to the adapter that is selected in the outline view. Then I reload the item with the children using:
[self.myOutlineView reloadItem:selectedAdapter reloadChildren:YES];
I then display the view for this object and attempt to synchronize the NSOutlineView so the selected row relates to the newly displayed view. So in a simple way the steps are:
Initially load the NSOutlineView with data utilizing the NSOutlineDataSource protocol
User selects an item (adapter) that can add child items
User clicks "Add" button
A new empty represented object is created
The new represented object is wrapped in an adapter
The newly created adapter is added to the children of the selected adapter
A new view is created using the new represented object and displayed
The selected (parent) node and its children is reloaded in the NSOutlineView
The newly created row in the NSOutlineView is scrolled to view which synchronizes the view and the selection of the NSOutlineView
So here is the problem. The NSOutlineView will not find the newly added item if you use the rowForItem method. Yet after I reload I can expand the parent node and select the newly added item and everything works fine. In an attempt to fix the problem I have programmatically expanded the parent node (exposing the new item) then attempt to scroll to the new item and it still cannot find the row. The rowForItem returns -1.
Have I missed something when adding a new item that I am not updating something in the NSOutlineView? I've tried many different things without success and any help will be greatly appreciated.
Thanks in advance,
Rob
Solved my own problem...finally.
Since I was adding my first child to that node and it was changing from non-expandable to expandable it needed to be expanded first, then scroll to view, then select the item. No more problem.
I have an NSArraycontroller which is bound to my application's AppDelegate's managedObjectContext. It acts as a download queue. Items are added to the NSArraycontroller programmatically
I have a table which shows two of the fields in this, each a column with its value individually bound to the the said NSArraycontroller. When a new download is started it is removed programmatically from the NSArraycontroller.
I have added a button to remove downloads from the queue before they start, the button is bound to the NSArraycontroller's remove: action which should remove the selected item in the table.
My problem is that when clicking the remove button the selected item does not get removed from the table, it remains there until clicking another entry in the table. Selecting the row where the item was causes it to be selected while the mouse button is held down, as if it is still there, but with no values.
In the console the following appears when the remove button is clicked:
-[NSCFDictionary _setUnprocessedDeletion__:]: unrecognized selector sent to instance 0x2000f2220
If I remove items from the table programmatically using
[[downloadsArray content] removeObjectAtIndex:0];
[downloadsTable reloadData];
[downloadsTable deselectAll:nil];
it seems to work fine, except I still get the invisible item left behind that can be selected and remains selected only when the mouse button is down.
I have bound the remove button's enabled attribute to canRemove of the NSArraycontroller and this works correctly.
I have a label which shows the number of items in the queue, this is bound to NSArraycontroller, arrangedObjects, #count. This works correctly when adding items but not when removing them.
Any ideas on what I'm doing wrong would be much appreciated.
I had the same problem when I tried to use an NSFetchRequest with NSManagedObjectIDResultType, and then tried to delete the results with -[NSManagedObjectContext deleteObject:].
Solution: dont use NSManagedObjectIDResultType for an NSFetchRequest if you plan to delete the objects returned.
I just had a similar problem. It turns out that _setUnprocessedDeletion__: is a method defined for NSManagedObject, and apparently its message is sent to an object when it is removed from an array controller which is set to Entity mode. That was my problem; after a day of heavy remodeling I ended up with an array controller set to Entity mode, whose content was bound to an array of regular objects instead of managed objects. One of these errors occurred whenever I removed an object. Look at the contentArray of your array controller.