id
stringlengths 14
16
| text
stringlengths 33
5.27k
| source
stringlengths 105
270
|
---|---|---|
b7a111614d86-4 | Additional notes:
In the System considerations section, "new combination of teams" means that when creating the report, the end user created the Report with a set of teams that doesn't exist on any other record. This results in new entries in the team_sets and team_sets_teams tables.
Steps to migrate:
Build a report in the dev instance
Select the database rows associated with that report (saved_reports, possibly team_sets and team_sets_teams tables)
example: "SELECT * FROM saved_reports WHERE id = 'REPORT_ID'"
Export the row/rows into a SQL file
Execute on the next system
Â
Use Case: Deployment of Dashboards | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-5 | Execute on the next system
Â
Use Case: Deployment of Dashboards
The customer wants to deploy the pre-built dashboards in an automated way. See Figure 1 below. This example has two dashboards, "Help Dashboard" and "My Dashboard". Each dashboard has zero or more dashlets.
System considerations:
Database:
Row is inserted into the dashboards table for each user dashboard. The metadata column stores all the dashlets associated with that dashboard, and the assigned_user_id column stores the user who will see this dashboard.
Scripts required
PHP
After deploying the dashboards you will need to run the Quick Repair and Rebuild script found in the admin section.
Custom scripts: YES (if applying to multiple users)
Because users and id are dynamic, if applying to multiple users, you will need a custom script to retrieve those user ids and set them for each sql insert.
SQL | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-6 | SQL
Script required to import the entry from the dashboards table.
Steps to migrate:
Build a dashlet against a specific user
Select the database rows associated with that user
example: "SELECT * FROM dashlets WHERE assigned_user_id = 'USER_ID'"
Pick the dashboard you'd like to apply to other users, and export it into a SQL file
Decide what set of users you need to create the dashboard for.
Write a script to pull that list of users, dynamically set the assigned_user_id and id (id must be unique) with the insert query you exported in step 3, and run for each one of those users.
Â
Screenshots:
Figure 1
Â
Use Case: Deployment of Roles
The customer wants to deploy the roles in an automated way. This includes creating new roles and updating previously existing roles.
System considerations:
Database: | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-7 | System considerations:
Database:
Row is inserted into the acl_roles table for each role setting. Depending on how specific the role is, we might have acl_fields and acl_actions mapped to roles through acl_roles_actions
Scripts required
PHP
Sugar has a SugarACL object API that can be used to create, read, and write roles and role definitions.Â
Steps to migrate:
Write a script using our object API to create or write roles
Define the metadata for the changes or additions to be made
Write logic to add/update based on metadata
Execute script on dev instance and confirm changes
Use script to promote to next instance
Note: See functional sample script below
https://gist.github.com/sadekbaroudi/3191513e2bbce2170326
Â
Use Case: Deployment of Teams | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-8 | Â
Use Case: Deployment of Teams
The customer wants to deploy the teams in an automated way. This should be done via the Sugar object API.
System considerations:
Scripts required
PHP
Follow steps in "Additional Notes" section below for details on building Team scripts.
TeamSets are cached per user by SugarCache. Â SugarCache should be cleared after installing new teams.
Additional notes:
To build a script to do this, see the following:
modules/Teams/Save.php
This file is called when a user posts data through the form in the UI. This code should be replicated (until the Teams module is refactored).
modules/Teams/Team.php
function save() - this should be called as part of the save | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-9 | function save() - this should be called as part of the save
function mark_deleted() - this should be called on the object when you want to delete a team, be sure to make sure there are no related users before doing so.
Steps to migrate:
Write a script using our Teams object API
Create needed team object
Set appropriate data on object and/or POST data
After saving, potentially add users to the team
Execute script on dev instance and confirm changes
Use script to promote to next instance
Â
Use Case: Deployment of User Settings
The customer wants to deploy the user settings in an automated way. There are a couple of places where we store User settings.
Storage types:
User Preferences | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-10 | Storage types:
User Preferences
This is a key value pair with a serialized and then base64 encoded value. We store many user preferences, all encoded. These are non-critical settings, and can be blown away. However, doing so will require the user to reconfigure their preferences. The data is stored in the user_preferences table. This includes data such as:  Subpanel display order, Timezone preferences, etc.
Users module settings
 These are direct values on the Users module (users table). Here we track persistent User attributes such as: Address, Phone number, etcÂ
User preferences
System considerations:
Database:
Row is inserted into the user_preferences table for each user setting change.
Scripts required
PHPÂ | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-11 | Scripts required
PHPÂ
In order to update values with a user's preferences, you would need to write a custom script to read, update, and rewrite to the user_preferences tableÂ
Steps to Migrate:
Write a script using our User Preferences API
Query the database to retrieve the row for a given user
base64 decode the value
unserialize the value
update the data required
serialize the data
base64 encode
rewrite the row to the database
(repeat for all applicable users)
(See modules/UserPreferences/UserPreference.php or modules/Users/User.php, specifically getPreference() and setPreference())
Load the User object
Call getPreference for the specified value
Make changes
Call setPreference for the specified value
Better performance method (direct database queries and updates):
More robust, but slower performance method (API):
 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-12 | More robust, but slower performance method (API):
Â
User table
Â
System considerations:
Database:
Users table is updated
Scripts required:
SQL
You can directly update the Users table directly, provided the data is not encoded or encrypted (like password).
Â
Steps to Migrate:
Write a SQL script to update values in the users table based on need
Execute script on dev instance and confirm changes
Use script to promote to next instance
Â
Use Case: Deployment of custom fields
A user wants to deploy custom fields created in an automated way. This includes anything created through Studio.
System considerations:
File System:
Files are potentially created in the following directories:
Custom field vardef:custom/Extension/modules/<module_name>/Ext/Vardefs/sugarfield_<field_name>.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-13 | Custom field label (and app_list_string if necessary): ./custom/Extension/modules/Accounts/Ext/Language/en_us.lang.php
Database:
The <module_name>_cstm table is created, if it doesn't already exist.
The field <field_name>_c is created against that table
Scripts required
A Quick Repair and Rebuild is required after copying the files and fields_meta_data table values.
SQL
You will need to insert the relevant entries from the fields_meta_data table
Steps to migrate:
Export the fields_meta_data entries for the custom fields into a script
Copy the files for the custom fields
Apply #1 and #2 to another system, and execute a Quick Repair and Rebuild
Execute the DDL generated by the QRR above
Â
Use Case: Deployment of custom modules | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-14 | Â
Use Case: Deployment of custom modules
A developer creates a custom module and wants to deploy it, this use case refers to a basic module, because each additional feature (logic hooks, relationships,dependencies, etc) has its own deployment scenario.
System considerations:
File System:
./custom/Extension/application/Ext/Include/<package_name>.php
./modules/<new_module>/*
./custom/modules/<new_module>/*
./custom/themes/default/images/*<new_module>*.(gif/png)
./custom/Extension/modules/<new_module>/*
Database:
new tables <new_module> and <new_module>_audit
Note: the DDL gets generated by the Quick Repair and Rebuild script, at which point you can execute manually or automatically
fields_meta_data table | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-15 | fields_meta_data table
Note: this stores all the custom fields built through Studio (not Module Builder) after the module is deployed. Make sure you retrieve all rows from this table that apply to this module and create a SQL script to insert into the next system
Scripts required
After deploying the custom module, you will need to run the Quick Repair and Rebuild script found in the admin section.
SQL
Script required to import the entry from the <new_module> and <new_module>_audit table.
Script required to import fields_meta_data table entries for this module (if there are any)
Additional notes:
For a full custom module deployment scenario, this deployment scenario should be ran first then all of the extended module features deployment scenarios should be run:
Steps to migrate:
Copy all files listed in file system section above | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-16 | Steps to migrate:
Copy all files listed in file system section above
Export fields_meta_data table entries as apply to the custom module (if any)
Run Quick Repair and Rebuild
Either manually or automatically run the DDL output from QRR
Test functionalityÂ
Use Case: Deployment of custom Relationships
A user wants to deploy custom relationships created in an automated way. This includes anything created through Studio.Â
Follow the same instructions as for Custom Fields, but:
Ignore the fields_meta_data table
Be sure to consider the following:
custom/Extension/modules/<side_1_of_relationship>/Ext/
custom/Extension/modules/<side_2_of_relationship>/Ext/
custom/Extension/modules/relationships/
Otherwise, the same process applies. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-17 | custom/Extension/modules/relationships/
Otherwise, the same process applies.
Use Case: Deployment of custom View or Layout metadata (Web)
The user creates custom layouts and views for web from studio and wants to deploy them.
System considerations:
File System:
Layouts:
./custom/modules/<module>/clients/<platform>/layouts/<layout>/ <layout>.php
Views
Creating a layout from Studio actually augments the Sidecar view metadata instead of Sidecar layout metadata
./custom/modules/<module>/clients/<platform>/views/<layout>/ <layout>.php
Scripts required
After deploying you will need to run the Quick Repair and Rebuild script found in the admin section.Â
Additional notes: | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-18 | Additional notes:
For layouts(record) you have the option to simply save the modified layout. In this case the metadata for the layout can be found in ./custom/working/modules/<module>/<platform>/views/<view>/<view>.php
Layouts created from studio create views in .custom/modules/<module>/viewsThe created views can be record | list | selection-list
For the two popup layouts(created from studio), extra metadata is provided in the ./custom/modules/<module>/metadata/popupdefs.php
Â
Use Case: Deployment of custom View or Layout metadata (mobile)
The user creates custom layouts and views for mobile from studio and wants to deploy them.
System considerations:
File System: YES
Layouts:
./custom/modules/<module>/clients/mobile/layouts/<layout>/ <layout>.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-19 | Views
./custom/modules/<module>/clients/mobile/views/<view>/ <view>.php
Database: NO
Scripts required
After deploying you will need to run the Quick Repair and Rebuild script found in the admin section.
Additional notes:
Layouts and views are handled the same as with web. From Studio, you can augment detail, edit and list views.
Deploying Application Code and Integrations
Use Case: Deployment of custom CSS (LESS)
Â
In order to update branding, developers can deploy customized CSS.
System considerations:
File System: YESÂ
./custom/themes/custom.less
Scripts required
You will need to run the Quick Repair and Rebuild script found in the admin section to rebuild the Sugar CSS bundles.
Use Case: Deployment of Logic Hooks and Web Logic Hooks | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-20 | Use Case: Deployment of Logic Hooks and Web Logic Hooks
The developer creates custom logic hooks, they want to deploy them.
System considerations:
Logic Hook:
File System: YESÂ
application hooks :
./custom/Extension/application/Ext/LogicHooks/<file>.php
module specific hooks:
./custom/Extension/modules/<module>/Ext/LogicHooks/<file>.php
Scripts required
You will need to run the Quick Repair and Rebuild script found in the admin section to rebuild the extensions.
Web Logic Hook:
Database: YES
Only for weblogic hooks : row is inserted into the weblogichooks table.Â
Scripts required
After deploying the custom hooks and database entry in the weblogichooks table, you will need to run the Quick Repair and Rebuild script found in the admin section. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-21 | SQL
Script required to import the entry from the weblogichooks table.
Use Case: Deployment of custom API endpoints
The user creates a custom api endpoints, he wants to deploy them.Â
System considerations:
File System
clients/<platform>/api/*
modules/:module/clients/<platform>/api/*
custom/clients/<platform>/api*
custom/modules/<module>/clients/<platform>/api/*
Scripts required
After deploying the custom api you will need to run the Quick Repair and Rebuild script found in the admin section. This will rebuild the ./cache/file_map.php and ./cache/include/api/ServiceDictionary.rest.php files to make your endpoint available.
Additional notes: | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-22 | Additional notes:
Logic for how api endpoints are loaded, can be found in ./include/api/ServiceDictionary.php (where api endpoints are loaded from, how they are built on Quick Build and Repair, etc.)
Use Case: Deployment of custom Administration Panels
The user creates custom administration panels, and wants to deploy them.
System considerations:
File System:
./custom/Extension/modules/Administration/Ext/Administration/<file>.php
./custom/Extension/modules/Administration/Ext/Language/<langtype.name>.php
./custom/themes/default/images/<icon_image_name>.<img_extension>
and depending on the admin panel url, either :
./custom/modules/<linkUrlModule>/*
or | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-23 | ./custom/modules/<linkUrlModule>/*
or
./custom/modules/<linkUrlModule>/clients/base/layouts/<route_name>/*
./custom/modules/<linkUrlModule>/clients/base/views/<route_name>/*
Scripts required
After deploying the admin panels, you will need to run the Quick Repair and Rebuild script found in the admin section.
Additional notes:
The admin url can specify new sidecar routes, old bwc routes, edit view files, plain scripts, or just open a drawer. Determining the additional resources to be copied may be impossible without a standard in place.
Use Case: Deployment of custom Jobs / Schedulers
The user creates custom jobs and schedulers, and wants to deploy them.
System considerations:
File System: YES: | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
b7a111614d86-24 | System considerations:
File System: YES:
./custom/Extension/modules/Schedulers/Ext/ScheduledTasks/<jobname>.php
./custom/Extension/modules/Schedulers/Ext/Language/<langtype.jobname>.php
Database: YES
Row is inserted into the schedulers table, if a job is added as a scheduled job using Administration > Scheduler.
Scripts required
After deploying the custom jobs, you will need to run the Quick Repair and Rebuild script found in the admin section.
SQL
Script required to import the entry from the schedulers table.
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Delivery_and_Deployment_Guide_for_Enterprises/index.html |
4f9ecdf775e8-0 | Composer
Overview
Composer dependency management is the de facto standard for managing PHP dependencies. Sugar platform ships with all required code bundled and optimied together for our developers. The installer will, however, deploy both composer.json and composer.lock in the web root directory as a reference of all dependencies which are controlled by Composer.
Autoloader
Sugar has a custom autoloader that is PSR-0 and PSR-4 compliant and integrates with Composer's mapping definitions.
Integrations
When updating the Composer configuration, Composer will generate different mappings based on the settings of every dependency:
Class map
PSR-0 map
PSR-4 map
Include paths (deprecated)
SugarCRM's autoloader uses those generated maps directly to initialize itself and to figure out how to load different classes.
Internals | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Composer/index.html |
4f9ecdf775e8-1 | Internals
To prevent endless file stats, Sugar's autoloader maintains a full list of all files at its disposal. This list is only generated once and is maintained in ./cache/file_map.php. Most of the Sugar codebase uses the autoloader to determine whether a file is available rather than performing expensive file_exists calls.
A second file, stored in ./cache/class_map.php , maintains a flat list of class-name-to-file mappings. When you make any changes to the file system, clear both files before testing new code.
Optimization | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Composer/index.html |
4f9ecdf775e8-2 | Optimization
When updating dependencies through Composer, Sugar team uses the optimize flag: composer update --optimize-autoloader --no-dev". Â By doing so, Composer will scan all files in the packages it manages and create a full list of PSR-0 and PSR-4 class name to file mappings, instead of performing this lookup on the fly by the autoloader itself on runtime.
Frequently Asked Questions
Is the composer package required to install a Sugar instance?
No. The Sugar installer ships with all required code bundled together. The installer process does not execute any Composer commands. The installer will deploy both composer.json and composer.lock in the web root directory as a reference of all dependencies which are controlled by Composer.
Why does Sugar ship ./composer.json and ./composer.lock if the installer doesn't rely on them? | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Composer/index.html |
4f9ecdf775e8-3 | Composer is used internally during development to manage Sugar's dependencies on third-party libraries and packages. The Composer files are shipped during development to manage Sugar's dependencies on third-party libraries and packages. The composer files are shipped with the product to give our customers the ability to expand from them.
Is the Composer package required to upgrade a Sugar instance?
No. The Sugar upgrader ships, just like the installer, with all required code bundled together. The upgrade process will validate the present Composer configuration and verify if it is compatible with the upgrade. In the case of a custom configuration, the upgrade process will report any issues which need to be resolved by the system administrator before the upgrade can proceed.
Why are there no wildcards in the version constraints? Doesn't composer.lock keep track of exact version numbers? | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Composer/index.html |
4f9ecdf775e8-4 | The lock file is designed to lock the dependencies to a specific version, but to protect our customers from unintentionally pulling in newer versions of dependencies owned by SugarCRM, we have chosen to use explicit version numbers in the composer.json file too.
May I change the version number of a package?
You cannot change version numbers for packages added by Sugar. Sugar will always configure exact version numbers for all of its dependencies. Changing these version numbers will result in an unsupported platform. The version constraints of packages not owned by Sugar may be modified at the developer's discretion.
Can I use Composer's autoloader? | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Composer/index.html |
4f9ecdf775e8-5 | Can I use Composer's autoloader?
We strongly recommend against using Composer's autoloader. The Sugar autoloader is fully compatible with the PSR-0 and PSR-4 autoloading recommendations from PHP-FIG, which makes the registration of an additional autoloader like the one from Composer redundant. Sugar's autoloader consumes the different mappings which are generated by Composer directly.
How can I optimize the autoloader?
Sugar ships with an optimized class map out of the box, which is pre-generated through Composer. This class map contains all different class to file mappings known to the dependencies managed by Composer. When customizing the Composer configuration, it is sufficient to run composer update --optimize-autoloader which will refresh the class map. SugarCRM's autoloader takes full advantage of this optimization. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Composer/index.html |
4f9ecdf775e8-6 | Can I load customizations in Sugar through Composer?
Although not yet available out of the box, we are investigating this as a future capability.
Can I move the vendor directory out of the web root?
You cannot currently move the vendor directory, but we are investigating this as a future capability.
The Composer integration in Sugar is not flexible enough for me. What can I do?
We continuously strive to make our platform better and to facilitate both end users and developers. Our goal is to deliver a state-of-the-art environment. Do not hesitate to reach out to Sugar Support if we have overlooked your use case or if there too many constraints in the current implementation to make this a useful feature.
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Composer/index.html |
a6c87b1ffede-0 | Sugar 12.3 to 13.0 Migration Guide
Overview
The purpose of this document is to provide insight to Sugar Developers for upgrading custom Sugar code, extensions, and integrations to the Sugar 13.0 (Q2 2023) release.Â
Cloud and On-Site Sugar Release
For those looking to upgrade from Sugar 12.0, you will be catching up with additional content released in the 12.1 (Q3 2022), 12.2 (Q4 2022), and 12.3 (Q1 2023) cloud-only Sugar releases. In addition to this guide, please review the Sugar 12.1, Sugar 12.2, and Sugar 12.3 migration guides and the release notes linked below to get a full view of changes since Sugar 12.0.
REST API Version Number
The current version for the Sugar REST API is 11_20. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Migration_Guide/index.html |
a6c87b1ffede-1 | The current version for the Sugar REST API is 11_20.Â
Changes That May Affect Developers
The changes in Sugar 13.0 (Q2 2023) that could cause an immediate impact on customizations and integrations that were built for earlier versions of Sugar are highlighted in the following Developer Blog post in the SugarClub community:Â
Sugar 13.0 (Q2 2023) Customization Guide
Related Documents
For more information about what changed in Sugar 13.0.x, please refer to the following related documents:
What to Expect When Upgrading to Sugar 13.0 (Q2 2023)
13.0.0 Upgrade Paths
13.0 Installation and Upgrade Guide
13.0.x Supported Platforms
Release Notes
Sugar Sell 13.0.0 Release Notes
Sugar Serve 13.0.0 Release Notes
Sugar Enterprise 13.0.0 Release Notes | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Migration_Guide/index.html |
a6c87b1ffede-2 | Sugar Enterprise 13.0.0 Release Notes
Last modified: 2023-04-05 00:05:28 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Migration_Guide/index.html |
de6527dc9b3e-0 | Development Methodology
Overview
This page discusses standard practices that we recommend for improving the success rates of Sugar development projects.Â
Development Best Practices
When developing Sugar® customizations as part of an on-site CRM project implementation, we recommended placing the entire Sugar application filesystem under source code management. Sugar developers know that customizations made to Sugar are placed under the ./custom/ directory. But during the lifecycle of a CRM implementation, you will need to upgrade Sugar versions, which will change core files. Many projects will also need to track other related project files that may not all be Sugar platform code. For example, pre-flight SQL scripts, data migration scripts, Web server configuration settings, etc. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-1 | For SugarCloud projects and ISVs, if you are building a custom module package or integration designed to be installed into many Sugar instances (including SugarCloud instances), then tracking only ./custom/ directory files should be enough.
Using .gitignore Files
Today, many developers choose to use Git as their source control management. There are certain Sugar application files that you do not want to track; most of these are generated files that are created at runtime or are Sugar instance-specific configuration files.
Below is a sample .gitignore file that you can use or adapt to the source control management system of your choice.
*.log
/.htaccess
/config.php
/config_override.php
/cache
/upgrades/module
/upload
/custom/blowfish
/custom/history
/custom/application/Ext
/custom/modules/*/Ext
/custom/Extension/**/*orderMapping.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-2 | /custom/Extension/**/*orderMapping.php
Recommendations for Development Teams
Code quality is important to maintain because Sugar customizations run in the same environment as the rest of the Sugar application. Here are a few best practices to help development teams uphold code quality.
Adopt an appropriate Git workflow for development. For reference, see Atlassian's tutorial on Git workflow options.
Develop within feature branches that are tested before being merged back into master to keep master stable.
Avoid workflows that involve developers committing directly into the master branch to prevent code destabilization.
Development teams should always perform code reviews before merging in new code.
Deploying Sugar Code
Where you plan to deploy Sugar code is the biggest factor in determining how Sugar code should be deployed and how your project should be managed. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-3 | Are you working on a Sugar project for an on-premise Sugar implementation? Are you working on a custom module that you plan on distributing through SugarExchange? Are you planning a solely REST API integration? The answers to these questions guide how you should develop and deploy Sugar code.
Sugar on-site projects : Develop these customizations using the exact version and flavor of Sugar that you plan to use in production.
SugarCloud projects : Develop these customizations on the latest available version of Sugar for the particular flavor the customer has purchased.
Custom modules or integrations : If you plan on distributing your customization to many Sugar customers via SugarExchange or channel partners, design your customization with Sugar's cloud service in mind.
Sugar's cloud service is more restrictive than our on-site installs regarding supported customizations. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-4 | Sugar's cloud service is more restrictive than our on-site installs regarding supported customizations.
A customization designed for Sugar's cloud service can be supported in Sugar on-site instances, but the inverse is not always true.
For more information on Sugar's cloud service restrictions, please refer to the SugarCloud Policy Guide.
Packaging
The packaging of customizations is not a concern for many Sugar projects. Many projects just use Git (or some other file version control) to manage the distribution and deployment of Sugar code customizations. However, there are situations where the packaging of Sugar customizations is necessary. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-5 | If you plan on distributing Sugar custom code, then you must package your customization as a Module Loadable Package (a .zip file that includes all custom code along with a manifest file). It is easy to write a script to build a module loadable package either from custom directory content or by extracting customizations out of a development environment. See examples on Github here and here.
Note: Sugar Sell Essentials customers do not have the ability to upload custom file packages to Sugar using Module Loader.
In some Enterprise environments, changes are tightly controlled, and ownership of various Sugar application components may be spread across multiple teams, requiring a coordinated deployment. For example, a Database Administrator (DBA) may be responsible for implementing database schema (DDL) changes and a System Administrator may be responsible for implementing file system changes.
For these situations:
File system changes can be accounted for using Git to determine the difference between current production state and the latest changes to be deployed. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-6 | DDL changes can be accounted for via deploying latest file system changes on a clone of Sugar production instance and running Quick Repair command. Sugar will prompt you with any DDL changes that need to be made that you can then capture and share with your DBA.
Data Manipulation Language (DML) changes, if necessary, should be managed within SQL or PHP scripts.
Deployment
If using the traditional Git-based deployment, then deploying new Sugar code is as easy as checking out the latest branch and then running Quick Repair and Rebuild. Run the quick repair from the Sugar user interface, or script it for fully automated deployment.
When deploying to an instance on Sugar's cloud service, it is necessary to install the package manually using Module Loader. It is not possible to automate the deployment of packages into instances on Sugar's cloud service. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-7 | In a coordinated deployment, database changes should be deployed first, followed by filesystem changes, followed by a Quick Repair (if permitted) to clear system caches. You can clear caches manually by deleting the contents of the ./cache/ directory and then truncate the metadata_cache table in the Sugar database. The Sugar application regenerates these caches as needed.
Using Sugar Studio to deploy changes into new environments (especially Production) is not recommended. Manually re-creating customizations using the Studio user interface can be error-prone. It also runs the risk of inadvertently overwriting other code customizations. It may be initially slower to create a custom field, etc. manually using extensions on filesystem but, in the long run, you benefit from better change management and automation.
Managing Multiple Environments | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-8 | Managing Multiple Environments
CRMs are business-critical applications so development should never be performed directly on your production environment. A typical Sugar project involves multiple staging environments as well as individual development environments that each Sugar developer uses for actual coding.
SugarCRM recommends 4 different environments:
Production environment : used by real users
User Acceptance Test (UAT) environment : used by business stakeholders to sign off on changes that go into production
Quality Assurance environment : used for test and validation of new features and bug fixes
Development environments : used by individual Sugar developers to create and test code (often running on a local laptop or PC)
Code changes that flow upstream from a development environment should not be allowed into production without going through quality assurance (QA) and user acceptance testing (UAT) first. The intermediate environments serve as gates between development and production that help intercept problems before they reach production. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-9 | User and CRM data that needs to flow downstream from production environment should pass through intermediate environments as well to ensure consistency and that it is cleaned or anonymized of any personally identifiable or sensitive information.
Consistency
Maintaining as much consistency as possible for each of these environments is essential. Inconsistent environments can create issues where bugs are reproducible in one environment and not others (for example, a bug that only appears in production). Many times, these bugs are traced to configuration parameters that are not directly related to Sugar or the features and customizations under development.
To replicate your production environment as accurately as possible, we recommend you use VM or container technology in your development and QA environments.
Your UAT environment should match the infrastructure of your production environment. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-10 | Your UAT environment should match the infrastructure of your production environment.
SugarCRM uses a variety of container technologies in developing the core Sugar application and for working on Sugar projects. In particular, we use Virtual Box, VMWare, Amazon AMIs, Docker containers, Vagrant, and Packer. SugarCRM Engineering also uses Puppet to centrally manage the provisioning and configuration of all these different environments.
Testing
SugarCRM recommends using a variety of testing methods to ensure the quality of your Sugar project. Perform unit testing, functional testing (either manual or GUI automation), system integration testing, user acceptance testing, and performance testing.
Unit testing should be applied to ensure that even the smallest code units within your application are behaving as expected.
Functional testing should be performed to ensure that each feature and function behaves the way it was designed. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-11 | System Integration testing should be performed to ensure that Sugar co-exists with external systems and that data flows between all these systems successfully.
User acceptance testing should be performed by key stakeholders to ensure that your project is meeting business requirements.
Performance testing should be performed to ensure that the Sugar application's responsiveness meets user expectations and that the application continues to scale.
In our experience, neglecting any of these tests can negatively impact a Sugar project in terms of maintainability, customer satisfaction, and business success.Â
In the next section, we introduce some tools and open-source resources that can help you start a QA practice for your project.
Sugar Test Tools | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-12 | Sugar Test Tools
For Sugar customers and partners, SugarCRM provides Test Tools that can be used to verify and perform quality assurance on Sugar customizations. Use of Sugar test technology requires familiarity with PHPUnit for PHP unit testing, Jasmine for JavaScript unit testing, and Apache JMeter for performance load testing.
Sugar Unit Tests
The Sugar Unit Test suites are the automated unit tests developed and maintained by SugarCRM Engineering during the process of building and releasing each new Sugar release. As part of our development process, these tests are required to run "green" (100% passing) at all times on each master release branch. Essentially, these tests form a regression test suite for an uncustomized version of Sugar running in our controlled build environment.
With that understanding, here is a recommended approach to take advantage of these unit tests. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-13 | With that understanding, here is a recommended approach to take advantage of these unit tests.
Run test suite against an uncustomized copy of Sugar in your development environment to establish a baseline. Not all tests may immediately pass; some may fail due to configuration differences between your development environment and SugarCRM Engineering's controlled build environment.
Correct any observed failures or skip/remove the failing tests to create a base test suite that is 100% passing.
As you develop customizations on Sugar, ensure that your base test suite continues to pass.
Create new tests for new code customizations that you create.
Sugar Performance Tests
Instead of sanitizing data from a production environment for purposes of load testing, SugarCRM provides an open source tool called Tidbit that can be used to generate pseudo-random data to populate a Sugar instance with representable data. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-14 | We also provide Apache JMeter scenarios to Sugar customers and partners who request access. These JMeter scenarios can be used to drive a simulated load against the Sugar REST API interface used by Sugar. They can validate that your customizations have not had an unexpected impact on the performance of a Sugar instance.
DevOps
In order to facilitate and streamline development processes, Sugar recommends implementing DevOps automation. Use a tool such as Jenkins to orchestrate test automation, stage changes in any environment (dev, QA, UAT, and prod) for manual verification, and manage the promotion of changes from one environment to the next.
Perform automated tests (e.g. unit tests) on each commit.
Stage development changes on at least a nightly basis for use by QA or demos.
Automate the rollback of changes in any environment as needed.
Automate notifications to affected and responsible parties whenever a test fails, or a build fails to deploy. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-15 | Co-Existing with Studio Customizations
Sugar Studio and Module Builder enable administrator users to implement quick changes to a Sugar environment. But Sugar Studio lacks the rigorous change control that larger CRM projects need. Sometimes, Studio changes can even break code-level Sugar customizations. For this reason, we often discourage using Studio on heavily customized Sugar instances.
However, if Sugar Studio is an important up-front requirement for a CRM project, then there are strategies you can adopt for your customizations to avoid conflicts.
Sugar Studio can be used to modify the layouts, fields, and relationships for the majority of modules in Sugar. Module Builder can be used to define new modules along with their layouts, fields, and relationships. In practice, this means that the fields and layouts for any module's record view, list view, mobile view, and subpanels can be customized using simple administration tools. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-16 | Studio users, therefore, could potentially break code customizations that are reliant on a particular field or having a field on a particular layout or location. Here are some practices to avoid conflicts between Studio customizations and custom code:
Avoid custom record, list, and subpanel view controllers because Studio users can change fields and layouts that affect expectations within your controller code.
Avoid custom record validations because Studio users can change fields and layouts that affect expectations within your validation code.
Avoid hard-coded integrations that rely on a particular field because Studio users can change fields that affect expectations within your integration.
Avoid new field and relationship vardefs customizations because Studio users can create new fields and relationships.
Avoid viewdefs customizations for record, list, and subpanel layouts because Studio users perform these customizations. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
de6527dc9b3e-17 | Many customizations have a smaller risk of side effects related to Studio customizations. Here is a list of some changes that administrator users cannot perform via Studio:
Adding custom dashlets
Adding custom layouts or additions to footer or header
Adding custom actions in record view action dropdown
Adding metadata-aware integrations that discover fields and modules on the system
Adding logic hooks
Conversely, certain customizations can provide Studio users with additional tools:
Adding custom Sugar Logic functions
Adding custom Sugar field types
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Introduction/Development_Methodology/index.html |
3e8f59072df9-0 | Cookbook
Welcome to the SugarCRM Developer Cookbook! This library is filled with real-world code examples for common Sugar customizations and best practices. Sugar's DevClub is always cooking up new ideas, so be sure to check in often and see what's new. Get started by browsing the categories below. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/index.html |
3e8f59072df9-1 | TopicsAdding Buttons to the Record ViewThis example explains how to create additional buttons on the record view and add events. We will extend and override the stock Accounts record view to add a custom button. The custom button will be called "Validate Postal Code" and ping the Zippopotamus REST service to validate the records billing state and postal code.Adding Field Validation to the Record ViewThis page explains how to add additional field validation to the record view. In the following examples, we will extend and override the stock Accounts record view to add custom validation. The custom validation will require the Office Phone field when the account type is set to "Customer" and also require the user to enter at least one email address.Adding an Existing Note to an Email as AttachmentThere may be times when you want to reuse a file attached to one Note record as an attachment for an Email, similar to the ability in the Compose Email view to add an attachment using 'Sugar | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/index.html |
3e8f59072df9-2 | Email, similar to the ability in the Compose Email view to add an attachment using 'Sugar Document'.Adding the Email Field to a BeanThis example explains how to add an emails field for modules that don't extend the Person module template. We will create an email field and bring the email functionality module bean. The steps are applicable for stock and custom modules. In this example, we will add the email field into the Opportunities module.Converting Address' Country Field to a DropdownAddress fields in Sugar® are normally text fields, which allow users to enter in the appropriate information (e.g. street, city, and country) for the record. However, with multiple users working in Sugar, it is possible for data (e.g. country) to be entered in a variety of different ways (e.g. USA, U.S.A, and United States) when creating or editing the record. This can cause some issues when creating a report grouped by | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/index.html |
3e8f59072df9-3 | States) when creating or editing the record. This can cause some issues when creating a report grouped by the Billing Country field, for example, as records with the same country will be grouped separately based on the different ways the country was entered.Changing the Default Module When Logging a New Call or MeetingWhen creating a call or meeting directly from the Calls or Meetings module in Sugar, the default module for the Related To field is Accounts. If your sales team frequently schedules calls and meetings related to records from a module other than Accounts, it may make sense to adjust the behavior so that the Related To field defaults to a more commonly used module. This article covers how to change the default related module for calls and meetings in Sugar.Creating Custom Field TypesIn this example, we create a custom field type called "Highlightfield", which will mimic the base text field type with the added feature that the displayed text for the field will be highlighted in a color chosen when the field is created in | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/index.html |
3e8f59072df9-4 | that the displayed text for the field will be highlighted in a color chosen when the field is created in Studio.Creating an Auto-Incrementing FieldThis article will cover the two approaches to creating an auto-incrementing field in Sugar.Customizing Prefill Fields When Copying RecordsThe copy action on the record view allows for users to duplicate records. This article will cover the various ways to customize the prefill fields on the copy view.Customizing the Email Editor ButtonsThe Emails module in Sugar® displays commonly-used buttons in the HTML editor. This article explains how to modify the buttons on the editor's toolbar.Customizing the Start Speed of List View SearchWhen searching a Sidecar module's list view, Sugar® begins returning results automatically once a predefined number of milliseconds have passed. This article covers how to customize the start speed of the list view search for Sidecar modules in Sugar.Disabling RLI Alerts on OpportunitiesHow to disable Revenue Line Item | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/index.html |
3e8f59072df9-5 | modules in Sugar.Disabling RLI Alerts on OpportunitiesHow to disable Revenue Line Item (RLI) alerts on Opportunities using a custom JavaScript controller.Disabling TooltipsThis article will demonstrate how to disable the tooltips in Sugar.Dynamically Hiding Subpanels Based on Record ValuesThis article will demonstrate how to dynamically hide subpanels that are dependent on record values by overriding the subpanels layout for a module. This example is for an account record where we will hide the Contacts subpanel when the account type is not 'Customer'.Enabling Importing for Custom ModulesWhen designing a custom module in Module Builder, you have the option to enable importing for the module. If the custom module is deployed without enabling this option, it is not recommended that you redeploy the module since any changes made in Studio and potentially other areas of the application could be lost. This article will cover how to enable importing for custom modules via a code-level change to preserve | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/index.html |
3e8f59072df9-6 | This article will cover how to enable importing for custom modules via a code-level change to preserve any additional configurations made to the module since being deployed from Module Builder.Increasing the Number of Dashboards Displayed in the Home MenuBy default, the "Home Dashboard" comes out-of-the-box with Sugar® to display on the home page. In addition, Sugar users with a Sugar Serve and/or Sugar Sell license type will have access to specialized Home page dashboards called "Service Console" and "Renewals Console". Users have the ability to create new dashboards on their home page and build out its layout and dashlet set. Currently, Sugar imposes a limit of 50 dashboards that can be displayed under the Home module tab. So, when creating multiple dashboards, keep in mind that having more than 50 in the list of available dashboards will cause the ones in the beginning to be dropped off the list. This article covers how to increase the number of | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/index.html |
3e8f59072df9-7 | ones in the beginning to be dropped off the list. This article covers how to increase the number of dashboards allowed in the Home menu via a code-level customization.Logic HooksThese pages demonstrate some common examples of working with logic hooks in Sugar.Modifying Calendar Item ColorsEach calendar event type (Meetings, Calls, and Tasks) has its own distinct color scheme. This article will review how to modify these colors, as well as demonstrate how to set the event color based on the event status.Modifying Layouts to Display Additional ColumnsBy default, the record view layout for each module displays two columns of fields. The number of columns to display can be customized on a per-module basis with the following steps.Modifying Subpanel ButtonsSeveral buttons exist on each subpanel by default such as "Create" (+ Plus symbol) and "Link Existing Record". These buttons are controlled by the panel-top view for each module. To make changes to the buttons | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/index.html |
3e8f59072df9-8 | These buttons are controlled by the panel-top view for each module. To make changes to the buttons included in a subpanel layout, you will need to create an override for the panel-top view in ./custom/Extension/modules/<module>/Ext/clients/base/views/panel-top/ and update the corresponding buttons property to include or exclude a button.Module Loadable PackagesExamples working with the module loadable packages.Moving Footer content to Sidebar NavThis example explains how to add additional buttons to a new section in the sidebar nav layout. You may have previously customized a button that was added to the footer layout, which can be repurposed here and added to the sidebar-nav layout. We will create a custom view and append the view component to the sidebar-nav layout metadata. The additional button will merely show an alert and a flyout menu with a link to the Accounts module but can be expanded to do much | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/index.html |
3e8f59072df9-9 | alert and a flyout menu with a link to the Accounts module but can be expanded to do much more.Passing Data to TemplatesThis page explains how to create a custom view component that passes data to the Handlebars template.Prepopulating the Compose Email ViewWhen composing an email in Sugar, it may be useful to modify the compose view to better suit your common business practices. In this article, we will use JavaScript to create a code-level customization which causes the To, CC, and Subject fields of the email to prepopulate with data from a related Opportunity.Refreshing Subpanels on the RecordViewHow to refresh specific subpanels on the Record View.Removing the Account Requirement on OpportunitiesThis article covers how to remove the Account field from being required on the Opportunities module.Web ServicesExamples when working with Sugar's web service endpoints. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/index.html |
3e8f59072df9-10 | Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/index.html |
2b10ebc7b4e2-0 | Web Services
Examples when working with Sugar's web service endpoints.
TopicsREST APIExamples of integrating with Sugar REST APIs.Legacy APIExamples of the legacy v4_1 web service endpoints.
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/index.html |
a1cf507d6c9b-0 | This API has been succeeded by a new version. It is recommended to upgrade to the latest API.
Legacy API
Examples of the legacy v4_1 web service endpoints.
TopicsRESTExamples of v4.1 REST API calls.SOAPExamples of v4.1 SOAP API calls.
Last modified: 2023-02-03 21:09:36 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/index.html |
ef226d8a483c-0 | This API has been succeeded by a new version. It is recommended to upgrade to the latest API.
SOAP
Examples of v4.1 SOAP API calls.
TopicsC#C# SOAP v4_1 Examples.
Last modified: 2023-02-03 21:09:36 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/SOAP/index.html |
64a83025f021-0 | This API has been succeeded by a new version. It is recommended to upgrade to the latest API.
C#
C# SOAP v4_1 Examples.
TopicsCreating or Updating a RecordA C# example demonstrating how to create or update an account with the set_entry method using SOAP and the v4 SOAP API.Logging InA C# example demonstrating how to log in and retrieve a session key using SOAP and the v4 SOAP API.
Last modified: 2023-02-03 21:09:36 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/SOAP/C_sharp/index.html |
71262fde3c64-0 | This API has been succeeded by a new version. It is recommended to upgrade to the latest API.
Logging In
Overview
A C# example demonstrating how to log in and retrieve a session key using SOAP and the v4 SOAP API.
Example
using System;
using System.Text;
using System.Security.Cryptography;
namespace SugarSoap
{
class Program
{
static void Main(string[] args)
{
string UserName = "admin";
string Password = "password";
string URL = "http://{site_url}/service/v4/soap.php";
string SessionID = String.Empty;
//SugarCRM is a web reference added that points to http://{site_url}/service/v4/soap.php?wsdl | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/SOAP/C_sharp/Logging_In/index.html |
71262fde3c64-1 | SugarCRM.sugarsoap SugarClient = new SugarCRM.sugarsoap();
SugarClient.Timeout = 900000;
SugarClient.Url = URL;
//Create authentication object
SugarCRM.user_auth UserAuth = new SugarCRM.user_auth();
//Populate credentials
UserAuth.user_name = UserName;
UserAuth.password = getMD5(Password);
//Try to authenticate
SugarCRM.name_value[] LoginList = new SugarCRM.name_value[0];
SugarCRM.entry_value LoginResult = SugarClient.login(UserAuth, "SoapTest", LoginList);
//get session id
SessionID = LoginResult.id;
if (SessionID != String.Empty)
{
//print session | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/SOAP/C_sharp/Logging_In/index.html |
71262fde3c64-2 | if (SessionID != String.Empty)
{
//print session
Console.WriteLine(SessionID);
}
//Pause Window
Console.ReadLine();
}
static private string getMD5(string TextString)
{
MD5 md5 = MD5.Create();
byte[] inputBuffer = System.Text.Encoding.ASCII.GetBytes(TextString);
byte[] outputBuffer = md5.ComputeHash(inputBuffer);
StringBuilder Builder = new StringBuilder(outputBuffer.Length);
for (int i = 0; i < outputBuffer.Length; i++)
{
Builder.Append(outputBuffer[i].ToString("X2"));
}
return Builder.ToString().ToLower(); //lowercase as of 7.9.0.0
} | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/SOAP/C_sharp/Logging_In/index.html |
71262fde3c64-3 | }
}
}
Note:Â As of 7.9.0.0, the md5 of the password must be lowercase.
Result
b2uv0vrjfiov41d03sk578ufq6
Â
Last modified: 2023-02-03 21:09:36 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/SOAP/C_sharp/Logging_In/index.html |
b09712f07b03-0 | This API has been succeeded by a new version. It is recommended to upgrade to the latest API.
Creating or Updating a Record
Overview
A C# example demonstrating how to create or update an account with the set_entry method using SOAP and the v4 SOAP API.
Example
using System;
using System.Text;
using System.Security.Cryptography;
using System.Collections.Specialized;
namespace SugarSoap
{
class Program
{
static void Main(string[] args)
{
//login -----------------------------------------
string UserName = "admin";
string Password = "password";
string URL = "http://{site_url}/service/v4/soap.php"; | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/SOAP/C_sharp/Creating_or_Updating_a_Record/index.html |
b09712f07b03-1 | //SugarCRM is a web reference added that points to http://{site_url}/service/v4/soap.php?wsdl
SugarCRM.sugarsoap SugarClient = new SugarCRM.sugarsoap();
SugarClient.Timeout = 900000;
SugarClient.Url = URL;
string SessionID = String.Empty;
//Create authentication object
SugarCRM.user_auth UserAuth = new SugarCRM.user_auth();
//Populate credentials
UserAuth.user_name = UserName;
UserAuth.password = getMD5(Password);
//Try to authenticate
SugarCRM.name_value[] LoginList = new SugarCRM.name_value[0]; | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/SOAP/C_sharp/Creating_or_Updating_a_Record/index.html |
b09712f07b03-2 | SugarCRM.entry_value LoginResult = SugarClient.login(UserAuth, "SoapTest", LoginList);
//get session id
SessionID = LoginResult.id;
//create account --------------------------------
NameValueCollection fieldListCollection = new NameValueCollection();
//to update a record, you will nee to pass in a record id as commented below
//fieldListCollection.Add("id", "68c4781f-75d1-223a-5d8f-5058bc4e39ea");
fieldListCollection.Add("name", "Test Account");
//this is just a trick to avoid having to manually specify index values for name_value[]
SugarCRM.name_value[] fieldList = new SugarCRM.name_value[fieldListCollection.Count];
int count = 0; | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/SOAP/C_sharp/Creating_or_Updating_a_Record/index.html |
b09712f07b03-3 | int count = 0;
foreach (string name in fieldListCollection)
{
foreach (string value in fieldListCollection.GetValues(name))
{
SugarCRM.name_value field = new SugarCRM.name_value();
field.name = name; field.value = value;
fieldList[count] = field;
}
count++;
}
try
{
SugarCRM.new_set_entry_result result = SugarClient.set_entry(SessionID, "Accounts", fieldList);
string RecordID = result.id;
//show record id to user
Console.WriteLine(RecordID);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.WriteLine(ex.Source); | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/SOAP/C_sharp/Creating_or_Updating_a_Record/index.html |
b09712f07b03-4 | Console.WriteLine(ex.Source);
}
//Pause Window
Console.ReadLine();
}
static private string getMD5(string PlainText)
{
MD5 md5 = MD5.Create();
byte[] inputBuffer = System.Text.Encoding.ASCII.GetBytes(PlainText);
byte[] outputBuffer = md5.ComputeHash(inputBuffer);
//Convert the byte[] to a hex-string
StringBuilder builder = new StringBuilder(outputBuffer.Length);
for (int i = 0; i < outputBuffer.Length; i++)
{
builder.Append(outputBuffer[i].ToString("X2"));
}
return Builder.ToString().ToLower(); //lowercase as of 7.9.0.0
}
} | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/SOAP/C_sharp/Creating_or_Updating_a_Record/index.html |
b09712f07b03-5 | }
}
}
Result
68c4781f-75d1-223a-5d8f-5058bc4e39ea
Â
Last modified: 2023-02-03 21:09:36 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/SOAP/C_sharp/Creating_or_Updating_a_Record/index.html |
69e810841c9b-0 | This API has been succeeded by a new version. It is recommended to upgrade to the latest API.
REST
Examples of v4.1 REST API calls.
TopicsPHPPHP v4_1 REST Examples.
Last modified: 2023-02-03 21:09:36 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/index.html |
c3b7e9104ad8-0 | This API has been succeeded by a new version. It is recommended to upgrade to the latest API.
PHP
PHP v4_1 REST Examples. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/index.html |
c3b7e9104ad8-1 | TopicsCreating DocumentsA PHP example demonstrating how to create a document using set_entry and a document revision with the set_document_revision method using cURL and the v4_1 REST API.Creating Notes with AttachmentsA PHP example demonstrating how to create a note using set_entry and add an attachment with the set_note_attachment method using cURL and the v4_1 REST API.Creating or Updating a RecordA PHP example demonstrating how to create or update an Account with the set_entry method using cURL and the v4_1 REST API.Creating or Updating Multiple RecordsA PHP example demonstrating how to create or update multiple contacts with the set_entries method using cURL and the v4_1 REST API.Creating or Updating TeamsA PHP example demonstrating how to manipulate teams using cURL and the v4_1 REST API.Logging InA PHP example demonstrating how to log in and retrieve a session key using | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/index.html |
c3b7e9104ad8-2 | REST API.Logging InA PHP example demonstrating how to log in and retrieve a session key using cURL and the v4_1 REST API.Relating Quotes and ProductsA PHP example demonstrating how to create and relate Products to Quotes using cURL and the v4_1 REST API.Retrieving a List of Fields From a ModuleA PHP example demonstrating how to retrieve fields vardefs from the accounts module with the get_module_fields method using cURL and the v4_1 REST API.Retrieving a List of RecordsA PHP example demonstrating how to retrieve a list of records from a module with the get_entry_list method using cURL and the v4_1 REST API.Retrieving a List of Records With Related InfoA PHP example demonstrating how to retrieve a list of records with info from a related entity with the get_entry_list method using cURL and the v4_1 REST API.Retrieving Email AttachmentsA | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/index.html |
c3b7e9104ad8-3 | method using cURL and the v4_1 REST API.Retrieving Email AttachmentsA PHP example demonstrating how to retrieve an email and its attachments from using the get_entry and get_note_attachment methods using cURL and the v4_1 REST API.Retrieving Multiple Records by IDA PHP example demonstrating how to retrieve multiple records from the accounts module with the get_entries method using cURL and the v4_1 REST API.Retrieving Records by Email DomainA PHP example demonstrating how to retrieve email addresses based on an email domain with the search_by_module and get_entries methods using cURL and the v4_1 REST API.Retrieving Related RecordsA PHP example demonstrating how to retrieve a list of related records with the get_relationships method using cURL and the v4_1 REST API.Searching RecordsA PHP example demonstrating how to search the accounts module with the search_by_module method using cURL and | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/index.html |
c3b7e9104ad8-4 | example demonstrating how to search the accounts module with the search_by_module method using cURL and the v4_1 REST API. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/index.html |
c3b7e9104ad8-5 | Last modified: 2023-02-03 21:09:36 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/index.html |
8bf227cf7260-0 | This API has been succeeded by a new version. It is recommended to upgrade to the latest API.
Logging In
Overview
A PHP example demonstrating how to log in and retrieve a session key using cURL and the v4_1 REST API.
Standard Authentication Example
<?php
$url = "http://{site_url}/service/v4_1/rest.php";
$username = "admin";
$password = "password";
//function to make cURL request
function call($method, $parameters, $url)
{
ob_start();
$curl_request = curl_init();
curl_setopt($curl_request, CURLOPT_URL, $url);
curl_setopt($curl_request, CURLOPT_POST, 1); | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Logging_In/index.html |
8bf227cf7260-1 | curl_setopt($curl_request, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($curl_request, CURLOPT_HEADER, 1);
curl_setopt($curl_request, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl_request, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_request, CURLOPT_FOLLOWLOCATION, 0);
$jsonEncodedData = json_encode($parameters);
$post = array(
"method" => $method,
"input_type" => "JSON",
"response_type" => "JSON",
"rest_data" => $jsonEncodedData
); | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Logging_In/index.html |
8bf227cf7260-2 | "rest_data" => $jsonEncodedData
);
curl_setopt($curl_request, CURLOPT_POSTFIELDS, $post);
$result = curl_exec($curl_request);
curl_close($curl_request);
$result = explode("\r\n\r\n", $result, 2);
$response = json_decode($result[1]);
ob_end_flush();
return $response;
}
//login ------------------------------
$login_parameters = array(
"user_auth" => array(
"user_name" => $username,
"password" => md5($password),
"version" => "1"
),
"application_name" => "RestTest", | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Logging_In/index.html |
8bf227cf7260-3 | ),
"application_name" => "RestTest",
"name_value_list" => array(),
);
$login_result = call("login", $login_parameters, $url);
echo "<pre>";
print_r($login_result);
echo "</pre>";
//get session id
$session_id = $login_result->id;
?>
LDAP Authentication Example
<?php
$url = "http://{site_url}/service/v4_1/rest.php";
$username = "admin";
$password = "password";
$ldap_enc_key = 'LDAP_ENCRYPTION_KEY';
//function to make cURL request
function call($method, $parameters, $url)
{ | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Logging_In/index.html |
8bf227cf7260-4 | function call($method, $parameters, $url)
{
ob_start();
$curl_request = curl_init();
curl_setopt($curl_request, CURLOPT_URL, $url);
curl_setopt($curl_request, CURLOPT_POST, 1);
curl_setopt($curl_request, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($curl_request, CURLOPT_HEADER, 1);
curl_setopt($curl_request, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl_request, CURLOPT_RETURNTRANSFER, 1); | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Logging_In/index.html |
8bf227cf7260-5 | curl_setopt($curl_request, CURLOPT_FOLLOWLOCATION, 0);
$jsonEncodedData = json_encode($parameters);
$post = array(
"method" => $method,
"input_type" => "JSON",
"response_type" => "JSON",
"rest_data" => $jsonEncodedData
);
curl_setopt($curl_request, CURLOPT_POSTFIELDS, $post);
$result = curl_exec($curl_request);
curl_close($curl_request);
$result = explode("\r\n\r\n", $result, 2);
$response = json_decode($result[1]);
ob_end_flush();
return $response;
} | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Logging_In/index.html |
8bf227cf7260-6 | ob_end_flush();
return $response;
}
//login ---------------------------------
$ldap_enc_key = substr(md5($ldap_enc_key), 0, 24);
$login_parameters = array(
"user_auth" => array(
"user_name" => $username,
"password" => bin2hex(mcrypt_encrypt(MCRYPT_3DES, $ldap_enc_key, $password, MCRYPT_MODE_CBC, "password")),
"version" => "1"
),
"application_name" => "RestTest",
"name_value_list" => array(),
);
/*
The mcrypt extension is deprecated as of PHP 7.1. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Logging_In/index.html |
8bf227cf7260-7 | /*
The mcrypt extension is deprecated as of PHP 7.1.
If on 7.1+, LDAP passwords will need to be sent unencrypted, with
$login_parameters["user_auth"]["encryption"] set to "PLAIN". An example is below:
$login_parameters = array(
"user_auth" => array(
"user_name" => $username,
"password" => $password,
"version" => "1",
"encryption" => "PLAIN"
),
"application_name" => "RestTest",
"name_value_list" => array(),
);
*/
$login_result = call("login", $login_parameters, $url);
echo "<pre>";
print_r($login_result); | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Logging_In/index.html |
8bf227cf7260-8 | echo "<pre>";
print_r($login_result);
echo "</pre>";
//get session id
$session_id = $login_result->id;
?>
Result
stdClass Object
(
[id] => lb7479svj8pjtf57ipmshepo80
[module_name] => Users
[name_value_list] => stdClass Object
(
[user_id] => stdClass Object
(
[name] => user_id
[value] => 1
)
[user_name] => stdClass Object
(
[name] => user_name
[value] => admin
)
[user_language] => stdClass Object
(
[name] => user_language
[value] => en_us | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Logging_In/index.html |
8bf227cf7260-9 | [name] => user_language
[value] => en_us
)
[user_currency_id] => stdClass Object
(
[name] => user_currency_id
[value] => -99
)
[user_is_admin] => stdClass Object
(
[name] => user_is_admin
[value] => 1
)
[user_default_team_id] => stdClass Object
(
[name] => user_default_team_id
[value] => 1
)
[user_default_dateformat] => stdClass Object
(
[name] => user_default_dateformat
[value] => m/d/Y
)
[user_default_timeformat] => stdClass Object
( | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Logging_In/index.html |
8bf227cf7260-10 | )
[user_default_timeformat] => stdClass Object
(
[name] => user_default_timeformat
[value] => h:ia
)
[user_number_seperator] => stdClass Object
(
[name] => user_number_seperator
[value] => ,
)
[user_decimal_seperator] => stdClass Object
(
[name] => user_decimal_seperator
[value] => .
)
[mobile_max_list_entries] => stdClass Object
(
[name] => mobile_max_list_entries
[value] => 10
)
[mobile_max_subpanel_entries] => stdClass Object
( | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Logging_In/index.html |
8bf227cf7260-11 | [mobile_max_subpanel_entries] => stdClass Object
(
[name] => mobile_max_subpanel_entries
[value] => 3
)
[user_currency_name] => stdClass Object
(
[name] => user_currency_name
[value] => US Dollars
)
)
)
Â
Last modified: 2023-02-03 21:09:36 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Logging_In/index.html |
51e606fd7f73-0 | This API has been succeeded by a new version. It is recommended to upgrade to the latest API.
Retrieving a List of Records With Related Info
Overview
A PHP example demonstrating how to retrieve a list of records with info from a related entity with the get_entry_list method using cURL and the v4_1 REST API.
This example will retrieve a list of contacts and their related email addresses.
Example
<?php
$url = "http://{site_url}/service/v4_1/rest.php";
$username = "admin";
$password = "password";
//function to make cURL request
function call($method, $parameters, $url)
{
ob_start();
$curl_request = curl_init();
curl_setopt($curl_request, CURLOPT_URL, $url); | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Retrieving_a_List_of_Records_With_Related_Info/index.html |
51e606fd7f73-1 | curl_setopt($curl_request, CURLOPT_POST, 1);
curl_setopt($curl_request, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($curl_request, CURLOPT_HEADER, 1);
curl_setopt($curl_request, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl_request, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_request, CURLOPT_FOLLOWLOCATION, 0);
$jsonEncodedData = json_encode($parameters);
$post = array(
"method" => $method,
"input_type" => "JSON", | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Retrieving_a_List_of_Records_With_Related_Info/index.html |
51e606fd7f73-2 | "method" => $method,
"input_type" => "JSON",
"response_type" => "JSON",
"rest_data" => $jsonEncodedData
);
curl_setopt($curl_request, CURLOPT_POSTFIELDS, $post);
$result = curl_exec($curl_request);
curl_close($curl_request);
$result = explode("\r\n\r\n", $result, 2);
$response = json_decode($result[1]);
ob_end_flush();
return $response;
}
//login ----------------------------------------------
$login_parameters = array(
"user_auth" => array(
"user_name" => $username,
"password" => md5($password), | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Retrieving_a_List_of_Records_With_Related_Info/index.html |
51e606fd7f73-3 | "password" => md5($password),
"version" => "1"
),
"application_name" => "RestTest",
"name_value_list" => array(),
);
$login_result = call("login", $login_parameters, $url);
/*
echo "<pre>";
print_r($login_result);
echo "</pre>";
*/
//get session id
$session_id = $login_result->id;
//retrieve records -------------------------------------
$get_entry_list_parameters = array(
//session id
'session' => $session_id,
//The name of the module from which to retrieve records
'module_name' => "Contacts",
//The SQL WHERE clause without the word "where". | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Retrieving_a_List_of_Records_With_Related_Info/index.html |
51e606fd7f73-4 | //The SQL WHERE clause without the word "where".
'query' => "",
//The SQL ORDER BY clause without the phrase "order by".
'order_by' => "",
//The record offset from which to start.
'offset' => "0",
//Optional. The list of fields to be returned in the results
'select_fields' => array(
'id',
'first_name',
'last_name',
),
//A list of link names and the fields to be returned for each link name
'link_name_to_fields_array' => array(
array(
'name' => 'email_addresses',
'value' => array(
'id',
'email_address',
'opt_out',
'primary_address'
), | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Retrieving_a_List_of_Records_With_Related_Info/index.html |
51e606fd7f73-5 | 'opt_out',
'primary_address'
),
),
),
//The maximum number of results to return.
'max_results' => '2',
//To exclude deleted records
'deleted' => 0,
//If only records marked as favorites should be returned.
'Favorites' => false,
);
$get_entry_list_result = call("get_entry_list", $get_entry_list_parameters, $url);
echo "<pre>";
print_r($get_entry_list_result);
echo "</pre>";
?>
Result
stdClass Object
(
[result_count] => 2
[total_count] => 200
[next_offset] => 2
[entry_list] => Array
( | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Retrieving_a_List_of_Records_With_Related_Info/index.html |
51e606fd7f73-6 | [entry_list] => Array
(
[0] => stdClass Object
(
[id] => 116d9bc6-4a24-b826-952e-4f7cb6b25ea7
[module_name] => Contacts
[name_value_list] => stdClass Object
(
[id] => stdClass Object
(
[name] => id
[value] => 116d9bc6-4a24-b826-952e-4f7cb6b25ea7
)
[first_name] => stdClass Object
(
[name] => first_name
[value] => Lucinda
)
[last_name] => stdClass Object
( | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Cookbook/Web_Services/Legacy_API/REST/PHP/Retrieving_a_List_of_Records_With_Related_Info/index.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.