php


How to make a lead have multiple opportunities on SugarCRM 6.3 CE?


I need to make a lead convert (and relate to) 1 or more opportunity on SugarCRM. With just one lead it's easy, I just have to set the 'opp_id' field - however, with multiple leads I'm not able to do that.
I need at least to create a relationship 1:n between Leads and Opportunities, and to fill that relationship with PHP code (receiving both lead and opportunity ids).
Any ideas?
Thanks.
What I would do is create a one to many relationship between Leads and Opportunities in Studio, what this does is creates a relationship table that will be called something like leads_opportunities (or opportunities_leads depending on what table is the LHS, I think). This will also create a subpanel, the Opportunities can be added to lead via the Select or Create option on the Subpanel. If you want to create multiple relationship straight from the Lead screen, you could add a number of Opportunity relate fields. With the after_save logic hook, you could check for the existence of that specific Lead/Opportunity combo (since there isn't a multi-field index on the relationship tables) and write it if it doesn't exist. It depends more what the use case requirements are, but that should give you an idea of how to handle it a couple different ways...

Related Links

Trumbowyg: data not posted if only an iframe
How to extract data in laravel controller from object array in HTTP request passed via ajax
PHP + XPath Query get Child Nodes and their values
PHP - chdir and require fail
How to solve Command line: '/opt/lampp/bin/httpd -E /opt/lampp/logs/error_log -D SSL -D PHP' error?
Autocomplete list of Name with Image
Not able to insert the data from url to database in php
Show percentage time progress bar form submission PHP ajax
Install dependent project from git repositroy
How to increment value in MySQL with PHP mysqli
Change the view of the datatable poulated table in cakephp
How to link data between tables in same mySQL database?
Remove individual theme option fields from Wordpress theme
Laravel: PDO Exception, cannot find driver even though the driver is installed and tested [duplicate]
How to arrange the_content() in Wordpress post page?
Remove tags from product page in Woocommerce

Categories

HOME
webview
keyboard
softlayer
code-formatting
risk-management
adobe
openlayers-3
visual-studio-2010
dji-sdk
mithril.js
kurento
xades4j
csrf
smooks
freertos
outlook-restapi
scala-ide
deepfreeze
adobe-illustrator
jest
angular2-highcharts
spring-ldap
gitkraken
pymongo
ruby-daemons
uilocalnotification
django-import-export
autodesk-model-derivative
android-canvas
polyml
jade4j
eclipse-gmf
reset
plane
ejml
hypothesis-test
web-inspector
nomad
audio-converter
jgrapht
sharpdx
android-webservice
mura
1010
swiperefreshlayout
sidewaffle
maatwebsite-excel
gawk
annotatorjs
haraka
ipywidgets
xcode6.4
system.web.optimization
zynq
vaadin4spring
univocity
onepage-checkout
diawi
cfwheels
netdatacontractserializer
jnlp
featuretoggle
org-babel
componentart
tidyr
comctl32
encryption-symmetric
cakephp-2.2
inequality
sql-function
xmi
usb-flash-drive
django-sites
cloo
smips
jmenubar
eclim
postgres-xc
microformats
cyrillic
ip-geolocation
audiotoolbox
coordinate
yuidoc
litespeed
qcar-sdk
jdownloader
explicit
pinax
getimagesize
bucket
wmd-editor
rakudo
efs
account-management

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App