Microsoft Dynamics Forums Homepage

Forum Home Forum Home > Microsoft Dynamics SL (Solomon) > SL - Customization and Integration
  New Posts New Posts RSS Feed - SL 7 Object Model References
  FAQ FAQ  Forum Search   Register Register  Login Login


SL 7 Object Model References

 Post Reply Post Reply
Author
Message
GregSmith View Drop Down
MicrosoftDynamicsForums.com Member
MicrosoftDynamicsForums.com Member


Joined: October 11 2011
Location: Anchorage, AK
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote GregSmith Quote  Post ReplyReply Direct Link To This Post Topic: SL 7 Object Model References
    Posted: October 11 2011 at 11:52am

I am trying to write a VBA application in Excel that use the Dynamics SL Object Model.  The application starts up the SL Tool bar and then starts up the Budget Maintenance screen.  I want to read the period 13 field to see if it is enabled so I can then update the budget with either 12 or 13 columns.  The problem is that I can't access the control properties other than the value itself.

My code is like this:
 
   Dim BudgetMaint As SIVApplication
   Dim MyToolbar As New SIVToolbar
 
   Set MyToolbar = New SIVToolbar
   
   
    MyServerName = Worksheets("Login").Range("B1").Value
    MySysDBName = Worksheets("Login").Range("B2").Value
    MyCoID = Worksheets("Login").Range("B3").Value
    MyUserID = Worksheets("Login").Range("B4").Value
    MyPwd = Worksheets("Login").Range("B5").Value
   
    MyToolbar.Login MyServerName, MySysDBName, MyCoID, MyUserID, MyPwd
   
    Set BudgetMaint = MyToolbar.StartApplication("0125000.exe")
 
    If Worksheets("Login").Range("B6").Value = True Then
        BudgetMaint.Visible = True
       
    End If
 
That all works great. It starts the tool bar, opens the screen and I can populate fields.  However when I run this line of code I get a 450 error
 
If BudgetMaint.Controls("cbdgtper(12)").Properties("Enabled") = True Then...
 
Plus Properties does not seem to be collection of the control. 
 
Thinking the problem might be getting access to the enabled property I tried it with the BackColor Property of a label as described on page 37 of the version Object Model manual.  That also failed.
 
I'm thinking that I'm missing a reference in my VBA project.  The references I have are:
 
Visual Basic for Applications
Microsoft Excel 12.0 Object Library
Microsoft.Dynamics.SL.Object.Library
OLE Automation
Microsoft Office 12.0 Object Library
Microsoft Forms 2.0 Object Library
 
Anybody have any idea what I'm doing wrong?     
 
 
 
 
Back to Top
Sponsored Links


Back to Top
Noelius View Drop Down
MicrosoftDynamicsForums.com Member
MicrosoftDynamicsForums.com Member


Joined: February 11 2012
Location: Mexico
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Noelius Quote  Post ReplyReply Direct Link To This Post Posted: February 11 2012 at 12:37am
Try changing StartApplication by StartAppAndAutomate
 
StartAppAndAutomate use more parameters that StartApplication
Back to Top
rrosenhagen View Drop Down
MicrosoftDynamicsForums.com Member
MicrosoftDynamicsForums.com Member


Joined: July 14 2005
Location: United States
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote rrosenhagen Quote  Post ReplyReply Direct Link To This Post Posted: April 08 2014 at 6:59am
Did you ever get this working and if so can you share your code with me?  Thank you.
Rick Rosenhagen | IT Support | Red Carpet Studios
Back to Top
faoefiur View Drop Down
MicrosoftDynamicsForums.com Member
MicrosoftDynamicsForums.com Member


Joined: February 02 2015
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote faoefiur Quote  Post ReplyReply Direct Link To This Post Posted: February 02 2015 at 6:51pm

While waiting for a bus, the blind man's dog decided to go to the bathroom all over the blind man's legs.A passerby commented to the blind man, "What! That dog just went to the bathroom all over your legs, and you are petting him?! Are you crazy?"To which the blind man replied, "Madam, I am not petting him, I am feeling for his bottom, so I can kick him."

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down


Copyright 2013 microsoftdynamicsforums.com. All rights reserved. MicrosoftDynamicsForums.com is an independent non-Microsoft website.
Email: contact AT microsoftdynamicsforums DOT com