Answered by:
CRM Attribute Change

Question
-
How do I go about changing an attribute to be a "lookup" TYPE instead of "nvarchar"? Right now it is set up to be "nvarchar" and it is grayed out. Is it possible to change it?
Thank in advance
LenFriday, June 19, 2009 2:11 PM
Answers
-
Great, I am glad it worked. Please take a moment to mark the Post as Answered. thank you
Best Regards, Donna- Marked as answer by Len Campbell Monday, June 22, 2009 8:41 PM
Monday, June 22, 2009 6:29 PM
All replies
-
Hi, Len.
The only supported way to create lookup attribute is to create the relationship between two entities where your entity is child.
PS You can change attribute type only when you create the attribute.
Truth is opened the prepared mind My blog - http://a33ik.blogspot.comFriday, June 19, 2009 2:17 PMModerator -
I am new to CRM 4.0 and learning as I go. How do I go about making child of two entities.
Thanks again,
LenFriday, June 19, 2009 3:08 PM -
you need to set up relationships between the entity and the two entities that you want it to be related to.Friday, June 19, 2009 3:12 PMModerator
-
Where do I go about setting that up.
- Marked as answer by Donna EdwardsMVP Friday, June 19, 2009 8:31 PM
- Unmarked as answer by Donna EdwardsMVP Friday, June 19, 2009 8:31 PM
Friday, June 19, 2009 3:53 PM -
It might help if you tell us exactly what you are trying to accomplish and then we can provide the steps.
Best Regards, DonnaFriday, June 19, 2009 8:31 PM -
Hi Donna,
I have an existing field called "Service Rep." (probably not that it matters) that is just free form on the administration tab within a specific policy. I would like to edit that entity and make it a lookup field rather than the nvarchar attribute as it is now. I would like to have the Service Rep lookup to reference my contacts so I can pick those contacts for the lookup field. I hope that was not confusing. Do I have to set up a relationship to contacts for that Service Rep field? Please let me know if you need more information.
Thanks again
LenMonday, June 22, 2009 3:39 PM -
Hi Len,
Yes. You will need to create a relationship between your entity and contacts to get a lookup on the form. (Which is what almost everyone has recommended).Word of caution. DO NOT delete your old free text field otherwise you will loose your data.Do you need the step to create the relationship? What is the name of the entity where you have a the "Service Rep." field? is it a custom entity?Hassan.
Hassan Hussain | http://hassanhussain.wordpress.com/Monday, June 22, 2009 4:17 PM -
I believe the Service Rep is a custom entity called Service Rep. I do need the steps to create the relationship.
Thanks
LenMonday, June 22, 2009 5:22 PM -
Hi Len,
thank you for the information, that is helpful.
Here are the steps:
Go to Settings, Customization, Customize Entities
Open the Entity where you want the lookup field
Select N:1 Relationships
Select the New Many to 1 Relationship button
Select the Primary Entity dropdown and select Contact
Give the new relationship the Display Name you want like Service Rep
Select the other options that you want, save and close the new Relationship
Select Forms and Views from the entity
Open the Form
Add the new lookup field
Save and View your changes
Publish the changes when you are satisfied with the result
Please note that the lookup field will list all Active Contacts as an option for the field. It will not be limited to just My Contacts. That would require some additional code or an add-on product.
Best Regards, Donna- Proposed as answer by Michael Storgaard Monday, June 22, 2009 6:10 PM
Monday, June 22, 2009 5:22 PM -
Hi Len,
The following statement conflicts with one posted and adds confusion:
"I believe the Service Rep is a custom entity called Service Rep. "
You previously stated that "I have an existing field called "Service Rep." A field on a form is very different from a custom entity. The steps I provided above assumed that the Service Rep is a field on a form (entity) and that you want to replace the text field Service Rep with a lookup field to the Contact entity to get a list of Contact names rather than having a user enter a name into a text field.
Best Regards, DonnaMonday, June 22, 2009 5:26 PM -
Can I email somone a screen shot of what I am talking about. Sorry about the confusion. New at this.
LenMonday, June 22, 2009 5:39 PM -
No need to apologize Len, we were all new at some point and are still learning. You can add a link to a posted screen shot if you like. You can post to Photobucket or any other free image web site and then just give us the link in your response.
Did the steps I provided above not seem correct? If not, post the screenshot and I will modify the steps.
Best Regards, DonnaMonday, June 22, 2009 6:04 PM -
I am so sorry, I didnt even see the posting of the steps you provided me. I will give it a shot and post back
LenMonday, June 22, 2009 6:15 PM -
Donna,
That did the trick! I appreciate your help and patience.
LenMonday, June 22, 2009 6:28 PM -
Great, I am glad it worked. Please take a moment to mark the Post as Answered. thank you
Best Regards, Donna- Marked as answer by Len Campbell Monday, June 22, 2009 8:41 PM
Monday, June 22, 2009 6:29 PM -
I do have one other question for you. Since I am removing the other "Service Rep" field (the one that was free form), is there anyway to have that data that is already filled into the old Service Rep field to fill the new field "Service Rep1" which is the lookup Type. I am assuming this is something that may need to have some coding.
Thanks again
LenMonday, June 22, 2009 7:02 PM -
You could try a data import for the field, but I am seen many struggle with imports that require an update to a lookup field. You could also look at EBAX, Scribe Software or this Update Tool from Codeplex.
Since the initial question was answered, please mark as answered so others can see the solution if needed. Please feel free to start a new thread for any additional questions you have. Thank you
Best Regards, DonnaMonday, June 22, 2009 8:24 PM -
thank you DonnaMonday, June 22, 2009 8:41 PM