User Activity

I have written a Ui action as -(new AssetandCI()).createCI(current); current.update(); action.setRedirectURL(current);" to create CI from asset record where CI  is empty but this is not working.Any tips?