locked
Get the Custom Attribute Prefix in a Plugin RRS feed

  • Question

  • What's the easiest way to find out what the prefix is (in code) from within a plugin?  I know the default is "new_" but do I have to look at the metadata to find this out

    Monday, January 5, 2009 5:47 PM

Answers

  • You can split on the Underscore ( _ ) of the PrimaryEntityName e.g. context.PrimaryEntityName.split('_')[0]

     

    Adi

     

    Monday, January 5, 2009 7:11 PM
  • You can get the current prefix from the organization.schemanameprefix property

     

    Tuesday, January 6, 2009 8:32 AM
    Moderator

All replies

  • You can split on the Underscore ( _ ) of the PrimaryEntityName e.g. context.PrimaryEntityName.split('_')[0]

     

    Adi

     

    Monday, January 5, 2009 7:11 PM
  • You can get the current prefix from the organization.schemanameprefix property

     

    Tuesday, January 6, 2009 8:32 AM
    Moderator