Archives
In syteline 7 it was SessionManager.BaseUserName. In Syteline 8 Create form component ‘UserEdit’ and bind it to variable ‘User’ with initial value ‘USERNAME()’ Get the value on form script by ‘ThisForm.Variables(“User”).Value’ This will return the UserID who login to Syteline. Use System.Environment.UserName to get the UserID login to Windows. Here is a sample screen shot
Below is a pretty useful Form Script Function that can be used to send out email. You can trigger this by any event. PublicSub SendEmail() Dim EmailBody AsString Dim toAddress AsNew Net.Mail.MailAddress(ThisForm.PrimaryIDOCollection .GetCurrentObjectProperty("your_email_field")) Dim FromAddress AsNew Net.Mail.MailAddress("me@company.com", "Display Name") EmailBody = "Some text:" & ThisForm.PrimaryIDOCollection.GetCurrentObjectProperty("some_property") & vbNewLine _ & "Some more stuff: " & vbNewLine […]