How to get last write date of a RavenDB document via C# - ravendb

In the Raven Studio UI, when you look into a document you can read (on the right of the page) the last write date of the document.
I don't find any access via the client API in C# to this information. Do you know if it's possible ?

The last modifed date is stored in the metadata of the document. You can access it like this:
var product = session.Load<Product>(1);
RavenJObject metadata = session.Advanced.GetMetadataFor(product);
// Get the last modified time stamp, which is known to be of type DateTime
DateTime lastModified = metadata.Value<DateTime>("Last-Modified");
See Working with document metadata for more information about RavenDB's metadata.

Related

How to get date in a Custom Object from a date field in Archer?

I have tried getting the value with JavaScript functions but getting Invalid date.
Also,
var dat = new Date(String(Archertech.UI.GenericContent.GetInstance().getFieldValue(ScheduledDate,false)));
gives the date from one field only, but there are two date fields.
I wonder where can I get the list of functions like
Archertech.UI.GenericContent.GetInstance().getFieldValue(ScheduledDate,false)
There is a Client Manager frontend API that is available which has many functions that will give you the values from fields in the Application.
To get all the function list :
Add a new Custom Object named "debugger" with the code debugger;
Save that object > Open Application > Add a new / Open a record
Open Browser's Console i.e F12 > Developer Tools > Console
Set Target to frame : Record.aspx
type "$CM." will get you a list of supported functions
Now, to get a date field value, use $CM.getFieldValue(fieldId);
Sourabh, you'd have to call the CM.getFieldValue() function for each date field you want to get the value of. There is no such function to retrieve all date fields at once.
RSA Archer doesn't provide any documentation for client-side functions.

Netsuite Advanced PDF BOM

I am creating a print out for BOM using advanced pdf. I am trying to get get the value of the Start Date from the work order but in the print out, it is empty. I set this using ${record.startdate}. Is this correct? Is there another internal id for start date and end date in the work order?
Thanks!
If the object passed to the pdf generator name is "record" offcourse you can reference is as it is. It depends on the passed parameter name. If you are modifying existing html check the rest of the script and you will see if its 'record' or not.
You can reference with ${record.startDate} and ${record.endDate}
All the available fields for the object can be found here.

Retrieving PDF report from BO4.1 Webservice

I am trying to migrate my web service client from BO 3.x to BO 4.1 Restful.
The existing implementation of BO 3.x uses BO java SDK to get CUID and doc properties to get the PDF report by using below inputs.
Report Path : path://InfoObjects/Root Folder/Application Name/Report
Name.rpt
Fill Parameter List : Parameter 1, Parameter 2, Parameter 3 etc to identify a report.
I have constructed my client code to get Logon token from RESTful web service. However I am not sure how to retrieve the PDF file now in BO 4.1.
Many of the samples I have seen uses sIDType and iDocID parameters along with Token value to retrieve the document by constructing a URL like below
http://server:port/BOE/OpenDocument/opendoc/openDocument.jsp?token=[LogonToken]&iDocID=[XXXX]&sIDType=CUID
My question : Is it must to have iDocID to retrieve document using URL pattern above or is it possible to construct a URL using report path / CUID and fill parameters ( without using iDocID) to retrieve pdf report from BO Web service.
Please assist me on this. Thanks
Note the &sIDType=CUID parameter in your sample URL -- that indicates that the page is expecting the value of iDocID to be a CUID. Without sIDType=CUID, it would expect the value to be an integer document ID.
That is, you only need the CUID, not the document ID. Also, CUID is unique, so there would be no value in specifying both CUID and path.
Incidentally, instead of specifying a CUID or ID, you can specify the document's path and name. However, this functionality is deprecated in BI4.1.
Prompt values can be supplied to openDocument using the lsS and lsM parameters (for single-select and multi-select prompts, respectively).
See the openDocument documentation here.

CRM get stage Required Fields

In Plug or workflow
How to get stage IDs or Names dynamically from entity
How to get current stage Required fields Names dynamically not hard coded Using c# or js or any other method
if any idea, Share please!
You can get an entity's metadata from CRM by issueing a RetrieveEntityRequest. In the response you get an EntityMetadata object having an Attributes collection providing all attribute details you need.
The CRM SDK contains clear example code on this topic. More information about working with attribute metadata can be found on MSDN.
I guess you are talking about the client functions to query the Business Process Flow attributes?
In CRM 2015 there is now clientside functionality implemented to the retrieve process, stage and step information.
With Xrm.Page.data.process.getActiveProcess() you can get the current workflow process and retrieve a Process object.
You can use the following methods to retrieve further and deeper information about the process:
Process:
string: .getId();
string: .getName();
stage[]:.getStages();
bool:.isRendered();
Stage :
string:.getId();
string: .getName();
int: .getCategory().getValue();| stage category Optionset
string: .getStatus(); | „active“ , „inctactive“
step[]:.getSteps();
bool:.isRendered();
Step (the attributes):
string: .getAttribute(); | logical attribute name
string: .getName();
stage[]:.getStages();
This works in CRM 2015 but not in CRM 2013.
You find further information here:
https://technet.microsoft.com/de-de/library/dn531164.aspx

Mule Date Conversion

My scenario
My Mule flow reads a file and update Salesforce.
Date field in file - 6/2/2015 5:06:00 AM
It will be updated in a datetime field in Salesforce. I am not able to figure out the mapping in the data mapper. Any pointers please.. Thanks!
1.Right click the field ( Date field) in Data Mapper- In format Option, place your required format example:dd.MM.yyyy. if it is not working, try the below option
Can also use the script to format Date
output.Required_Date = calendar2str(input.validDate, "dd.MM.yyyy HH.mm.ss");
Please read DataMapper documents for more details