Development of Kingdee K3-add filter conditions in the order of old industrial documents

The old orders of Kingdee Industry are thin in order and time. Users can set a variety of filtering schemes. According to different filtering schemes, different data can be displayed, which can be said to meet most business needs. But these filtering schemes are set by users themselves. When you want to set some unified filtering conditions for all users, for example, all users can only see the sales outgoing orders after January 1, 2019. This allows users to set the filtering scheme by themselves. It is not suitable. In this case, it can be achieved by modifying the database.

Take the sales outbound order timebook and all users can only see the outbound orders after January 1, 2019. This can be achieved by executing the following statement on the database:

UPDATE ICListTemplate 

SET FFilter = FFilter + 'AND FDate> =' '' + '2019-01-01' + '' ''

WHERE FID=8

The method is very good, but this way of modifying the database can only achieve some global filtering conditions for all users. It is not easy to set different restrictions for different users. For example, if you use the logged-in user as the filter condition, you can only see the documents made by yourself, or you can only see the documents made by your own department, which cannot be achieved through the database. , And at the same time it is difficult to connect plug-ins here, what should I do? It can be achieved after testing.

Filter by currently logged in user and department:

Filter according to the currently logged-in user:

Regarding the secondary development of Kingdee, many needs have always been there, but it will be difficult for us to find a solution for a while. Because a lot of this thing is a black box for us, everything depends on guessing, but guessing is not a wild guess. When you find a clue, you can touch the melon along the vine. Time is the best way to solve all of this. Read more related articles, visit the Kingdee forums, and enter the second group. Maybe one day, an article, a sentence, or a picture will trigger your thoughts. Suddenly I found that vine.

No way, I came here too, and I just discovered this vine.

Guess you like

Origin blog.csdn.net/Eypsn/article/details/107082885