The 1C:Enterprise developers forum

#1
People who like this: 0 Yes / 0 No
Interested
Rating: 32
Joined: Oct 27, 2011
Company: Abaco Soluciones S.A.

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)

 
#2
People who like this: 1 Yes / 0 No
Interested
Rating: 32
Joined: Oct 27, 2011
Company: Abaco Soluciones S.A.

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?

 
#3
People who like this: 0 Yes / 0 No
Active user
1C:Professional
Rating: 8
Joined: Jun 25, 2013
Company: 1C Company

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

1C Company support team
 
#4
People who like this: 0 Yes / 0 No
Interested
Rating: 32
Joined: Oct 27, 2011
Company: Abaco Soluciones S.A.

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.

 
#5
People who like this: 0 Yes / 0 No
Active user
1C:Professional
Rating: 8
Joined: Jun 25, 2013
Company: 1C Company

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.

1C Company support team
 
#6
People who like this: 0 Yes / 0 No
Interested
Rating: 32
Joined: Oct 27, 2011
Company: Abaco Soluciones S.A.

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.

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