-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uiReShowItemEx() does not work properly #7
Comments
Hi roval2, |
Hi Angela, Yes, reopening the item would be a workaround but works only when a newer version of the item exist. When revising an item or want refresh the current version of the open item it does not work. I am interested in you customized solution, can you tell me details? --Ronald |
Hi roval2, in the past I never assumed that the uiReShowItemEx could be the problem for the sometimes not working update. But it sounds logical. From my POV, espcially NULL-relationships sometimes make trouble. In my version, I simplified the generation function in this project so it sticks to the current generation:
For updating a part when using the manual revise option, I have added an additional Method to the PE_CreateNewRevision Action as "On Complete" event. It basically does the same as the DbRefresh button, but is automatically triggered after the Action is completed:
This version worked 80% reliable in the past. uiReShowItemEx() sometimes failed, when the manual revision Actions is triggered several times in a row. But this normally doesn´t happen in reality, as nobody creates new revisions without a reason. Angela |
Hi Angela, |
Hello, This should be fixed now in 87a0168. The issue was that the relationships frame was caching a copy of the parent item ID when the form was loaded and was using that cached ID to determine which relationship items were displayed when the user selected a relationship tab. I added some code that updates this cached copy of the ID to the most current ID when a user clicks on the refresh from database button. |
..thanks for the workaround. Our situation: In addition: |
Hi Roval, Thank you for the information. I'll reopen this issue, and investigate the case where hidden tabs exist on the from. Triggering a normal refresh will also trigger any OnFormPopulate events, so I believe this may just be an issue of the order in which I'm calling my functions. (I'm currently reloading the relationships grid after I refresh the form) In regards to your second point about uiReShowItem(), I'm not aware of any standard issues with this function. The issue I was seeing should be specific to this project as we're trying to reload a different version of the item with a different ID into the same window. The standard refresh button will reload the same version of the item with the same ID into the window, so the issue I ran into with the relationship grid caching a copy of the item ID shouldn't cause any problems. Are you seeing an issue using uiReShowItemEx() outside of this project? If so, could you describe that in more detail? Thank you, Chris |
Hi Roval, Would you be able to share the code that hides the tabs in your Form? I was unable to reproduce the issue using the sample code form this project |
see attached file... |
Thanks! I was able to reproduce the issue using that logic. I updated the order in which the refresh runs so the relationships are reloaded before the form is refreshed, and that seemed to resolve the issue on my end. Should be fixed in the latest commit now: 8e73835 |
Thank you i will check that fix... Regarding you question if i can see this problem also outside of this project. We have also the refresh problem when doing a revise in the items form. I don't know what has changed in 11SP12, but we never had this refresh problem in 11SP5 and before. Thanks, Ronald |
Hi, i have tested your fix and seen that this does not work.
Please see the attached video: As already mentioned I suspect a general problem with uiReShowItemEx()... |
something new with this issue? |
Hi Ronald, I haven't been able to reproduce the issue where the relationships are not updated; however, I was able to resolve the issue where the tabs would duplicate by wrapping the code from your method that makes tabs visible inside of a condition like so:
If you continue seeing issues with tabs, I'd recommend looking into your method to see if there's some logic that can be changed to resolve the issue. I'd like to limit the amount of physical manipulation of the relationships grid performed inside of the Refresh method of this project since I'm not sure this is typical use case. To your point about the uiReShowItemEx method, I want to reiterate this project is a special use case, so I don't think the problem you're seeing lies with this function. That being said, as you're a subscriber, you can contact our Support team with any concerns you have about this function. Please let me know if the suggested code change above resolves your issue. Chris |
Hi Ronald and Chris, The relationship refresh with the extended seems to work well. But I also face the problem with hidden tabs that will unhide as soon users trigger the update from db button. I tried to improve the sequence of the called Methods, but without any success yet. I frequently got people asking me, why they don´t have the right permission to edit new part revisions. It´s most of the time related to the missing update of the relationships, so I would be more than happy to find helping a solution here! |
...yes this is ugly! |
Hi Angela, Ronald,
When following these steps, the new Part Document relationship is visible as expected. Are you seeing different behavior? |
steps to reproduce:
see this video: |
Hi Ronald, Are you able to reproduce this issue with standard product functionality like the built-in refresh button? Chris |
Hi Chris, |
Hi, Regarding the updated of the not focused relationships: In my case ALL relationships were updated not just the selected one! For testing I changed a property in a non-visible relationship directly in the SQL database. During my test the update worked well. All relationship were forced to update themselves. @roval2: What puzzles me in your video: You open a Part and have to click the refresh from db button to update the relationships. Why are the relationships not already up-to-date when you open a part? @ Edit: I also tested the fresh from db button from an old version of an item. All tabs were refreshed as expected. But as mentioned before, I use a customzied version of the original Method. But I already mentioned the customzations above. |
...i got the Patch-079104 from the support. |
I'm happy to hear you got the issue resolved. 🙂 I'm going to go ahead and close this issue then if no additional workaround is needed from the project code itself. |
Expected Behavior
My understanding of a database refresh is that the current item with its properties and all relationships will be loaded into the current form.
Actual Behavior
Not all relationships will be updated.
Only the current active relationship tab in the form will be refreshed.
Steps to Reproduce
How can we test this issue?
Environment Details
Aras Innovator
Browsers
Project Version
What version of this project are you using? Ex: v1.1.0
Additional Details
Workaround / Solution
Have you found a workaround or solution to this issue?
Collaboration
Are you willing to collaborate on this feature? Ex: sharing code, submitting a pull request, testing, etc.
The text was updated successfully, but these errors were encountered: