Lotus script to rebuild index - lotus-notes

We have database with over 40,000 documents. There is a view which saves a document every month and it sometimes shows wrong figure. This view is not rebuild automatically by the updall function which runs in the mid night. Hence we perform the Shift+F9 manually everymonth after which it displays the correct figure. Our user's requested for a permanent solution for this. Can you please suggest the best way to perform this function?
I have prepared a scheduled agent to pass the updall command in the server console and have no idea if it is going to rebuild the view as I am not able to test it now. Will it really work?kindly help me.

You need to rebuild the view. Use this in your program document or console command:
load updall yourdb.nsf -T yourview -R
According to help -R means "Rebuilds all used views." so -T option may not work. But if you run this only once a month it's OK (and even a good thing) to rebuild all views.

You can refresh a single view in script:
...
dim vw as notesView
Set vw = db.GetView("All")
Call vw.Refresh
...
This will refresh the back-end view index and not update any views displayed in UI, but should work as expected in a scheduled agent.

Actually before updall event,you usually should:
load fixup yourdb.nsf
The program documents is a good way.

Related

using PXDatabase.Delete to remove all row in a Custom table

I am trying to use PXDatabase.Delete to remove specific row(s) in a Custom table or even just to get it to fire off. Here is the code that I am trying to get running:
PXDatabase.Delete<SSINHoldRule>(
new PXDataFieldRestrict<SSINHoldRule.inventoryID>(18));
When I watch SQL profiler for this code to get executed, nothing shows up in the SQL profiler which means that this code is not hitting the database. I have different variations of the above code but to avail. Any help would be appreciated. I am running this code via the TestSDK.
Generally, this would be considered direct DB manipulation, which is frowned upon by Acumatica (Documented within Acumatica certification guidelines) and should be used as a last resort. Is there a reason this is not working with general DAC record manipulation? We want to assess using that before considering a more brute force methods such as PXDatabase.Delete.

Blue Prism: Object not found when ran using Control Center, but runs without issue through Process Studio

During my process there is a drop-down html element that I have spied and set correctly. I run through the Object and Process studio without any issues. Once the same process is ran through the Control Room the element throws and error that it cannot be found.
I have tried multiple different configurations without any luck and the element is still found without issue when ran manually. I even checked by signing into the VM having it error and on the second retry had the VM up; at this stage the element was found without issue. It seems to only be when the bot is running and the screen is not up. No other elements give this issue and the next step is the same dropdown, but for a stop time not start.
Any help would be appreciated!
I have added pics of the STARTSPIED - START and ENDSPIED - END spied configs,the Navigation Stage, and the process correctly running in the Object Studio OB Studio correct.
Thank you!
For the person who down-voted this item...Configs here are my two days of config changes and research that I tried on my own before asking for help. This is my 5th automation that I have put into deployment without help, so thank you for down-voting someone trying to get help where they are stuck.
Your problem is most likely connected with the fact that processes run in the control room are executed much faster than in studio and your webpage might not be loaded on time (that would explain why it works after retry).
Best practice approach would be to add a dynamic wait stage after attach and use “Parent Document Loaded” option on the element you want to interact with. It will wait for the page to be loaded and then check exist for the element. I would also suggest splitting your action into two, first to set start date and second for end date.

runWithDocumentContext:passing data back to the xpage

I was playing around with run With Document Context almost the whole day. Maybe someone can help to find me a feasible solution.
If i run the agent in before page load / before render response / query Open Document event i am able to pass values back to the xpage without saving the document. I tried also to save the document but it didnt help.
Beside these two events i didn't find a way to call the agent and bring the values from the lotus notes agent back. Can anybody think of an event that would work?
Calling an agent does work from anywhere you can call SSJS. Some considerations are on my blog.
However there is one big, big caveat: when you try to use a document (saved or unsaved) that is bound to a datasource in your current XPage, then the values in the datasource will overwrite the changes in the backend document. This could be your issue?
As David suggests: use SSJS & Java. It is less work than you might fear and you can pay down some technical debt
How about just creating a new Domino document, put the fields on it that you want to send, call your agent, and then get back those fields. Then populate whatever you need to on the XPage (getComponent("name").setValue(value).
There is no need to save this temporary document and it will just end up going away when your code runs.

Serverside script stop working after heavy usage

i have build a tabbed application with XPages.
My problem is, when i open to fast to much tabs, every serverside script stop working.
I get still a partial refresh but he did not execute any serverside script. After a full refresh every think works again. I can reproduce this an every server.
Any ideas how to solve this problem?
UPDATE (more details)
I work with iframes and in every tab i create a complex view (with a repeater)
I've i open the tabs not to fast everything works just perfect, but if i open the tabs to fast nothing will work, it affects to every script.
I got no clientside script error and i got also no serverside scipt error.
Some of these scripts are simple like document.replaceItemValue("fieldname", "value");
I've set just a print statement in the function but it also won't execute.
It seems that the server deletes the xpages session if he comes in memory trouble
You need to check carefully. It sounds less than a "heavy" usage and more like a concurrency problem. Be aware that any variable you define in a script library is application scoped. If multiple calls update the same value you might experience such a behavior. The scope variables are there to keep values.
The solution for the problem is, i have to increase the number for the xsp.persistence.file.maxviews property

Modfification history in webdash board unseen?

I am using my ccnet which is configured with the clear case
and everything is working fine as expected,but i am unable to see
anything in the "ViewProjectModificationHistory".whenever i click this
tab,i see a message which tells that :"No history Data found, make
sure you use the modificationHistory Publisher for this
project".Infact i had added under the tag.And to my
suprise,when i open this same link in the other persons system,it
opens well and fine and see all the modification history recorded.
So can anyone please tell me what could be this issue and how can it
be resolved?
Thanks and regards
Maddy
You should check your build history file. This will contain the XML data that feeds these reports. In particular, check the modifications/modification nodes to see if they are populated or not.
My guess is that the modifications are not there - so there may be nothing to display.
Another gotcha I have caught myself doing is not actually checking that there was in fact changes committed since the last time I built a project.

Resources