Share external object

Official Content
This documentation is valid for:

It is increasingly common for users to share information about an application with – or through – other applications (e.g. Instagram, Google+, Gmail, Hangouts, Dropbox) installed on the device. The Share external object allows you sharing content with any third-party application registered in the device to receive shared content.

Warning: Keep in mind that not all applications allow sharing any kind of content, been necessary to consider each case independently depending on each platform. Check Troubleshooting section for details.

Shareexternalobject-Location_png Share external object - Definition

Note: For specific social media sharing, Facebook and Twitter APIs are recommended.


It does not have any


ShareText method

Shares a text. Optionally, an URL and a title can be added (otherwise, leave them empty). 

Return value  None
Parameters text:VarChar(200) [ , url:URL ] [ , title:VarChar(200) ]

ShareImage method

It allows sharing an Image. Optionally, a text, an URL and a title can be attached to it.

Return value  None
Parameters image:Image [ , text:VarChar(200) ] [ , url:URL ] [ , title:VarChar(200) ]


It does not have any


In LightCRM, suppose we want users to share information about the meeting.

To do this, we add a “Share” button to the Application Bar of the Work with Meeting object.

SharingAPI - Layout

Next, we program the Event associated with this button.

Event 'Share'
        If not CompanyLogo.IsEmpty()
            msg("Sharing meeting with image",status)
            Share.ShareImage(CompanyLogo, MeetingTitle,!"",MeetingNote)
            msg("Sharing meeting",status)

The application will look as shown below. Clicking on the button displays a pop-up dialog that shows the applications installed on our device for sharing content. Lastly, you must to select one of these applications and share it!

SharingAPI - iOS button


  • Not all parameters specified in the methods will be shown in all applications when you share content, except for those that are required or accepted by the applications.
  • The URL parameter should be complete, following the format <scheme>://<domain>[<port>]/<path>. Otherwise, the URL is considered relative to the Service URL of the application. 


Not all third-party application accepts any kind of content. 

For example,

  • Facebook always is exposed as a "share-with" application but does not allow to share plain text, it only allows you sharing images and URLsbut not both at the same time.
  • WhatsApp allows you to share images only if text, title, and URL are empty; otherwise, the image will not be sent.
  • Twitter ignores title parameters.
  • GMail takes the title as the subject of the email and text as its content.

These limitations depend on every external application.


Platforms  Smart Devices (iOS, Android)


This external object is available as of GeneXus 15.

See also