on 2015 Aug 19 9:05 AM
Hello developers,
i am currently working in C4C. I also have some tutorials through which were very good.
But one question never came to talk(possibly because i`am too stupid, thinking about it).
How do i transfer an array structure to an html mashup?
Suppose i have a BO looks like this:
businessobject arrayExample{
element emloyeeID:ID;
association toEmployee to Emloyee;
node item{
element leadID:ID,
element leadaddress:LANGUAGEINDEPENDENT_ENCRYPTED_LONG_Name;
}
}
how do i pass this bo like a array to an html mashup??
This is possible with a some work in SDK. Before I explain what to do, let me explain how mashups work.
Mashups work on a simple design where specific UI fields are pulled out of the UI and then a URL is dynamically generated using those UI fields as URL parameters. For example, Google Maps can render pins on a map as long as you provide it some basic data such as GPS Lat/Long or a physical address information. On the Visit UI, because it stores a GPS Lat/Long coordinates when a user checks in/out, you can use these Lat/Long data to push it into a Google map URL/API call to render a Google map with a pin of the Visit Lat/Long data. Configuring all of this is done with the Mashups editor which is in the Administrator work center as a administrator role.
Thus if you want to create a more complex example of passing array data to the mashup, you will need to first concatenate the array data in whatever structure/format the mashup provider expects the array data to be in (separated by special characters, commas, etc...) and store that concatenated data in C4C extension field before you pass it to the mashup
High level steps would be
1. Create a custom field to hold the formatted array data
2. Create a custom node (table) to hold the array data
3. Create a custom action to populate the node with array data
4. Create a custom action to take the array data and concatenate it in a format the URL mashup expects it to be in and then save the results in the custom field in step 1
5. Create a custom embedded component (EC) that has all of custom backend work you did in steps 1-4.
6. Create a custom outport in the custom EC you created in step 5 that exposes all of the URL parameters you need for the mashup (including the custom field created in step 1)
7. Configure a mashup and bind it to the outport in step 6
8. Deploy the mashup created in step 7 in the standard UI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
24 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.