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

Android HttpURLConnection Post Data, PHP App Server can't receive data
compare todays date with the date in the mysql table using codeigniter
Get all possible combinations without duplicates
how to upload to files to amazon EC2
Getting the top scores, but remove duplicate users (SQL)
Explode a string after 5 spaces and 2 new lines in a string in PHP
How to create a button that links to different URL using if-else statement
How to display category's items?
Distinguish tr in dynamic table form for serializing jQuery
phpMyAdmin doesn't show new databases
decode base64 and pass to zip file
Passing POST data from ionic framework to CodeIgniter Rest API
Mail function can be misused
PHP - Is it possible to upload a zip file to the database after the zip is created in php?
Path to mpdf/jpgraph library in PHPExcel example on Windows
Convert row from database into image

Categories

HOME
qt
opengl
oracle
entity-framework
azure-functions
android-fragments
livecode
workflow
writefile
haproxy
whmcs
dronekit-python
gallery
elisp
impala
haxe
phpmqtt
polymer-2.x
locationmanager
cname
smooks
spring-jpa
sonata
fosuserbundle
infrared
hdl
pst
kaggle
mime-types
ipa
crud
background-color
adapter
spring-annotations
amazon-kms
redgate
jslint
code-rally
uivisualeffectview
mars-simulator
utf
yoast
fluid-mac-app-engine
dbcc
windows-media-player
non-linear-regression
extjs4.1
portability
sesame
dblink
zend-server
qtextedit
yargs
rational-performance-test
thread-exceptions
data-management
adp
xcopy
flush
ajax4jsf
odesk
deeplink
android-mapview
calcite
roxygen2
whitespace-language
scala-swing
maven-shade-plugin
pass-by-value
directorysearcher
phonegap-facebook-plugin
symja
full-text-indexing
webautomation
air-native-extension
nosql-aggregation
ggts
quickgraph
void-pointers
days
dojo-1.9
gprof
simplecov
user-forums
playorm
jzmq
sigar
glx
delphi-prism
vows
anonymous-types
j2mepolish
self-tracking-entities
fxruby
tso
motif
datagridcolumn

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