[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Add a New Filed to GP

Posted on 2011-10-10
2
Medium Priority
?
286 Views
Last Modified: 2012-08-13
I added a DUOS field on GP. The field name is Title. The code was as below. Now I need to add another field category. should I create a new collection and object?


Private Sub OK_Changed()
    Dim CMATitleCollection As DUOSObjects
    Dim CMATitleObject As DUOSObject
    Set CMATitleCollection = DUOSObjectsGet("CMA Title")

If EmployeeID.Empty = False Then
Set CMATitleObject = CMATitleCollection.Item(EmployeeID)
CMATitleObject.Properties("Title") = Title
End If
End Sub
0
Comment
Question by:ramziabk
  • 2
2 Comments
 
LVL 10

Expert Comment

by:Abdulmalek_Hamsho
ID: 36943165
New object, but not new collection.
0
 
LVL 10

Accepted Solution

by:
Abdulmalek_Hamsho earned 2000 total points
ID: 36946733
Let me explain this more:

You need to add one line only to your Save/Update and Retrieving codes. The above code will look like this (Of course after adding the "Category" field to VBA):

Private Sub OK_Changed()
    Dim CMATitleCollection As DUOSObjects
    Dim CMATitleObject As DUOSObject
    Set CMATitleCollection = DUOSObjectsGet("CMA Title")

 If EmployeeID.Empty = False Then
  Set CMATitleObject = CMATitleCollection.Item(EmployeeID)
  CMATitleObject.Properties("Title") = Title
  CMATitleObject.Properties("Employee CMA Category") = Category
 End If
End Sub
 

And you can add whatever fields\objects in this way as long as the Employee ID is the key.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Desired Skill Set for Microsoft Dynamics CRM Technical Resources – Part I
Desired Skill Set for Microsoft Dynamics CRM Technical Resources – Part II
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month19 days, 15 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question