This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Note in Sugar CRM
Overview
The following operations allow you to work with the notes. Click an operation name to see details on how to use it.
For a sample proxy service the illustrates how to work with notes, see Sample configuration.Â
Operation | Description |
Retrieves an attachment associated with a specific note record. |
Operation details
This section provides details on each of the operations.
 Getting note attachmentÂ
 Retrieves an attachment associated with a specific note record. This operation requires the init method to be called as it requires the session ID along with the user name and password.
<sugarcrm.getNoteAttachment> <id>{$ctx:id}</id> </sugarcrm.getNoteAttachment>
PropertiesÂ
id:
 The ID of the note record to associate the attachment with.
Sample request
Following is a sample SOAP request that can be handled by the getNoteAttachment
 operation.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sug="wso2.connector.sugarcrm.getnoteattachment"> <soapenv:Header/> <soapenv:Body> <root> <sug:appUri>https://ixojiv6278.trial.sugarcrm.com/soap.php</sug:appUri> <sug:userName>admin</sug:userName> <sug:password>bb00347e47b6b24abd37975dfedbf54c</sug:password> <sug:version>1</sug:version> <sug:appname>appfd</sug:appname> <sug:id>f7a00afd-2c76-7358-af51-5243cc841cc2</sug:id> </root> </soapenv:Body> </soapenv:Envelope>Â
Sample configuration
Following is a sample proxy service that illustrates how to connect to Sugar CRM with the init operation and use the  getNoteAttachment
  operation. The sample request for this proxy can be found in getNoteAttachment sample request. You can use this sample as a template for using other operations in this category. Â
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="sugarcrm_getNoteAttachment" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property xmlns:ns="wso2.connector.sugarcrm.getnoteattachment" name="userName" expression="//ns:userName/text()"/> <property xmlns:ns="wso2.connector.sugarcrm.getnoteattachment" name="password" expression="//ns:password/text()"/> <property xmlns:ns="wso2.connector.sugarcrm.getnoteattachment" name="appUri" expression="//ns:appUri/text()"/> <property xmlns:ns="wso2.connector.sugarcrm.getnoteattachment" name="version" expression="//ns:version/text()"/> <property xmlns:ns="wso2.connector.sugarcrm.getnoteattachment" name="appName" expression="//ns:appname/text()"/> <property xmlns:ns="wso2.connector.sugarcrm.getnoteattachment" name="id" expression="//ns:id/text()"/> <sugarcrm.init> <appUri>{$ctx:appUri}</appUri> <userName>{$ctx:userName}</userName> <password>{$ctx:password}</password> <version>{$ctx:version}</version> <applicationName>{$ctx:appName}</applicationName> </sugarcrm.init> <sugarcrm.getNoteAttachment> <id>{$ctx:id}</id> </sugarcrm.getNoteAttachment> <filter source="$axis2:HTTP_SC" regex="^[^2][0-9][0-9]"> <then> <switch source="$axis2:HTTP_SC"> <case regex="401"> <property name="ERROR_CODE" value="600401"/> <property name="ERROR_MESSAGE" value="Unauthorized"/> </case> <case regex="404"> <property name="ERROR_CODE" value="600404"/> <property name="ERROR_MESSAGE" value="Not Found"/> </case> <case regex="400"> <property name="ERROR_CODE" value="600400"/> <property name="ERROR_MESSAGE" value="Bad Request"/> </case> <case regex="500"> <property name="ERROR_CODE" value="600500"/> <property name="ERROR_MESSAGE" value="Internal Server Error"/> </case> </switch> <makefault version="soap11"> <code expression="get-property('ERROR_CODE')"/> <reason expression="get-property('ERROR_MESSAGE')"/> <detail/> </makefault> </then> </filter> <respond/> </inSequence> <outSequence> <send/> </outSequence> <faultSequence> <makefault version="soap11"> <code expression="get-property('ERROR_CODE')"/> <reason expression="get-property('ERROR_MESSAGE')"/> <detail/> </makefault> <send/> </faultSequence> </target> <description/> </proxy>
Â