Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 12th June 2017, 16:07
sahil318 sahil318 is offline
Newbie
 
Join Date: Jul 2014
Posts: 2
sahil318 is on a distinguished road
Baan: Baan V, LN-FP2, FP7, FP9 - DB: SQL - OS: Windows XP, Windows 7
Capture Login & Time stamp in Text Field
Baan: ERP LN 6.1 FP11 (Infor ERP 10.5)
C/S: None/Unknown

Hi Everyone

I am new to the development world and started to work on the extension Module in 10.5

We have a requirement where we want control over the Text Editor:
1. No one can go and delete existing text
2. Capture Login ID & Date-Time when a user modifies anything in a text field

Not Sure if that is possible, but I have seen a similar functionality in the standard session, tsclm1100m000 (Comments Tab on the Service-Call Screen)

Looking forward for a response
Thanks in Advance
Attached Images
File Type: jpg Service-Calls.jpg (57.4 KB, 15 views)
Reply With Quote
Sponsored Links
  #2  
Old 13th June 2017, 04:01
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 444
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
You can write a Dal Hook for the text field which you dont want anyone to edit. and in the field Hook.. You can check if the Mode type is DAL_UPDATE and the Text field is zero that means there was a previous value and now you are trying to make it to zero, that means to delete the text field, so create a dal message and return Dalhookerror.

Secondly, there will be two options to capture the date time stamp and the login Id name, you can add a normal Table field or to add a CDF field

For the first part you can do with

Code:
Syntax:
function long field.check  (long has_changed [, long element])

Description

Use this hook to program logical integrity rules for a specified field. The function name is ppmmmvss.bbbb.check(), where pp is the package code, mmm is the module code, vss is the table number, and bbbb is the field name. 

Insert a new object Update an existing object 
Does the property check for all fields.

The has_changed flag is always set to DAL_NEW. Also for fields that are not changed! 
 Does the property check for all fields.

The has_changed flag is only set to DAL_UPDATE for changed fields. For unchanged fields, the flag is cleared. 
 
 

Arguments
long has_changed  
[long element]  This is set for array fields only. It indicates the index of the array element that must be checked. 
 
 
Return values
This hook returns 0 if the value of the field is accepted. It returns a negative value (DALHOOKERROR) if the value is not accepted. 

Context
This function is implemented in the 4GL Engine and can be used in DAL script types. 

See also
Property methods

Note
With regards to Extended DAL (DAL2) it is advised to replace this property hook by the new DAL2 Field hooks. 

This hook is still supported for backward compatiblity reasons, but the consequence is that the field is not regarded as a DAL2 field. 

Example
A property hook programmed in DLL tdsls040:
function extern long tdsls040.oqua.check(long has_changed)
{
    if has_changed <> 0 and tdsls040.stat = tdsls.stat.invoiced then
        dal.set.error.message("tdsls44041")
        | Order is already invoiced, cannot change
        | quantity
        return(DALHOOKERROR)
    endif
    ...
    return(0)
}
Just compare the has_changed flag to DAL_UPDATE.
Reply With Quote
  #3  
Old 13th June 2017, 08:03
andreas.toepper andreas.toepper is offline
Senior Member
 
Join Date: Jun 2004
Posts: 127
andreas.toepper is on a distinguished road
Baan: Baan4, LN6.1 - DB: MSSQL - OS: Linux&Windows
LN already saves the last user and modification date of a test (for each language of the text). It is saved with the general information of the text number (not the text field itself).
You'll find the data in tools/text management (tttxt1500m000). The data is stored in table tttxt002.
Reply With Quote
  #4  
Old 27th June 2017, 20:37
sahil318 sahil318 is offline
Newbie
 
Join Date: Jul 2014
Posts: 2
sahil318 is on a distinguished road
Baan: Baan V, LN-FP2, FP7, FP9 - DB: SQL - OS: Windows XP, Windows 7
Hi Guys,

Thanks for your response but I was away on a vacation and did not check anything.
I know I can check if the field becomes zero but it is really easy to fool the system.

I can erase every thing from the text and leave a random char "z" in the text

I need users to not delete anything which was entered and allow only append
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to identify a selected TEXT field Cancoon2000 Tools Development 3 25th June 2015 18:06
Problem in making text field to be mandatory field alerts Tools Development 10 17th December 2013 09:24
Time stamp and user who report an operation complete khyou99 Manufacturing & Supply Chain 5 12th August 2004 13:09
Printing Text field on the Report learner Tools Development 7 30th September 2003 20:11


All times are GMT +2. The time now is 09:49.


©2001-2017 - Baanboard.com - Baanforums.com