i want to know if is there a method or field if the form "Appointment" in the users mail database where i can see if an alarms is expired or not... i know that "$alarms" folder contains only the alarms that are not displayed yet but is there another method in lotus notes script to determinate the status of each alarms?
Thank's
Unfortunately there is no single item to show, if an alarm is "pending". If a document has the item $Alarms, then an alarm is enabled. If you check the Column in the $Alarms- Folder you see, how the alarm- datetime is calculated:
#If(#IsAvailable($AlarmTime); $AlarmTime;
Form = "Task"; #Adjust(DueDateTime; 0; 0; 0; 0; $AlarmOffset; 0);
#Adjust(CalendarDateTime; 0; 0; 0; 0; $AlarmOffset; 0))
Either there is an item called $AlarmTime or one called $AlarmOffset used to calculate the alarms.
BUT: If the items are there, but for one reason, the document is not in the $Alarms- Folder anymore, then no alarm will fire.
In the IBM Lotus Notes and Domino Calendaring & Scheduling Schema there is a section about all alarm items where you can find detailled description about every single item involved in "alarming".
Related
I have a custom screen in Acumatica with autonumber, but only one user can use at the same time. How can get screen multiuser?
In Sales Order/Payment and Applications I have a tab('COMPLEMENTOS'), in this tab you can add a new complement in other screen. This screen have a field, 'No. Complemento' is Autonumber, the autonumber is generated correctly but if two person are in the same screen at the same time, one of them is saved correctly but the other try to save with the same number that was already used and send an error 'Another Process has updated the CPSetup record. Your changes will be lost'. How I can work with two or more screens at the same time.
if (cache.GetStatus(row) == PXEntryStatus.Inserted)
{
AutoNumberAttribute.SetLastNumberField<COPago.cOPagoCD>(cache, row,
typeof(CPSetup.returnLastDocRefNbr));
if (row.RefNbrPago != null)
{
AutoNumberAttribute.SetPrefix<COPago.cOPagoCD>(cache, row, "REP");
}
}
The actual error is 'Another Process has updated the CPSetup record. Your changes will be lost'
I would like to kwon how I can generate correctly autonumber with the same screen with two or more users at the same time.
When you generate next nunber probably you store it on a field on Numbering Sequence. We call it LastNumber.
When you update the LastNumber field (with next number) on Numbering Sequence you need to use an SQL transaction
using (PXTransactionScope ts = new
PXTransactionScope())
{
//Update LastNumber with next number
// persist cache
ts.Complete();
}
I am attempting to add attendee line items on an event record using a user-event suitescript. However when I save the record, it is not adding the attendee from the script.
Any assistance on why this code is not working correctly would be greatly appreciated!
Your code mixes dynamic/client and standard record access mode.
For a user event before submit script you don't need the insert call. Just:
var newAt = nlapiGetLineItemCount('attendee') + 1;
nlapiSetLineItemValue('attendee', 'attendee', newAt, '95001');
For a user event after submit script similar but:
var eventRec = nlapiLoadRecord(nlapiGetRecordType(), nlapiGetRecordId());
var newAt = eventRec.getLineItemCount('attendee') + 1;
eventRec.setLineItemValue('attendee', 'attendee', newAt, '95001');
//add more?
nlapiSubmitRecord(eventRec);
I have a SharePoint 2013 (The Cloud version) custom list where 1 column is a text field where contact numbers are keyed in.
How can I get SharePoint to highlight duplicate values in that column so that every time a new item is added to the list, I'll know if the contact number has been used previously?
Ideally, here's what I'd get if I were to enter 816's details for the 2nd time:
CNO....Name.......Issue
816.....Blink........Login Problem (highlighted in red)
907.....Sink.........Access Denied
204.....Mink.........Flickering Screen
816.....Blink........Blank Screen (highlighted in red)
I've been struggling with this for awhile and would be very grateful for any advice. Thanks!
Since SharePoint 2013 uses Client Side Rendering (CSR) as a default rendering mode I would recommend the following approach. Basically the idea is to customize List View on the client side as demonstrated below.
Assume the Requests list that contains RequestNo column.
The following JavaScript template is intended for highlighting the rows when list item with RequestNo column occurs more then once:
SPClientTemplates.TemplateManager.RegisterTemplateOverrides({
OnPostRender: function(ctx) {
var rows = ctx.ListData.Row;
var counts = getItemCount(rows,'RequestNo'); //get items count
for (var i=0;i<rows.length;i++)
{
var count = counts[rows[i]["RequestNo"]];
if (count > 1)
{
var rowElementId = GenerateIIDForListItem(ctx, rows[i]);
var tr = document.getElementById(rowElementId);
tr.style.backgroundColor = "#ada";
}
}
}
});
function getItemCount(items,propertyName)
{
var result = {};
for(var i = 0; i< items.length; i++) {
var groupKey = items[i][propertyName];
result[groupKey] = result[groupKey] ? result[groupKey] + 1 : 1;
}
return result;
}
How to apply the changes
Option 1:
Below is demonstrated probably one of easiest way how to apply those changes:
Open the page in Edit mode
Add Content Editor or Script Editor web part on the page
Insert the specified JavaScript template by enclosing it using
script tag into web part
Option 2:
Save the specified JavaScript template as a file (let's name it duplicatehighlight.js) and upload it into Site Assets library
Open the page in Edit mode and find JSLink property in List View web part
Specify the value: ~sitecollection/SiteAssets/duplicatehighlight.js and save the changes.
Result
SharePoint has some basic conditional formatting for Data View Web Parts and XSLT List Views, but the conditions you can use are rather limited. You can compare a field in the current item with a value that you specify. There are no formulas to count the number of items with the same name or similar, which would be the approach to use to identify duplicates.
If you need to identify duplicates, you may want to create a view that groups by the CNO number. Grouping will also include an item count, so you can run down the list and spot groups with more than one item.
Do any of you know if I will run into errors with the following code come January?
SELECT (#Month(#GetField("OUT")) = #Month(#TextToTime("Today")) -1)
You can test if date field "OUT" is from previous month this way:
#Month(OUT) = #Month(#Adjust(#Today; 0; -1; 0; 0; 0; 0))
BUT, it is not recommended to use time-based functions (like #Today or #TextToTime("Today")) in view selections. Look here for more information.
You might also consider using a "user definable" column that uses #Return to abort the inclusion of any document that doesn't meet your criteria. Then you can update the corresponding profile document field in the Queryopen event of the view (if it doesn't already match the desired formula).
The following code is a script object on an XPage in it I loop through an array of all the forms in a database, looking for all the forms that contain the field "ACIncludeForm". My method works but it takes 2 - 3 seconds to compute which really slows the load of the XPage. My question is - is there a better method to accomplish this. I added code to check to see if the sessionScope variable is null and only execute if needed and the second time the page loads it does so in under a second. So my method really consumes a lot of processor time.
var forms:Array = database.getForms();
var rtn = new Array;
for (i=0 ; i<forms.length; ++i){
var thisForm:NotesForm = forms[i];
var a = thisForm.getFields().indexOf("ACIncludeForm");
if (a >= 0){
if (!thisForm.isSubForm()) {
if (thisForm.getAliases()[0] == ""){
rtn.push(thisForm.getName() + "|" + thisForm.getName() );
}else{
rtn.push(thisForm.getName() + "|" + thisForm.getAliases()[0] );
}
}
}
thisForm.recycle()
}
sessionScope.put("ssAllFormNames",rtn)
One approach would be to build an index of forms by yourself. For example, create an agent (LotusScript or Java) that gets all forms and for each form, create a document with for example a field "form" containing the form name and and a field "fields" containing all field names (beware of 32K limit).
Then create a view that displays all these documents and contains the value of the "fields" field in the first column so that each value of this field creates one line in this view.
Having such a view, you can simply make a #DbLookup from your XPage.
If your forms are changed, you only need to re-run the agent to re-build your index. The #DbLookup should be pretty fast.
Place the form list in a static field of a Java class. It will stay there for a long time (maybe until http boot). In my experience applicationScope values dissappear in 15 minutes.