Create and Update Methods are getting called twice for each in tridion storage extension - tridion

I am not able to figure out why my custom Filesystem DOA for create and update method are getting called twice, so I am getting same records twice in my custom storage extension.
Create/Update methods are getting called twice - When I publish any page two records for each getting saved in database.
Remove (Unpublishing the page is fine, only one record is getting inserted in the database, however after unpublishing any page, next time publishing is getting failed for that particular page)
I have below class code for handling the page and same written for component and binaries:
package com.tridion.storage.dao;
import java.io.File;
import com.tridion.broker.StorageException;
import com.tridion.data.CharacterData;
import com.tridion.storage.PageMeta;
import com.tridion.storage.StorageManagerFactory;
import com.tridion.storage.StorageTypeMapping;
import com.tridion.storage.filesystem.FSEntityManager;
import com.tridion.storage.filesystem.FSPageDAO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class FSPageContentDAOExtension extends FSPageDAO implements PageDAO
{
private static Logger log = LoggerFactory.getLogger(FSPageContentDAOExtension.class);
public FSPageContentDAOExtension(String storageId, String storageName, File storageLocation)
{
super(storageId, storageName, storageLocation);
log.debug("Entering Constructor 1: FSPageContentDAOExtension(" + storageId + "," + storageLocation.getPath() + "," + storageName + ")");
}
public FSPageContentDAOExtension(String storageId, String storageName, File storageLocation, FSEntityManager entityManager) {
super(storageId, storageName, storageLocation, entityManager);
log.debug("Entering Constructor 2: FSPageContentDAOExtension(" + storageId + "," + entityManager.toString() + "," + storageLocation.getPath() + "," + storageName + ")");
}
public void create(CharacterData page, String relativepath) throws StorageException
{
super.create(page,relativepath);
log.info("Inside the Create");
log.info("storageId.toLowerCase()-"+storageId.toLowerCase());
try
{
log.info("Inside the Create - page.getPublicationId():"+page.getPublicationId()+"--"+relativepath);
ItemDAO item = (ItemDAO) StorageManagerFactory.getDAO(page.getPublicationId(),StorageTypeMapping.PAGE_META);
log.info("Inside the Create - item:"+item.getBindingName());
if( item !=null)
{
log.info("Inside the Create - PageMeta:");
PageMeta pageMeta = (PageMeta) item.findByPrimaryKey(page.getPublicationId(),page.getId());
log.info("Inside the Create - PageMeta2:"+pageMeta.getFileName());
if(pageMeta!=null)
{
log.info("Create - PageMeta-"+pageMeta.getTitle());
int publicationId = pageMeta.getPublicationId();
String strIgnorePubIds = "232,481";
String pubId = Integer.toString(publicationId);
if(!strIgnorePubIds.contains(pubId))
{
String url = pageMeta.getUrl();
String tcmURI = Integer.toString(pageMeta.getItemId());
PublishActionDAO publishActionDAO = (PublishActionDAO) StorageManagerFactory.getDefaultDAO("PublishAction");
if(publishActionDAO !=null)
{
PublishAction publishAction = new PublishAction();
publishAction.setAction("ADD");
publishAction.setPublicationID(publicationId);
publishAction.setUrl(url);
publishAction.setLastPublishedDate(pageMeta.getLastPublishDate());
publishAction.setItemType(64);
publishAction.setTcmUri(tcmURI);
log.debug("Going to Store bean -"+ publishAction.toString());
publishActionDAO.store(publishAction);
createFlag = false;
}
}
}
}
}
catch (StorageException se)
{
log.error("FSPageContentDAOExtension - Exception occurred " + se);
}
}
public void update(CharacterData page,String originalRelativePath, String newRelativepath)throws StorageException {
super.update(page,originalRelativePath,newRelativepath);;
log.info("Inside the Update");
log.info("storageId.toLowerCase()-"+storageId);
try
{
log.info("Inside the Update - page.getPublicationId():"+page.getPublicationId()+"--"+originalRelativePath+"--"+newRelativepath);
ItemDAO item = (ItemDAO) StorageManagerFactory.getDAO(page.getPublicationId(),StorageTypeMapping.PAGE_META);
log.info("Inside the Update - item:"+item.getBindingName());
if( item !=null)
{
log.info("Inside the Update - PageMeta:");
PageMeta pageMeta = (PageMeta) item.findByPrimaryKey(page.getPublicationId(),page.getId());
log.info("Inside the Update - PageMeta2:"+pageMeta.getFileName());
if(pageMeta!=null)
{
log.info("Update - PageMeta-"+pageMeta.getTitle());
int publicationId = pageMeta.getPublicationId();
String strIgnorePubIds = "232,481";
String pubId = Integer.toString(publicationId);
if(!strIgnorePubIds.contains(pubId))
{
String url = pageMeta.getUrl();
String tcmURI = Integer.toString(pageMeta.getItemId());
PublishActionDAO publishActionDAO = (PublishActionDAO) StorageManagerFactory.getDefaultDAO("PublishAction");
if(publishActionDAO !=null)
{
PublishAction publishAction = new PublishAction();
publishAction.setAction("UPD");
publishAction.setUrl(url);
publishAction.setPublicationID(publicationId);
publishAction.setLastPublishedDate(pageMeta.getLastPublishDate());
publishAction.setItemType(64);
publishAction.setTcmUri(tcmURI);
log.debug("Going to Store bean -"+ publishAction.toString());
publishActionDAO.store(publishAction);
createFlag = false;
}
}
}
}
}
catch (StorageException se)
{
log.error("FSPageContentDAOExtension - Exception occurred " + se);
}
}
public void remove(final int publicationId, final int pageID, final String relativePath) throws StorageException {
log.info("Inside the Delete");
try
{
ItemDAO item = (ItemDAO) StorageManagerFactory.getDAO(publicationId,StorageTypeMapping.PAGE_META);
if( item !=null)
{
PageMeta pageMeta = (PageMeta) item.findByPrimaryKey(publicationId,pageID);
if(pageMeta!=null)
{
log.info("Delete - PageMeta-"+pageMeta.getTitle());
String strIgnorePubIds = "232,481";
String pubId = Integer.toString(publicationId);
if(!strIgnorePubIds.contains(pubId))
{
String url = pageMeta.getUrl();
String tcmURI = Integer.toString(pageMeta.getItemId());
PublishActionDAO publishActionDAO = (PublishActionDAO) StorageManagerFactory.getDefaultDAO("PublishAction");
if(publishActionDAO !=null)
{
PublishAction publishAction = new PublishAction();
publishAction.setAction("DEL");
publishAction.setUrl(url);
publishAction.setLastPublishedDate(pageMeta.getLastPublishDate());
publishAction.setItemType(64);
publishAction.setTcmUri(tcmURI);
publishAction.setPublicationID(publicationId);
log.debug("Going to Store bean -"+ publishAction.toString());
publishActionDAO.store(publishAction);
}
}
}
}
}
catch (StorageException se)
{
log.error("FSPageContentDAOExtension - Exception occurred " + se);
}
super.remove(publicationId, pageID, relativePath);
}
}
my Storage bundle as below:
<?xml version="1.0" encoding="UTF-8"?>
<StorageDAOBundles>
<StorageDAOBundle type="persistence">
<StorageDAO typeMapping="PublishAction" class="com.tridion.storage.dao.JPAPublishActionDAO" />
</StorageDAOBundle>
<StorageDAOBundle type="filesystem">
<StorageDAO typeMapping="Binary" class="com.tridion.storage.dao.FSBinaryContentDAOExtension" />
</StorageDAOBundle>
<StorageDAOBundle type="filesystem">
<StorageDAO typeMapping="Page" class="com.tridion.storage.dao.FSPageContentDAOExtension" />
</StorageDAOBundle>
<StorageDAOBundle type="filesystem">
<StorageDAO typeMapping="ComponentPresentation" class="com.tridion.storage.dao.FSComponentContentDAOExtension" />
</StorageDAOBundle>
</StorageDAOBundles>
My Sample cd_storage XML
<Storages>
<StorageBindings>
<Bundle src="search_dao_bundle.xml"/>
</StorageBindings>
<Storage Type="persistence" Id="searchdb" dialect="MSSQL" Class="com.tridion.storage.persistence.JPADAOFactory">
<Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
<DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
<Property Name="serverName" Value="*****" />
<!--Property Name="portNumber" Value="1433" /-->
<Property Name="databaseName" Value="**********" />
<Property Name="user" Value="*****" />
<Property Name="password" Value="********" />
</DataSource>
</Storage>
<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultFile" defaultFilesystem="false">
<Root Path="F:\test.com New" />
</Storage>
<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultDataFile" defaultFilesystem="true" defaultStorage="true">
<Root Path="F:\test.com New\data" />
</Storage>
</Storages>
<ItemTypes defaultStorageId="defaultdb" cached="false">
<Item typeMapping="PublishAction" cached="false" storageId="searchdb" />
<Item typeMapping="Query" storageId="defaultdb"/>
<Item typeMapping="SearchFilter" storageId="defaultDataFile"/>
<Item typeMapping="XSLT" cached="false" storageId="defaultDataFile"/>
<Item typeMapping="ComponentPresentation" itemExtension=".Jsp" cached="false" storageId="defaultDataFile"/>
<Item typeMapping="ComponentPresentation" itemExtension=".Asp" cached="false" storageId="defaultDataFile"/>
<Item typeMapping="ComponentPresentation" itemExtension=".Xml" cached="false" storageId="defaultDataFile"/>
<Item typeMapping="ComponentPresentation" itemExtension=".txt" cached="false" storageId="defaultDataFile"/>
<Item typeMapping="Schema" cached="false" storageId="defaultDataFile"/>
<Item typeMapping="Page" cached="false" storageId="defaultFile"/>
<Item typeMapping="Binary" cached="false" storageId="defaultFile"/>
</ItemTypes>

The reason why two records where getting inserted in my custom table was that we are having two custom PAGE Deployer extension implemented on our presentation server.
So, both the deployer are calling the base class FSPageDAO and interface methods of PageDAO.
Above problem can be solved only if we have got some code to handle the restriction of calling base classes in our DAO.
Else there is no way to control this if you have deployer extension implemented on the server.
Please suggest, if we can check and control in our DAO (if possible).
Thanks.

Related

Java.IO.FileNotFoundException: open failed: ENOENT (No such file or directory)'

Getting that error:
Java.IO.FileNotFoundException: '/storage/emulated/0/meusarquivos/dd.pdf: open failed: ENOENT (No such file or directory)'
on this line (SaveAndView method):
var outs = new FileOutputStream(file);
SaveAndView:
public void SaveAndView(string fileName, string contentType, MemoryStream stream)
{
try
{
string root = null;
//Get the root path in android device.
root = Android.OS.Environment.IsExternalStorageEmulated ? Android.OS.Environment.ExternalStorageDirectory.ToString() : System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
//Create directory and file
var myDir = new Java.IO.File(root + "/meusarquivos");
myDir.Mkdir();
var file = new Java.IO.File(myDir, fileName);
//Remove if the file exists
if (file.Exists()) file.Delete();
//Write the stream into the file
var outs = new FileOutputStream(file);
outs.WriteAsync(stream.ToArray());
outs.Flush();
outs.Close();
}
catch (Exception ex)
{
throw;
//PostLog.AppCenterLogExcecao(ex, new Dictionary<string, string> { { "origem", "OrderViewModel - 159" } });
}
}
My AndroidManifest.xml looks as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.mobileappxamarinbarcodescanner">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" />
<application android:label="MobileAppXamarinBarcodeScanner.Android" android:theme="#style/MainTheme"></application>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
What am i missing?
Yes, you can use System.IO to achieve this instead of Java classes.
I created a simple demo to achieve this,and it works.
You can refer to the following code:
using System.IO;
public void SaveAndView(string fileName)
{
try
{
string text = "hello world";
byte[] data = Encoding.ASCII.GetBytes(text);
string rootPath = Android.OS.Environment.IsExternalStorageEmulated ? Android.OS.Environment.ExternalStorageDirectory.ToString() : System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
var filePathDir = Path.Combine(rootPath, "meusarquivos");
if (!System.IO.File.Exists(filePathDir))
{
Directory.CreateDirectory(filePathDir);
}
string filePath = Path.Combine(filePathDir, fileName);
System.Diagnostics.Debug.WriteLine("filePath is:" + filePath);
System.IO.File.WriteAllBytes(filePath, data);
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex.Message);
}
}
Usage:
SaveAndView("dd.pdf");
And you can refer to the official sample here: LocalFiles.
For more detail, you can check:
https://learn.microsoft.com/en-us/xamarin/android/platform/files/external-storage?tabs=windows .

CompanyHome reference in java API

I have a scheduler job configured and created an action class by extending org.quartz.StatefulJob
In execute method of Action Class (Shown below) , What would be the best way to get reference to CompanyHome in execute method ?
My objctive to create a file in company home directory , when the action invoke. Any suggesion ?
Have you tried using NodeLocatorService?
https://docs.alfresco.com/4.0/concepts/node-locator-available.html.
For example:
NodeRef companyHomeNodeRef = registry.getNodeLocatorService().getNode(CompanyHomeNodeLocator.NAME, null, null);
Please implement a method like this
public NodeRef getCompanyHomeNodeReference() {
NodeRef companyHomeNodeRef = null;
companyHomeNodeRef = (NodeRef)AuthenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork<Object>() {
public Object doWork() throws Exception {
StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore"));
ResultSet rs = serviceRegistry.getSearchService().query(storeRef, SearchService.LANGUAGE_XPATH,
"/app:company_home");
Object companyHome = null;
try {
if (rs.length() == 0) {
LOG.error("Didn't find Company Home ");
throw new AlfrescoRuntimeException("Didn't find Company Home");
}
final NodeRef companyHomeNodeRef1 = rs.getNodeRef(0);
if(companyHomeNodeRef1 == null) {
LOG.info("Didn't find Company Homes");
}else {
companyHome = companyHomeNodeRef1;
}
} finally {
rs.close();
}
return companyHome;
}
});
return companyHomeNodeRef;
}
import as below:
import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.cmr.repository.StoreRef;
please see how the critical code is placed in AuthenticationUtil (this is very important).
And then use below code to create a file:
fileFolderService.create(companyNodeRef, "yourfilename", ContentModel.TYPE_CONTENT);
Add this bean in service-context.xml
<bean id="yourObj" class="MoveMonthlyDataAction">
<property name="serviceRegistry">
<ref bean="ServiceRegistry" />
</property>
</bean>
and mention in MoveMonthlyDataAction . java as below,
public class MoveMonthlyDataAction {
ServiceRegistry serviceRegistry;
public void execute(){
// your code
}
// getter and setter
}
Hope this will help.

spring 3 file upload using CommonsMultipartResolver not working properly

I am using CommonsMultipartResolver to upload a word/pdf file into postgres database, while uploading the file I have printed the byte[] array using file.getBytes(), it showing like
bytes==========================[B#6b02547c
the file is being upload but when I download the file I am getting the following error from ms-word: "The file abc.docx cannot be opened because there are problems with contents". please help me to solve this problem.
#SuppressWarnings({ "unused", "static-access" })
#RequestMapping( value="/RegisterCandidate" , method = RequestMethod.POST)
private String RegisterCandidate(HttpServletRequest request,
HttpServletResponse response,
#RequestParam CommonsMultipartFile[] fileUpload ) throws Exception{
System.out.println("In method");
String email = request.getParameter("email");
System.out.println("email==============="+email);
String Password = request.getParameter("password");
String usr_name = request.getParameter("name");
String mobile_no = request.getParameter("mobile_no");
Date dateentry = new Date();
java.sql.Timestamp entry_date = new Timestamp(dateentry.getTime());
Users_Pojo usr = new Users_Pojo();
if (fileUpload != null && fileUpload.length > 0) {
for (CommonsMultipartFile aFile : fileUpload){
usr.setFilename(aFile.getOriginalFilename());
usr.setFile_data(aFile.getBytes());
System.out.println("aFile.getBytes()======"+aFile.getBytes());
System.out.println("aFile.getInputStream()======"+aFile.getInputStream());
System.out.println("aFile.getStorageDescription()======"+aFile.getStorageDescription());
System.out.println("aFile.getSize();======"+aFile.getSize());
System.out.println("aFile.getContentType();==="+aFile.getContentType());/* */
}
}
usr.setUc_password("ex123");
usr.setUc_name(email);
usr.setUc_contact_person(email);
usr.setUc_phone_no(BigInteger.valueOf(Long.parseLong(mobile_no)));
usr.setUc_email_id(email);
usr.setUc_type_id(1);
usr.setUc_active(1);
usr.setValid_from(null);
usr.setValid_to(null);
usr.setDesignation("jobseekar");
usr.setIp_address("164.100.200.179");
usr.setUser_location(1);
usr.setEntry_date(entry_date);
scm_service.save(usr, email);
/*System.out.println("email==="+email);
System.out.println("Password==="+Password);
System.out.println("usr filename==="+usr.getFilename());*/
return "success";
//return "redirect:Login.html";
}
Configuration:
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="maxUploadSize" value="2000000" />
</bean>
downloading using :
#RequestMapping(value = "/download",method = RequestMethod.GET)
public void getAttachmenFromDatabase( HttpServletRequest request,HttpServletResponse response){
response.setContentType("application/vnd.ms-word");
String resume_id = request.getParameter("resume_id");
long attachid = Long.parseLong(resume_id);
try {
Users_Pojo file_attachment = (Users_Pojo) scm_service.getFiles(attachid);
System.out.println("file_attachment.getFilename()======="+file_attachment.getFile_data());
response.setHeader("Content-Disposition", "inline; filename=\""+ file_attachment.getFilename() +"\"");
response.setContentLength(file_attachment.getFile_data().length);
FileCopyUtils.copy(file_attachment.getFile_data(), response.getOutputStream());
response.flushBuffer();
} catch (IOException e) {
e.printStackTrace();
}
}

Spring Integration: how to read multiple RSS channels?

I wrote my app that reads RSS feed. It works super with one channel which I have in beans.xml like this:
<feed:inbound-channel-adapter id="news"
channel="inputRssFeedChannel"
url="http://feeds.feedburner.com/Techcrunch">
<int:poller fixed-rate="5000" max-messages-per-poll="100"/>
</feed:inbound-channel-adapter>
<int:service-activator input-channel="inputRssFeedChannel"
ref="rssPrintOutService"
method="printRss"
output-channel="nullChannel"/>
Every time it just calls RssHandler which deal with SyndEntry. But what should I do if I'd like to read few rss urls (2,5,20 or etc...)?
Create your own implementation of org.springframework.integration.core.MessageSource and use it in input-channel reference like the following:
<int:inbound-channel-adapter id="newsInput" ref="newsReader">
<int:poller fixed-rate="1" time-unit="SECONDS" max-messages-per-poll="1"/>
</int:inbound-channel-adapter>
<bean id="newsReader" class="blog.NewsReader">
<property name="fetcherListener">
<bean class="blog.helper.FetcherEventListenerImpl"/>
</property>
<property name="urls">
<list>
<value>http://www.gridshore.nl/feed/</value>
<value>https://spring.io/blog.atom</value>
<value>http://feeds.foxnews.com/foxnews/video?format=xml</value>
</list>
</property>
</bean>
The class NewsReader uses list mentioned in urls propriety and retrieve the feed.
Please refer to the receive method below.
public class NewsReader implements MessageSource, InitializingBean {
private static Logger logger = LoggerFactory.getLogger(NewsReader.class);
private FeedFetcherCache feedInfoCache;
private FeedFetcher feedFetcher;
private FetcherListener fetcherListener;
private List<String> urls;
#Override
public Message receive() {
List<SyndFeed> feeds = obtainFeedItems();
return MessageBuilder.withPayload(feeds)
.setHeader("feedid", "newsfeed").build();
}
private List<SyndFeed> obtainFeedItems() {
List<SyndFeed> feed = new ArrayList<>();
try {
for (String url : urls) {
feed.add(feedFetcher.retrieveFeed(new URL(url)));
}
} catch (IOException e) {
logger.error("IO Problem while retrieving feed", e);
} catch (FeedException e) {
logger.error("Feed Problem while retrieving feed", e);
} catch (FetcherException e) {
logger.error("Fetcher Problem while retrieving feed", e);
}
return feed;
}
#Override
public void afterPropertiesSet() throws Exception {
feedInfoCache = HashMapFeedInfoCache.getInstance();
feedFetcher = new HttpURLFeedFetcher(feedInfoCache);
if (fetcherListener != null) {
feedFetcher.addFetcherEventListener(fetcherListener);
}
}
public void setFetcherListener(FetcherListener fetcherListener) {
this.fetcherListener = fetcherListener;
}
public void setUrls(List<String> urls) {
this.urls = urls;
}
In case you want to take a look of my complete code:
git clone https://github.com/BikashShaw/MultipleRSSFeedRead.git

Issue with retrieveing the Manager of a System User in a Custom workflow - CRM 2013

Issues with custom workflow activity in CRM 2013 On-prem
I'm trying to pass the Manager of the System
here is the code that I'm running, it gets to setting the MANAGER and stops
I put the ran the FetchXML seperatly and it does return a value so I know what bit works
public class CaseAccountManagerManagersLookup : CodeActivity
{
// Inputs
[Input("Enter Case")]
[ReferenceTarget("incident")]
public InArgument<EntityReference> CA { get; set; }
// Outputs
[Output("Manager Output")]
[ReferenceTarget("systemuser")]
public OutArgument<EntityReference> AMOUT { get; set; }
protected override void Execute(CodeActivityContext executionContext)
{
// Context
IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();
IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
//Create the tracing service
ITracingService tracingService = executionContext.GetExtension<ITracingService>();
// get the account and renewals manager ID's
var CASE = CA.Get<EntityReference>(executionContext);
tracingService.Trace("Case ID = " + CASE.Id);
try
{
// FETCH
string fetchXml = string.Format(#"
<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>
<entity name='incident'>
<attribute name='title' />
<attribute name='incidentid' />
<order attribute='title' descending='false' />
<filter type='and'>
<condition attribute='incidentid' operator='eq' value='{0}' />
</filter>
<link-entity name='contact' from='contactid' to='customerid' alias='ak'>
<link-entity name='account' from='accountid' to='parentcustomerid' alias='al'>
<link-entity name='systemuser' from='systemuserid' to='bc_dssalesperson' alias='am'>
<attribute name='parentsystemuserid' />
</link-entity>
</link-entity>
</link-entity>
</entity>
</fetch>", CASE.Id);
EntityCollection case_results = service.RetrieveMultiple(new FetchExpression(fetchXml));
//tracingService.Trace("fetch has run");
if (case_results.Entities.Count != 0)
{
foreach (var a in case_results.Entities)
{
//if (a.Attributes.Contains("ai_parentsystemuserid"))
//{
tracingService.Trace("set manager id next");
var MANAGERID = (EntityReference)a.Attributes["parentsystemuserid"];
tracingService.Trace("manager id set");
AMOUT.Set(executionContext, MANAGERID);
throw new InvalidOperationException("Want to see trace");
//}
}
}
tracingService.Trace("end ");
}
catch (Exception e)
{
throw new InvalidPluginExecutionException("Plugin - CaseAccountManagerManagerLookup - " + e.Message);
}
finally
{
throw new InvalidOperationException("Want to see trace");
}
}
}
Try to use am.parentsystemuserid instead of just parentsystemuserid.
Are you sure that the guid that you are passing is in the correct form?
{8B8099A6-8B89-E411-883D-D89D676552A0}
this is what i get from the export but you are writing
8B8099A6-8B89-E411-883D-D89D676552A0
Also are you sure about the record that you are trying to retrieve? Is the chain complete with data?
case-> contact -> account -> parent user -> parent user ?

Resources