Customer Portal

Get Involved. Join the Conversation.


    Input Contact Type
    Topic posted January 8, 2009 by lambomania , last edited October 29, 2011 
    1393 Views, 7 Comments
    Input Contact Type

    Hello, I am want users to be able to enter the contact type when they create their portal account.


    I tried using the input widget. When I do, I get the following message: Field 'ctype_id' not found for table 'contacts'


    I tried using changing the field name attribute from ctype_id to ctype, but I still received the same message: Field 'ctype' not found for table 'contacts'


    Any suggestions?



    • Ernie Turner
      Unfortunately the contact type field isn't one of the available types of input fields on the contact table. In the November '08 version and later you can view all of the available fields by viewing the Business Objects page in the tag gallery (<site>/ci/tags/businessObjects).
    • lambomania

      Thanks for your reply. I am guessing that this is a fairly common problem for portal developers.



      To me, the best option is to abandon any field like this. Create a custom field and add it to portal and the workspace. I wouldn't call it the most efficient way to go, but it is practical.


      Do you have any suggestions on how to proceed?

    • Ernie Turner
      Sorry about the late reply on this. I think you're idea of creating a custom field would be the best option for now. I'm unaware as to how many people use the contact type field input on the enduser pages, so I'm not really sure how severe of a problem this is.
    • jaredmeade

      my company is using feb 09 and we're also interested in exposing the ctype_id field values from customer portal.  I've created a custom contact_model with the modified sql necessary to pull this data, but i am unable to see how we can change the contact object definition (which i am assuming is contained within middlelayer\contact.php).  how can we add new fields to the contact object?  is this a PS request?




    • Ernie Turner

      Adding new fields to the Contact object isn't possible (an engagement with PS wouldn't solve the problem, as they can't edit it either). However, there might be a potential workaround for you. Because PHP is "incredibly flexible", you can assign and read any value you want once you have created an instance of the object.


      $myContact = new Contact(); $myContact->contactType = $value;

      I'm not sure if this will work for you, but I thought I'd let you know that it is an option.



    • jaredmeade

      Hey Ernie,


      turns out the contact object was cached and my custom code was never being hit because of this line:

      $contact = RnowBase::checkFormattedRecordCache($cacheHandlePrefix, $contact_id, $formatter);


      so if i bypass that code in my custom model, i am able to proceed with the logic, but i'm getting hung up on the next line(s):


      $cf   = cf_get_list(array('tbl' => TBL_CONTACTS, 'vis' => VIS_ENDUSER_EDIT_RW|VIS_ENDUSER_EDIT_RO));


      the error is:


      Internal Error File: php/php_intf_api.c Line: 1268 In Fcn.: php_generic_wrapper_filter_rnw Called Fcn.: N/A() returned 0 Description: Operation not allowed: call to cf_get_list PHP Function: cf_get_list, line: 71, script: /cgi-bin/commvault.cfg/scripts/euf/application/development/source/models/custom/custom_contact_model.php


      any ideas?




    • Ernie Turner
      You're pretty much running into the same issue that is mentioned in this post. Basically, you have to edit the config setting mentioned in the other post to allow you to call that function from your custom model.