I'm using Contour 1.0.7 with an external datasource. I want to retrieve the primary key or add record.id when the data gets saved to my custom table so that I can reference it later on.
I'm considering two options :
Creating a workflowtype that would somehow put the record.id in a field of the external datasource. Is this possible? I only seem to be able to update the fields that are available to the user, and not the predefined values.
Another option would be to create a custom Datasourcetype.
Does anyone have an example of how to create a custom DataSourceType for contour? Is it possible to inherit from the Sql Datasource already provided in contour?
I've managed to create a custom workflowtype, and i can retrieve record.id. However i can't figure out how to write it to the "sql datasource". The record parameter passed to the execute function only contains the fields that are editable by the user and i don't want to change those. Can i edit the fields containing predefined values?
Is there an example available for a custom DataSourceType and is it possible to inherit the sql datasource datasourcetype from contour? :-)
Contour sql datasource ID
Hello,
I'm using Contour 1.0.7 with an external datasource. I want to retrieve the primary key or add record.id when the data gets saved to my custom table so that I can reference it later on.
I'm considering two options :
Creating a workflowtype that would somehow put the record.id in a field of the external datasource. Is this possible? I only seem to be able to update the fields that are available to the user, and not the predefined values.
Another option would be to create a custom Datasourcetype.
Does anyone have an example of how to create a custom DataSourceType for contour? Is it possible to inherit from the Sql Datasource already provided in contour?
Thanks for any suggestions
Kevin
Comment author was deleted
Hi Kevin,
A custom workflowtype would be the easiest solution. Check the developer documentation to get started with a workflow http://umbraco.org/products/umbraco-contour/help-and-support/developer-documentation.aspx
Hi Tim,
I've managed to create a custom workflowtype, and i can retrieve record.id. However i can't figure out how to write it to the "sql datasource". The record parameter passed to the execute function only contains the fields that are editable by the user and i don't want to change those. Can i edit the fields containing predefined values?
Is there an example available for a custom DataSourceType and is it possible to inherit the sql datasource datasourcetype from contour? :-)
Thanks!
Kevin
is working on a reply...