Quantcast
Channel: Microsoft Dynamics SL Forum - Recent Threads
Viewing all articles
Browse latest Browse all 2378

Set current user name as default value to textbox

$
0
0

Hi All,

         I am using SL2011. In Journal Transaction screen , I have added a new Custom Field(batch.user5). How can I get the current user name to the custom field who has been logged in by changing the default property?

 In default property i have tried by using the below values:
0; "bpes.UserId"; 0; 0; 0
If i use the above values on the properties i am getting "0;" in the custom field. 

But through below VBA coding i am able to get the Current user name and set this value to default :

Private Sub xuser1_Default(OldValue As String, retval As Integer)
Dim strUserId As String
Call GetBufferValue("bPes.UserId", strUserId)
Call SetBufferValue("BBatch.user5", strUserId)
Call SetObjectValue("xuser1", strUserId)
Call DispFields("form1", "xuser1")
End Sub

 Kindly please guide me Why i am not able to get the current user name by changing the default property of custom filed?

 

 

 


Viewing all articles
Browse latest Browse all 2378

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>