Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Get the UUID of the last changed document

Forum

Search UsersRules
Get the UUID of the last changed document
#1
Interested
Points:: 15
Joined:: Oct 27, 2011

I have tried to use

Code
connection.UserWorkHistory.Get()

but it returns error in ext. connection. Without ext conn. it works just fine. Ver 8.3.3.721

Please provide code to get the last changed document in the system (per user or in general)

Profile
#2
Interested
Points:: 15
Joined:: Oct 27, 2011

Also have tried EventLog

Code
   LogEvents = New ValueTable;
   Filter = New Structure;
   Filter.Insert("StartDate", BegOfDay(CurrentDate()));
   Filter.Insert("Event", "_$Data$_.New");
   UnloadEventLog(LogEvents,Filter,,,1000);


This work fine at Server, but in ext. connection mode fails due to parameter 1.
An exception has occurred (1C:Enterprise 8.3.3.721): Type mismatch (parameter number '1')
Seems like it is impossible to transfer ValueTable.

Is there any simple solution?

Profile
#3
Active user
Points:: 0
Joined:: Jun 25, 2013

Do you need to get the last changed document or the last posted document? What problem are you trying to solve by getting it?

Profile
#4
Interested
Points:: 15
Joined:: Oct 27, 2011

I would prefer to have both options: last posted y last updated (created).

I have succeed getting it, but the code is rather complex y ineffective, so I am looking for a better way.  Now it is working by getting XML and parsing it then.

Profile
#5
Active user
Points:: 0
Joined:: Jun 25, 2013

You can add an information register and event subscription that will write the last changed document reference to the register. Would this way be efficient or not depends on number of users working simultaneously.

Profile
#6
Interested
Points:: 15
Joined:: Oct 27, 2011

Yes, we thought about that. The problem is that in this case I would have to make changes to configuration I am testing and I do not want to.

Profile
Subscribe
Users browsing this topic (guests: 2, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.