November Happy Hour will be moved to Thursday December 5th.

Change parent organization for contact

Vote:
 

Hi!

When I'm trying to change the parent organization for a contact I get a "search organization" dialog. It looks like it only searches for the organization name. Is it poosible to extend the search to search for more parameters? Or extend the search result to show more columns from the organization?

Thanks!

/Kristoffer

#149813
Jun 08, 2016 12:45
Vote:
 

Are you refering to Commerce Manager?
Regards
/K

#149815
Jun 08, 2016 13:27
Vote:
 

Yes, sorry I should of course have mentioned that.

#149859
Jun 09, 2016 9:08
Vote:
 

Anyone?

#150282
Jun 15, 2016 13:20
Vote:
 

This will add columns and search fields.  I added to App_Start of Global.asax but you could put in an intialization module as well.

var listViewProfile = ListViewProfile.Load("Organization", "", "EntitySelect");
            if (listViewProfile == null)
            {
                return;
            }

            if (listViewProfile.ColumnsUI.Contains("OrganizationType"))
            {
                return;
            }
            AddMetaFieldsToEntitySelectListViewProfile(listViewProfile, new[] { "OrganizationType" }, new[] { "Description" });

private static void AddMetaFieldsToEntitySelectListViewProfile(ListViewProfile lvp, IEnumerable<string> columns, IEnumerable<string> searchFields)
        {
            foreach (var name in columns)
            {
                lvp.FieldSet.Add(name);
                lvp.ColumnsUI.Add(new ColumnProperties(name, "200px", string.Empty));
            }

            lvp.FieldSet = lvp.FieldSet.Intersect(searchFields).ToList();
            ListViewProfile.SaveSystemProfile("Organization", "EntitySelect", PrincipalInfo.CurrentPrincipal.GetContactId(), lvp);
        }
#150471
Jun 20, 2016 11:40
Vote:
 

Thanks Mark, I will try this right away.

/Kristoffer

#150498
Jun 21, 2016 7:39
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.