Is there any way in SugarCRM to open a Sugar URL in a browser to, for example, create a new Contact with some of the form data already filled in? For example, to create a new Contact Form I could load this URL:
https://xyzcompany.sugarondemand.com/#Contacts/create
However, what if I wanted to load the form but also set some field values. For example if I wanted to set the Last Name field? I tried adding a query parm set to the field name:
https://xyzcompany.sugarondemand.com/#Contacts/create?last_name=JOE
But no luck. I've searched online but so far found no documented way of achieving the result.
If Sugar doesn't support this via URL query parameters then is there any other way to externally open a new SugarCRM record form and populate some of the fields?
Thanks!
Hi Grant Schenck,
Do you want to access sugar create contact page from another application? To access the URL you have mentioned, you need to be logged in to the instance or it will show up the login page instead of create page.
If you are already logged in, then you can override create view controller in custom/modules/Contacts/clients/base/views/create/create.js and auto-fill the data in initialize or render function based on your requirement. You can checkout more details here - http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.9/User_Interface/Views/
If you are integrating this with an external application where you don't have to be logged in to sugar, then you can create your own HTML form containing all the fields from contacts module (you can even get this info using metadata API of sugarcrm) you want and post the data to sugar via rest API - http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.9/Integration/Web_Services/v10/Example…
Regards.