× Welcome to the fracta.net forum!

Share your coding ideas or ask questions.

VBA Excel change Skill Level in Avaya CMS

  • AlexBerlin
  • Topic Author
  • Visitor
  • Visitor
7 years 9 months ago #196 by AlexBerlin
VBA Excel change Skill Level in Avaya CMS was created by AlexBerlin
Hello!

Sorry about my english! I am from Berlin/Germany.

Please help me!

I use a macro for changing skill profiles in avaya cms v16.
This is running without problems except the case, that an user id is not in use.

Then avaya cms gives a error message.

The macro waits then until i accept and click on the error message popup in cms.

Is there any possibility to suppress this message so that the macro goes on running and changing the profile of the next user?

Thank u very much!

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago #197 by roller
Is the error from the Avaya application? If so try setting the interactive property of the server to false. I am not sure if it will work but worth a try. If you are not sure how to do this then post your code and I will have a look.

If the message is coming from Excel however add application.displayalerts = false to your VBA module.

Please Log in or Create an account to join the conversation.

  • AlexBerlin
  • Topic Author
  • Visitor
  • Visitor
7 years 9 months ago #198 by AlexBerlin
Replied by AlexBerlin on topic VBA Excel change Skill Level in Avaya CMS
Thank u very much.

It`s an error message from avaya, that comes, when i run the following code (only for one agent-id, which is not in use):

++++
Sub ChangeSkills()

Dim agents As String
Dim cvsApp As Object
Dim cvsConn As Object
Dim cvsSrv As Object
Dim SetArr() As Variant
Dim sWarn As String
Dim Skills() As Variant

ReDim SetArr(1, 3)
SetArr(1, 1) = 1316
SetArr(1, 2) = 4
SetArr(1, 3) = 0

Set cvsApp = CreateObject("ACSUP.cvsApplication")
Set cvsConn = CreateObject("ACSCN.cvsConnection")
Set cvsSrv = CreateObject("ACSUPSRV.cvsServer")

sWarn = ""

CentreVuOpen = cvsApp.Servers.Count
'+++Wenn Avaya offen, dann ...
If (CentreVuOpen > 0) Then
Set cvsSrv = cvsApp.Servers.Item(1)
End If
On Error Resume Next

Set AgMngObj = cvsSrv.AgentMgmt
'Change Skills
agents = "132436"
AgMngObj.AcdStartUp -1, "", cvsSrv.ServerKey, -1
AgMngObj.OleAgentSetSkill 1, "" & agents & "", 1, 1316, 0, 0, 1, SetArr, sWarn
Set AgMngObj = Nothing

Set cvsApp = Nothing
Set cvsConn = Nothing
Set cvsSrv = Nothing

End Sub
++++

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago - 7 years 9 months ago #199 by roller
You are using a server instance of the running Avaya application you have on your PC. This is the line of code where you set your Server object:

Set cvsSrv = cvsApp.Servers.Item(1)


What you need to do is create a new server object of your own. This will make your code work even if you don't have the application open. There are other posts in this forum where there is a full solution on how to do this but basically you have to use something like - Get rid of this:


CentreVuOpen = cvsApp.Servers.Count
'+++Wenn Avaya offen, dann ...
If (CentreVuOpen > 0) Then
Set cvsSrv = cvsApp.Servers.Item(1)
End If


and replace with:

yourUserName = "replace" '''' put yours in between the " "
yourPassword = "replace"
SERVERNAME = "xxx.xxx.101.100" '''

If cvsApp.CreateServer(yourUserName, yourPassword, "", SERVERNAME, False, "ENU", cvsSrv, cvsConn) Then
If cvsConn.login(yourUserName, yourPassword, SERVERNAME, "ENU") Then
On Error Resume Next

Set AgMngObj = cvsSrv.AgentMgmt
'''etc...

end if
end if

The FALSE in the below line of code is where you tell the server to be non interactive. This means no pop up and you can even have it log error messages to a text file. Check other posts in this forum for more details.

cvsApp.CreateServer(yourUserName, yourPassword, "", SERVERNAME, False, "ENU", cvsSrv, cvsConn)

Sorry I didn't test this so please double check my logic and use some common sense.

Let me know how it goes.
Last edit: 7 years 9 months ago by roller.

Please Log in or Create an account to join the conversation.

  • AlexBerlin
  • Topic Author
  • Visitor
  • Visitor
7 years 9 months ago #202 by AlexBerlin
Replied by AlexBerlin on topic VBA Excel change Skill Level in Avaya CMS
Hello and THANK VERY MUCH so far!

Skilling seems to function this way. I did not test it with a user-id, which is not used. I will test this later on.

Do I have a chance to get the code to log off from the server, because I can not use the program the usual way after running the code.

Please help me one more time!

I will tell you, if everything functions.

Thank you and have a nice day!
I love this website.

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago #203 by roller
What do you mean you did not test with user-id, which id?

To log out try:

cvsConn.logout
cvsConn.Disconnect
cvsSrv.Connected = False

Set cvsSrv = Nothing
Set cvsConn = Nothing
Set cvsApp = Nothing

Please Log in or Create an account to join the conversation.

Time to create page: 0.682 seconds
Powered by Kunena Forum