vb的代码
sub SetDefectEmailLink()
Dim dbid
Dim userdbname
Dim schemadbname
Dim defname
Dim dbDescObj
Dim emailLink
Dim webpc
rem inite the session
Set session = GetSession
rem Get userdb name
rem dbDescObj = session.GetSessionDatabase
rem userdbname = dbDescObj.GetDatabaseName
rem Get ID
dbid = GetFieldValue("dbid").GetValue
rem Get entity definiation name
defname = GetEntityDefName()
userdbname = "xxx"
rem Set your CQ web address
schemadbname = "xxx"
rem for example "xxx"
webpc = "xxx.xxx.xxx.xxx"
rem for example 192.168.0.3
rem Get the Defect email link
emailLink = "http://"&webpc&"/cqweb/main?command=GenerateMainFrame&service=CQ&schema="&schemadbname&"&contextid="&userdbname&"&entityID="&dbid&"&entityDefName="&defname
SetFieldValue "email_link", emailLink
End sub
以上是实现通过邮件点击链接登陆web的功能代码;
进一步的需求就是直接定位打开相应的变更单(关键取得用户名和密码),不知哪位高手实现了指点一下先谢过了!
[ 本帖最后由 佳音 于 2007-5-22 16:36 编辑 ]