Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <CustomActions>
- <ActionDefinition ID="Open Laserfiche Investigators Case">
- <Title>Open Laserfiche Investigators Case Site</Title>
- <Action>
- <![CDATA[
- var onWebServiceCallSuccess = function(result) {
- if(result && result.url) {
- window.open(result.url);
- } else {
- alert("Unable to open the Laser Investigators site");
- }
- }
- var onWebServiceCallFail = function(err) {
- if(err && err.get_message) {
- alert(err.get_message);
- }
- }
- var getSelectedDocumentID = function(context) {
- var selItems = context.getSelectedItems();
- var itemList = selItems.items;
- if(itemList && itemList.length) {
- return itemList[0].id;
- }
- return -1;
- }
- // Get Document ID of selected item
- var DocumentID = getSelectedDocumentID(context);
- Laserfiche.WebAccess.ActionsWebService.PerformCustomAction(
- 'GenerateLaserInvestigatorsURL', /* MethodName */
- { DocumentID : DocumentID }, /* MethodArguments */
- onWebServiceCallSuccess, /* Function to run on succcess */
- onWebServiceCallFail /* Function to run on fail */
- );
- ]]>
- </Action>
- <Enabled>
- <![CDATA[
- return true;
- ]]>
- </Enabled>
- <IconClass>InvestigatorsIcon</IconClass>
- <Toolbars>7</Toolbars>
- </ActionDefinition >
- </CustomActions>
Advertisement
Add Comment
Please, Sign In to add comment