Scenario: Workflow is waiting on the OnItemChanged event of a SP list. We need to update the same item from the workflow.
Solution:
Do not use the Update method of SPListItem. This will surely make the workflow go into recursion.
Instead add a CallExternalMethod Activity.
Select the interface type as IListItemService
Method : UpdateListItem
Bind the following properties:
1. ListId : Bind to the workflowproperties.ListID
2. ItemId : Bind to the workflowproperties.ItemID
3. Id. : To a new GUID
4. itemProperties: This is an important property. This property holds the ColumnName,Value pair that needs to be updated.
Once you bind the itemProperties to a field, you can add columns and the their values like any other ArrayList/Dictionary.
Once this activity executes the list item gets updated.
NOTE: This solution does sometime make the workflow go into recursion. But this recursive behaviour is not consistent.
Showing posts with label MOSS. Show all posts
Showing posts with label MOSS. Show all posts
Thursday, April 26, 2007
Tuesday, April 10, 2007
Alernate URL Mapping and Custom ASPX Pages
Assume you have mapped a URL to a Sharepoint Site and are accessing the site from the extranet. This sharepoint site gets accessed locally from a port other than 80.
If you develop a custom aspx page then you would generally put the page in the _layouts folder and the dll in the Bin folder of the Site:port Virtual directory.
The page would work fine if the user accesses the site from the Intranet using the local url i.e http://site:port
But try accessing the page using the mapped URL. It wont work.
What I had to do was to put the Dll of custom page in the Bin directory of site at port 80. This got the page working.
If you develop a custom aspx page then you would generally put the page in the _layouts folder and the dll in the Bin folder of the Site:port Virtual directory.
The page would work fine if the user accesses the site from the Intranet using the local url i.e http://site:port
But try accessing the page using the mapped URL. It wont work.
What I had to do was to put the Dll of custom page in the Bin directory of site at port 80. This got the page working.
Labels:
Alternate URL Mapping,
Custom ASPX Dll problem,
MOSS
Subscribe to:
Posts (Atom)