Custom field type - SPFieldLookup

All,
I am creating a custom field type based on the SPFieldLookup. 
public class CustomAutoComplete : SPFieldLookup
public CustomAutoComplete(SPFieldCollection fields, string fieldName)
: base(fields, fieldName)
public CustomAutoComplete(SPFieldCollection fields, string typeName, string displayName)
: base(fields, typeName, displayName)
public override BaseFieldControl FieldRenderingControl
get
BaseFieldControl fieldControl = new AutoComplete();
fieldControl.FieldName = this.InternalName;
return fieldControl;
After creating the item of Lookup field, it gives me as following
<a onclick="OpenPopUpPage('http://spserver/sites/restaff/_layouts/15/listform.aspx?PageType=4&ListId={f4c841e5-7226-4615-9f6c-3a5cdb95ee74}&ID=1&RootFolder=*',
RefreshPage); return false;" href="http://spserver/sites/restaff/_layouts/15/listform.aspx?PageType=4&ListId={f4c841e5-7226-4615-9f6c-3a5cdb95ee74}&ID=1&RootFolder=*">Anh Nguyen</a>
What I need is the link to the lookup item.
Please help.
Thanks,

So far it give me the link by adding following code 
public override string JSLink
get
if (CurrentControlMode == SPControlMode.Invalid || CurrentControlMode == SPControlMode.Display)
return "clienttemplates.js";
return base.JSLink;
set
base.JSLink = value;
However, I have issue when join two lists together by using this new column which I just created. Please help!

Similar Messages

  • Custom field type - get column name in code

    All,
    I have a custom field type. In the code, I would like to get the column name that the user input. For example, user creates a new column called "Customer" with my custom field type. How can I get the name "Customer" that the user has
    just input?
    Thanks.

    Greetings,
    1) Is it possible to map datatypes? i.e.
    java.util.Date to the sql timestampThe deploytool creates the mapping based on its introspection of your bean. If your bean is coded to 1.1 then it will create the mapping based on your public field types. If coded to 2.0 then it will be based on your abstract accessors (which should conform to JavaBean conventions). Also, it is better to use java.sql.Timestamp to map to SQL timestamps since most DBEs typically store such data in nanosecond precision which java.util.Date is not equipped to handle. :)
    2) Is it possible to map entity bean names and cmp
    fields to the exact database tables and column names?Yes. After you assemble your bean in the wizard, return to the 'Entity' tab and click on 'Deployment Settings' (the SDK deploytool exemplifies the distinction between Application Assembler and Deployer roles... ;). In the resulting dialog you can: specify the datasource for your bean ('Database Settings...'); edit the EJB QL for your finder/select methods ('Edit...') if not done so during assembly; and generate ('Generate Default SQL...') and edit the SQL for your particular resource. Letting the tool generate the ("default") SQL is not really very useful if your database schema is already created but it may help save some typing ':) To edit the SQL click on the method for which to edit and you can then edit (for it) in the 'SQL Query:' TextArea.
    So far I have seen no evidence of either.I hope this helps.
    Many thanks,
    TimRegards,
    Tony "Vee Schade" Cook
    PS... I know this is only meant for development
    testing but these features are fairly standard on theActually, that's the RI's secondary purpose; its primary purpose is to provide a reference for spec implementors to compare their product(s) against. ;)
    main appservers out there and I wouldn't have thought
    it is too difficult to implement in the reference
    implementation. And, indeed, so it is implemented...

  • Custom field type vs user controls

    hi,
    I saw one example for creating page layouts. In that they are adding the controls to page layout using custom fields . we can use user controls for same right ? when we need custom field types and when we need user controls. 
    Thanks,

    You can use user controls in pagelayouts, but they won't store/retrieve the information from the underlying metadata like the field controls will.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Unable to locate the xml-definition for FieldName with FieldId '1f8a351c-965d-4927-9c22-8772b7089f55' when trying to activate feature with references a custom field type

    I´ve a solution which contains a custom field type (found somewhere on the net, the custom field type maps a choice field to managed metadata). There is a second solution which contains site column and site content type definitions using the custom field
    type definition from field type solution.
    On my developement environment, there is no problem with this two solutions. When field type solution is deployed, i can deploy the content type solution and activate the feature and everything is fine.
    However if i give the two solutions to our adminstrator to deploy them into our staging environment, content type feature activation fails. Deploying the field type solution makes no problems. The field type is then available and i can manually creates
    columns with this new field type. However activating the content type solution fails with the error shown in the title of this message. The FieldID from the message is not part of my content type project. Searching the net doens´t show any results for that
    id. So i think it´s not some of the standard field id´s from sharepoint.
    Can anyone help?

     Stack Trace
    Unable to locate the xml-definition for FieldName with FieldId '1f8a351c-965d-4927-9c22-8772b7089f55', exception: Microsoft.SharePoint.SPException: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) ---> System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
    at Microsoft.SharePoint.Library.SPRequestInternalClass.GetGlobalContentTypeXml(String bstrUrl, Int32 type, UInt32 lcid, Object varIdBytes)
    at Microsoft.SharePoint.Library.SPRequest.GetGlobalContentTypeXml(String bstrUrl, Int32 type, UInt32 lcid, Object varIdBytes) -
    -- End of inner exception stack trace ---
    at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)
    at Microsoft.SharePoint.Library.SPRequest.GetGlobalContentTypeXml(String bstrUrl, Int32 type, UInt32 lcid, Object varIdBytes)
    at Microsoft.SharePoint.SPFieldCollection.FetchFieldsFromWeb()

  • "One or more field types are not installed properly. Go to the list settings page to delete these fields" while accessing website pages

    We have a publishing website in SharePoint 2010. There are total 4 environments - Development, Test, Stage and Production. For some enhancements, we had to create some new lists and libraries. When we moved changes from Development to Test environment, everything
    worked fine. Relevant lists and libraries in lower environments were saved as templates (in .stp format) including content, imported to higher environment, lists/libraries were created in higher environment using imported templates. 
    Things worked fine from Development to Test. We did similar exercise from Test to Stage environment. Now in Stage, when we access some pages, we get error message - "One or more field types are not installed
    properly. Go to the list settings page to delete these fields.". ULS logs don't tell which exact list has got problems. 
    On searching for this error, I got many articles that explain how this could happen when we migrate from SharePoint 2007 (MOSS) to 2010. Though our case different (as all our environments are in 2010), we still tried following steps. 
    De-activate 'SharePoint Server Publishing Infrastructure' Site Collection feature
    Go to https://site-name/relationships%20list/allitems.aspx. This is a hidden list. Delete this list. 
    Re-activate 'SharePoint Server Publishing Infrastructure' Site Collection feature.
    Make sure that new hidden list with one item is created at https://site-name/relationships%20list/allitems.aspx
    However, this didn't help as we are still getting same error message. Appreciate if someone can suggest how this issue can be resolved. 
    Following are ULS logs:
    Unable to execute query: Error 0x81020014
    One or more field types are not installed properly. Go to the list settings page to delete these fields.
    System.Runtime.InteropServices.COMException: One or more field types are not installed properly. Go to the list settings page to delete these fields.   
     at Microsoft.SharePoint.Library.SPRequestInternalClass.GetListItemDataWithCallback2(IListItemSqlClient pSqlClient, String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback,
    ISPDataCallback pPagingCallback, ISPDataCallback pPagingPrevCallback, ISPDataCallback pFilterLinkCallback, ISPDataCallback pSchemaCallback, ISPDataCallback pRowCountCallback, Boolean& pbMaximalView)    
     at Microsoft.SharePoint.Library.SPRequest.GetListItemDataWithCallback2(IListItemSqlClient pSqlClient, String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback, ISPDataCallback
    pPagingCallback, ISPDataCallback pPagingPrevCallback, ISPDataCallback pFilterLinkCallback, ISPDataCallback pSchemaCallback, ISPDataCallback pRowCountCallback, Boolean& pbMaximalView)
    Thanks!

    Hi Shrishail ,
    Some time this issue occurs if you have any custom filed types in the list or library and that field type is not installed on server .
    Can you please check that if you are having any custom field types column on the list and library and if that is the case you need to install that field type on the server. sometimes it happens if field types are not properly deployed / Installed then
    you have to uninstall that field types (retract solution) and deploy it again.
    Thanks,
    Ujjwal

  • Error_42_Error occurred in deployment step 'Activate Features': Field type MyCustomField is not installed properly. Go to the list settings page to delete this field.

    Has anyone encountered this error.
    I am developing on SP 2010 with VS 2010.
    I was following an online tutorial: How to use custom form templates in NewForm.aspx/EditForm.aspx  located at:
    http://sharepointbox.blogspot.co.at/2010/11/how-to-use-custom-form-templates-in.html
    The tutorial was a little lacking on some of the direction, but it included the working source code, and I managed to complete it.
    Every time I try to deploy my version I get the error: Error 42 Error occurred in deployment step 'Activate Features': Field type MyCustomField is not installed properly. Go to the list settings page to delete this field.
    I have gone through my code line by line and matched it to the working code from the tutorial, so I can only assume that I am missing something in the Procedure to properly deploy.
    Any help is greatly Appreciated! 

    It seems that something went wrong with your custom field type installation. Check below line in .xml file of your custom field type and correct it if needed.
    <Field Name="FieldTypeClass">DocumentFieldType.DocumentFieldTypeClassName, DocumentFieldType, Version=1.0.0.0, Culture=neutral, PublicKeyToken=379382f3e8928835</Field>
    Please recheck respective values of namespace.classname , dllname. and publickeytoken in your code
    Thanks. Please mark it as an answer if it helps.

  • Setting lookup custom field using CSOM

    Hi,
    i am trying to use:
    SetCustomFieldValue()
    to update custom fields. It is working perfectly well for text types. However i can't seem to figure out how to setup the value of lookup custom field type. I got to the point where i check if the value i want to set is in the entries of the lookup table.
    But noway to figure how to set this value.
    thx for any help

    Beautifull !!
    i found out what i need in order to set the lookup field following your link which led to this one (another post):
    http://nearbaseline.com.au/blog/2013/08/updating-lookup-table-values-using-jsom/
    "must pass the entry name value(s) in an Array" it is mentionned nowwhere in MSDN ...

  • Re: Custom Value Type

    I have sort of answered my own question. I found, under the heading:
    "Storing Second Class Objects via Stringification", that you can use
    externalizer and factory extensions. However, what if I want to externalize
    to, say, a java.sql.Date (mysql's date column). For example, suppose I have
    my own Date class? How would I handle that?
    Dave Ford
    Smart Soft - The Developer Training Company
    http://www.smart-soft.com
    "Dave Ford" <[email protected]> wrote in message news:...
    Is there a standard (or non-standard) way to define a custom value type?For
    example, a class called SocialSecuriyNumber, which is basically just a
    string.
    Dave Ford
    Smart Soft - The Developer Training Company
    http://www.smart-soft.com

    Dave,
    You've got a couple options for storing custom SCOs (second-class
    objects). The stringification route is useful when you can encode the
    custom field type as a string -- java.net.URL, for example.
    For storing data in non-String fields, you'll want to create a custom
    field mapping. See the timestampField sample in the samples/ directory.
    -Patrick
    On Sun, 22 Jun 2003 14:30:07 -0600, Dave Ford wrote:
    I have sort of answered my own question. I found, under the heading:
    "Storing Second Class Objects via Stringification", that you can use
    externalizer and factory extensions. However, what if I want to externalize
    to, say, a java.sql.Date (mysql's date column). For example, suppose I have
    my own Date class? How would I handle that?
    Dave Ford
    Smart Soft - The Developer Training Company
    http://www.smart-soft.com
    "Dave Ford" <[email protected]> wrote in message news:...
    Is there a standard (or non-standard) way to define a custom value type?For
    example, a class called SocialSecuriyNumber, which is basically just a
    string.
    Dave Ford
    Smart Soft - The Developer Training Company
    http://www.smart-soft.com
    Patrick Linskey
    SolarMetric Inc.

  • How to unghost Field Control and Field Type

    We have created a custom field type and field control. As we know once we deployed field control and field type, it will keep some file like (Control file , XML file) in the file system (Hive).
    Due to business need, I just want to remove the dependency from file system and want to store every thing in database. means I want to un-ghost Field Type and Field Control. How can I achieve this.
    Please provide me some guidance on this.

    I don't think that's possible. Type definitions such as Features, Site Definitions, Field Type need to reside in the system hive. Only instances would be stored in the database.
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • Address field type

    I have 2 questions.
    1) I see Billing field for Leads is of type Address but when I create a new field, Address is not on the list of field type? Where is it?
    2) How do I create a custom field type similar to that of the Address field type?
    Thanks
    I'm using version 18

    At this time CRM On Demand does not have a address field type. The out of the box address fields consist of a "Address Block". You can use custom fields such as short text fields and picklist fields for address information.

  • Cannot get rid of default field in a custom content type

    hi guys,
    I have custom content type based on Document Set in a List based on Document Library. I created both using XML declaration in SP solution.
    I have all fields in my content type which I declared, except to defult fields: 'Name' and 'Description'. I need to hide both of them. After I set Inherits="FALSE" in ContentType section in Elements.xml in ContentType description the field
    'Description' goes away. But the field 'Name' marked as required and stays.
    I've also tried to add RemoveFieldRef parameter to the same Elements file, but the field persists. I assume it comes from list definition, not content type. But I cannot figure out how to get this field out from list definition.
    Do I miss something?

    I am assuming that content type's elements.xml file is looking like this 
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
      <!-- Parent ContentType: Document Set (0x0120D520) -->
      <ContentType ID="0x0120D520008d2ff418027e4c31b54d155b98596748"
    Overwrite="True"
    Name="Custom Dossier"
    Group="Custom group"
    Description="Custom dossier"
    Inherits="True"
    Version="0">
        <FieldRefs>
                <FieldRef
    ID="{8D6C094C-3E1F-41f4-BEE3-25B27EE09702}"
    Name="Dossier_Nummer"
    DisplayName="Dossiernummer"
    Required="True" 
    />
        </FieldRefs>
        <XmlDocuments>
          <XmlDocument NamespaceURI="http://schemas.microsoft.com/office/documentsets/allowedcontenttypes">
            <act:AllowedContentTypes
    xmlns:act="http://schemas.microsoft.com/office/documentsets/allowedcontenttypes"
    LastModified="05/31/2012 08:46:56">
              <AllowedContentType
    id="0x0101"
    />
              <AllowedContentType
    id="0x0101000490d50c50624b6ca21c637ef39cd89b"
    />
            </act:AllowedContentTypes>
          </XmlDocument>
        </XmlDocuments>
      </ContentType>
    </Elements>
    In the FieldRef  section ,we have  <FieldRef
    ID="{8D6C094C-3E1F-41f4-BEE3-25B27EE09702}"
    Name="Dossier_Nummer"
    DisplayName="Dossiernummer"
    Required="True" 
    />  this field is there.
    Try to add ShowInNewForm="TRUE" ShowInEditForm="FALSE" those attributes.
    or    Hidden="FALSE" 
    Sorry for the bad English. Could you paste your code.So that we can assist u.

  • How to populate custom fields in SAP standard Basic type DELFOR01(E1EDK09)

    I've a requirement to include and populate 2 custom fields in SAP standard basic type DELFOR01 and Segment E1EDK09 (it is at hierarchy level 1 ) .
    The requirement looks very simple but for this, as per my knowledge, I have to create a new  Basic type with the copy of segment E1EDK09 and attach it to outbound process code and write my own function module to populate the segments.
    It seems ok but the there are some existing codes in the user-exits for the SAP standard function module.These codes will not get triggered.(Or I've copy the user-exits code in my FM)
    Can we do it any other way to handle this kind of situation?
    Thanks in advance for your suggestions and help.

    Hi Phani,
    You have done it correctly. ECC additional data to be moved to EWM, 1. you need to enhance the CIF for master data/ bapi  to populate the data in the custom field in EWM. 2. Make your your are not enhancing only one structure. You need to do it in the CI includes so that the field is available in all the related tables/structures.
    3. The BAPI/FM which updated these tables will take care automatically to update the custom field data if the field is correctly added in all the tables.
    4. If the custom fields are added correctly and still the data is not getting saved , then need to check the mapping of the custom field and bepi extension.
    Let me know if this helps.

  • Required field in custom content type not required in custom list instance

    I have an issue with a custom SharePoint 2013 solution. Among other components, it consists of:
    a feature with several custom fields with different types, some of which are taxonomy fields,
    a feature with three custom content types using different sets of the custom fields with partially different configuration, e.g. whether they are required or not,
    a feature with a custom document library template and instance using two of the custom content types and a default picture library that is programmatically customized when the feature is activated, e.g. it is assigned the third custom content type.
    When deploying the solution and activating the feature, everything is set up correctly except a single taxonomy field for one of the doc lib's content types. It is defined to be required in both content types but indeed it does not show up as required for
    the default content type whereas everything works fine for the other. And it does not matter which of the two custom content types is defined first (= default) in the list template's schema.xml, the issue always occurs for the same taxonomy field in the doc
    lib's default content type. When I use the built-in Document content type as default, the field is required for both custom content types. However, using the Document content type is not an option.
    If you think this behavior is not strange enough: When the list content type's field is set required through the SharePoint UI, it becomes optional again when the list column is updated, e.g. its display name is changed.
    Any ideas?

    Hi,
    Thank you for your question.
    We are currently looking into this issue and will give you an update as soon as possible.
    Thank you for your understanding and support.
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • How to transfer SRM PO Condition Type and Custom fields to ECC?

    Hi All,
    I have a scenario to transfer SRM Line item condition types and few custom fields to ECC.
    I have found the following things but structure  'CI_EKPODB' does not exists in ECC.
    I am using 'SRM 5.00' and 'SAP ECC 6.0'.
    NOTE: I have to transfer condition records when PO is getting created / modified.
    1) Earlier I was planning to use BADI 'BBP_CREATE_BE_PO_NEW' in SRM and this will transfer the data to ECC in case of PO 
        Creation.
                   It contains the Condition fields to be passed to ECC.
    But i am unable to implement the same, whenever i create implementation when i click 'Activate' its getting activate then after few seconds its getting deactivate, i think this is because this BADI is not allowed for multiple use and SAP has already made one implementation on the same.
    2) I need to implement BADI 'BBP_ECS_PO_OUT_BADI' in SRM and 'BBP_PO_INBOUND_BADI' in ECC.
    SRM BADI will pass verified field details to ECC as a custom fields
           It does not contains the Condition fields to be passed to ECC, so i was planning to pass the same as custom field(s).
    ECC BADI 'BBP_PO_INBOUND_BADI'  will be used to map the fields to correct place and this should work.
    i need to modify the structures and pass all the custom fields (z-fields) - (CI_EKPODB but does not exists kindly suggest) as data.
    Other required details:
          Transfer of PO does not supported by SAP for service PO's, any suggestion on the same?
    Expecting quick reply from your end.
    Thanks in advance.
    Regards,
    Hemant

    Naresh,
    Thanks for quick response.
    My concern is this BADI 'BBP_CREATE_BE_PO_NEW' will trigger only in case of creation, not when PO is changes.
    I have to transfer condition types and custom fields to ECC in both the case (create / change)
    If i have to do this only in case of creation then i can pass Condition types / custom fields then i can use parameter 'CS_PO1_DOCUMENT' from method 'FILL_PO_INTERFACE1'.
    this parameter contains 'IT_POCOND', 'IT_POCONDX' and 'IT_EXTENSIONIN' as parameter  so my problem will be solved.
    But i dont think this will trigger in both the cases and 2nd thing i cann't implement the BADI since its not marked for multiple use so i am unable to implement the same.
    Kindly correct me if i am wrong.
    Once again thanks for your reply.
    Please suggest on the same.
    Regards,
    Hemant

  • Custom field in standard info type data vanishes

    Hi,
    We have enhanced standard info type 9 & added a custom field.
    in PAI defaulting some value to this custom field.
    In PA30 when we make changes to existing records it defaults the valu in the custom field and when we save it it saves to data base.
    After some time the value in this field vanishes.
    Any idea on this?

    Hi there
    The screen of the infotype 0009 is separated in the standard screen and the customer subscreen. When the
    bank country key is changed, then the current screen has to be refreshed: this is due as the displayed screen is dependent of the country key (eg 2000 for the international screen, as example  2006 for France, etc).
    When we refresh the screen (technically a LEAVE SCREEN is done), the customer own fields are not yet passed from the screen layout to the screen logic as at the time of the refresh the customer PAI logic is not yet processed. Unfortunately this screen logic cannot be changed as this is a central place in the infotype 0009.
    Hope this would help!
    Kind regards
    Sally

Maybe you are looking for

  • Accounting document in asset transaction

    Hi, We are on ECC6- EHP4. The question is regarding display of accounting document when I post the credit value to the asset through transaction code "ABGF". For IFRS purpose, I have created new "Z" transaction type "Credit memo in following year". T

  • Pdf issue with internal links in Safari

    Hello, I am creating a web site that has 80 or so pdf's available to download. They each contain a series of 20 or so speeches. To make navigation easier I have created a new page in Open Office that is an index to each pdf, with it's page number as

  • How to achieve the "High Octane Stack" guitar tone?

    How can I achieve the "High Octane Stack" sound shown on the Logic Express 'Plug-Ins and Sounds' page?  ( http://www.apple.com/logicexpress/plug-ins.html - Listed under Metal Stacks) I've been trying for days and can't get anything remotely close.  I

  • Statspack: Segregation of non-application workload

    Hello, Oracle 10.2.0.5.0 (32 bit) Windows 2003 R2 Standard Edition I have statspack running at 30 minute interval on this database. I am interested in finding details of the "physical write total bytes" part. Statistic                                

  • Action continue shortcut

    Hello, I'm a professional photographer and use a lot of actions in photoshop. When I integrate a stop, do an alteration and then want to continue my action, I every time have to use my mouse to click the play button in the bottom of the action frame.