Topic
  • 2 replies
  • Latest Post - ‏2013-02-13T06:37:03Z by jnbharadhwaj
jnbharadhwaj
jnbharadhwaj
11 Posts

Pinned topic System Owned Fields Listing - IsSystemOwnedFieldDefName

‏2013-02-04T08:17:27Z |
I am trying to compile the list of System Owned Fields and display it. I am seeing an error which states Object required: 'entityDefObj.IsSystemOwnedFieldDefName(...)'.
code {
Dim fieldnames
Dim ResultStatus
Dim i
Dim M
Dim U
Dim FieldType
Dim entityDefObj
Dim entityDefName
Dim sessionObj

changedcount = 0
set sessionObj = GetSession
entityDefName = GetEntityDefName
set entityDefObj = sessionObj.GetEntityDef(entityDefName)

' Get a list of the fields in this record type...
fieldnames = GetFieldNames

' Loop through the fields, showing name, type, old/new value...
if IsArray(fieldnames) Then
i = LBound(fieldnames)

Do While i <= UBound(fieldnames)

set FieldType = entityDefObj.IsSystemOwnedFieldDefName(fieldnames(i)) **** ERROR HERE ****
If FieldType = false Then

M = fieldnames(i) & ", "
Else
U = fieldnames(i) & ", "
End If
i = i + 1
Loop
End If

M = "System Fields" & M
MsgBox M
}
I have no idea what is the cause and the way out of it. Any help?

Thanks,
Nayak
Updated on 2013-02-13T06:37:03Z at 2013-02-13T06:37:03Z by jnbharadhwaj
  • pdubovitsky
    pdubovitsky
    376 Posts

    Re: System Owned Fields Listing - IsSystemOwnedFieldDefName

    ‏2013-02-04T11:33:20Z  
    IsSystemOwnedFieldDefName returns Boolean value, and it is not an object. You should not use "Set" there.

    Pavel
  • jnbharadhwaj
    jnbharadhwaj
    11 Posts

    Re: System Owned Fields Listing - IsSystemOwnedFieldDefName

    ‏2013-02-13T06:37:03Z  
    Thanks. That was the problem :-)