Error When Trying to Save a DateTime Value - dominotogo

I'm trying to save a DateTime value on the Notes document with DominoToGo. I've tried the following:
var testDate = "12/31/2014";
doc.replaceItemValue("DueDate", testDate, "datetime");
doc.save(true);
This gives me a message in the console:
[INFO] : 09:06:08: NotesDocument.save: new value in XML: 12/31/2014
[INFO] : 09:06:08: NotesDatabase.uploadChanges: FAIL: no response from server. Looks like there is a problem. Check server and Domino To Go XPages.
Any ideas of what I need to check? Thanks in advance.

there was a bug in ynmobile_write.xsp, I fixed it and will send you the updated code via mail!

Related

Pycronofy timezone id not being set correctly

Trying to integrate Cronofy to an app using the Python package pycronofy.
But cant seem to get the results back in the right timezone even after setting it as required.
events = cronofy.read_events(calendar_ids=('CAL_ID',),from_date=from_date, to_date=to_date, tzid='Asia/Kolkata')
print (events.json())
The returning json is always in the UTC timezone. This library doesnt seem to have an SO tag but hoping that someone could help.
The tzid parameter relates to the restriction of events for the request, to get richer time information in the response you need to request localized_times:
events = cronofy.read_events(calendar_ids=('CAL_ID',),
from_date=from_date,
to_date=to_date,
tzid='Asia/Kolkata',
localized_times=True)

mongoose findById would not work with correct Id

I was creating a database storing user information. Previously, the system worked well, after I performed npm update of mongoose, the system failed and I dont know why. The following is the error message I encountered.
CastError: Cast to ObjectId failed for value "xxxxxxxxxxxxxxx" at path "_id" for model "User"
Then, I write some simple testing code to test if the database is connected successfully. For example:
User.findOne({firstName: "David"}, function(err, user){console.log(user.lastName)});
The above worked perfectly.
I then found the corresponding Id from the database directly and create variable like:
var testId = "abcde"
and tried the following code:
User.findById(testId, function(err, user){console.log(user.firstName)});
Then it just output the error messages.
I have tried mongoose.Types.ObjectId.isValid('abcde') (abcde is just example) and it returned true. Therefore, I really have no ideas why it did not work...is it a mongoose bug?
Please help if you know the answer, thank you very much!
I just solved the problem.
As I mentioned, the findById function did not work after I updated mongoose. I was struggling on the code for few days and when I woke up this morning, I suddenly thought of upgrading my node.js.
That worked.
After upgrading node.js from v4.x.x to latest version, everything worked fine : )
This taught me a lesson that I should not upgrade a single module alone and care of compatibility issue.

Getting PDF_VALIDATION_FAILED exception when trying to create envelopne in DocuSign sample recipe code

I am trying to run the code available on GitHub.
Issue is when I am trying to create an envelope I am getting an exception saying "PDF_VALIDATION_FAILED".
Can anyone help me out with this issue?
Really you should be creating a new issue to log the new error you are getting, or modify your original post. In any case the issue is most likely due to the file extension, the default is pdf so if you want to send a different format document you can do the following:
// Add a document to the envelope
Document doc = new Document();
doc.DocumentBase64 = System.Convert.ToBase64String(fileBytes);
doc.Name = Path.GetFileName("/PATH/TO/DOC/TEST.DOCX");
doc.DocumentId = "1";
doc.FileExtension = "docx";
I managed to get a fix for this one. Apparently the file I was uploading was a corrupt file. However, not I am getting a different error 'UNABLE_TO_LOAD_DOCUMENT' when I try to upload a file in any format other than pdf.
Can anyone help me with this query? Also, what all file formats does DocuSign support?
Also, one of the previous libraries 'DocuSign.Integrations.Client' seem to work fine with word document uploads. Should they be used instead of 'DocuSign.eSign.Api', 'DocuSign.eSign.Client' and 'DocuSign.eSign.Model'?
This is in response to the second error you mentioned:
I think you are missing assigning the FileExtension to the required format
something like : doc.FileExtension = "docx"
Once you do that, you will get rid of UNABLE_TO_LOAD_DOCUMENT error and the document can be sent successfully.

how to refresh yui3 datatable with updated json data

I want to refresh datatable using new data in json format.
I tried using below method but it is giving error mentioned
var myData = table.get('data');
myData.add(json_data);
Error in console log:
invalid 'in' operand config
userTargets = (config && BUBBLETARGETS in config);
Please can someone shed some light if there's any other menthod to refresh yui3 datatable using new data
Thanks in advance.
It sounds like the json data you're passing it isn't an array of objects. Maybe it's an object with the array of objects nested inside somewhere?
At any rate, you can do
table.set('data', json_data.path.to.resultArray);
If you want to append more records to the table, try
table.addRows(json_data.path.to.resultArray);
HTH
It worked fine when I used eval to json_data (which was encoded in Perl from string into Json format)
table.set('data', eval(json_data));

GXT LiveGrid set default status string before and after loading the data through RPC call

I am using a liveGrid to load the data dymaically from the server.
The code is working fine. Now, I need to do a small enhancement in that, and for that I need some advice.
I need to display, a generic string like "Loading...", before the data gets populated from the server.
This can be done as following :-
LiveGridView liveView = new LiveGridView();
liveView.setEmptyText("Loading...");
Now, once the RPC call returns, I get my data, and I set the same in the live Grid and that works fine.
But when I dont get any data from the RPC call, I need to change that "Loading..." string to a new string like "No data available on the server". So, how can I do that?
Thanks in advance.
Regards
Ajay
I got the solution for this.
After the data is loaded, we can add a Loader.Load listner on the loader, and check the Length of the result. If it equals zero, then change the LiveGridView's emptyText value.
Thanks
Ajay

Resources