Notifications
Announcements
No record found.
hi,
In my form there is a lookup for Specifier account.
but when i click on +new button, it opens new contact form instead of account form
any idea ?
*This post is locked for comments
how is that field set in the form?. it the field like this?
there is type customer instead of Lookup and its disabled.
Hi Chirag,
The Customer type is a specific type that you can see it as a double relationship with account and contact. And when you put a customer lookup on a form it allow you to choose an account or a contact as a customer.
But when you click on + button, CRM cannot view 2 new forms one for account and the other for contact, that's why it display only account new form.
I don't know if you can modify the + button behavior on the customer lookup.
But I have a solution : if you want that everytime you choose a customer it should be a contact, you can add a new N:1 relationship with contact and you remove the customer lookup and replace it by the new contact lookup.
May I know first, you are in which entity form? Opportunity, Case, or what entity?
Thanks.
Well, like Nizar explained, this is a normal behavior with a Type=Customer. The solution depend of what you want to accomplish. the + New open the quick forms, i don't think you can change that with JavaScript or by changing any setting because of the relationship.
Hi,
Its Project entity.
There is a solution:
In CRM 2011, when we use customer lookup and we want that get only accounts or contacts, we use a javascript code to force the entity object code type in the customer lookup.
The CRM 2011 javascript code is the same code as in CRM 2013 but in CRM 2013 you should search "#customerid_i" instead of "#customerid".
By using this code, you force only one type of entity in your customer lookup, may be the add button behavior change also.
there is the javascript code :
I have already tried this , when i open lookup its working as what i have set the default and only 1 entity.
But the +new button always open Contact entity instead of Account.
My Code :
document.getElementById("customerid_i").setAttribute("defaulttype", "1");
document.getElementById("customerid_i").setAttribute("lookuptypes", "1");
If you want the + New button to pop the new account form, use the parentaccountid field on your form instead of the customerid field.
As replies before me have pointed out... a "Customer" (customerid) typed lookup field in CRM is special - resolves both Accounts and Contacts. But Microsoft has linked this field to 2 normal lookup fields on the same entity (opportunity, here): Parent Account (parentaccountid) and Parent Contact (parentcontactid). In the background, any time you fill in the customerid field, either the parentaccountid or parentcontactid also receives a value according to the record type you chose in the customerid field.
The link goes the other way too. If you fill in the parentaccountid field, the customerid field will be filled in with that account. If you fill in both the parentaccountid and parentcontactid fields, I think the customerid field uses the value from parentaccountid... or maybe uses the value from whichever of the two normal lookup fields was filled first.
So if you put the parentaccountid field on your form, that should pop the Account create form whenever you click the + New button.
The way I solved this problem was to hide the customerid field (set invisible). Then I created a new field with the same display name, and placed it exactly where the customeridfield was. I added a script
var value = Xrm.Page.getAttribute("new_project_owner").getValue(); Xrm.Page.getAttribute("customerid").setValue(value);
and everytime I change the new field i set the hidden field. this way whenever they hit the + NEW button it will bring up the quick create for account and when they save it it will be updated behind the sences.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2