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");
Pete

Hello,
Try to use am.parentsystemuserid instead of just parentsystemuserid.
Dynamics CRM MVP/ Technical Evangelist at
SlickData LLC
My blog

Similar Messages

  • Z40-70 compatibility issue with your power management system

    I noticed today that the Action Center says "Compatibility issue with your power management system." The description underneath is: Your power management system isn't working peoperly because a compatible driver is not available for this version of Windows. When I click on View message details it just says "Your computer was unable to download the solution at this time. Check to make sure your computer is connected to the Internet, and then try to download the solution again later." All power related functionalities however seem to be working. Battery is charging; battery percentage is showing; I can adjust screen brightness. I am not sure when exactly this problem started but it defenitely was not there before. Tried downloading and fixing the Power Management Software and updating BIOS. Still have the same message. System: Windows 8.1 64-bit 

    What model do you have? Can you post your MTM or model name?
    Sometimes these messages are a false alarm.

  • Yoga 2 pro / win8.1 - "Compatibility issue with your power management system"

     Hi,
    After downgrading form win10 back to 8.1 due to endless driver malfunction and a significant decrease in overall performance, I got this message in windows action center: “Compatibility issue with your power management system”. When I click on it it says: This solution could not be downloaded
    Most likely causes:
    • Your computer was unable to download the solution at this time. Check to make sure your computer is connected to the Internet, and then try to download the solution again later. As you can see, my internet connection is fine. Does anyone know how to solve this? Thanks,
    Daniel

    Check if installing this helps you:
    http://download.lenovo.com/consumer/mobiles/em8.0.2.3.exe
    If you already did this, check if you can do this BIOS update as well:
    http://download.lenovo.com/consumer/mobiles/5ecn96ww.exe
    Let me know if it works.
    Jonas
    Microsoft MVP: Windows Consumer Expert
    Yoga Tablet 2 10 || ThinkPad X1 Carbon (20A7007MPH) || ThinkPad Helix (3698-6EU) || IdeaCentre B540
    Twitter: @jonashendrickx

  • I have been having a issue with getting the colors on my monitor to match the colors fro my print lab. I now have the monitor calibrated to match the prints but when I open elements it doesn't use the same colors. If i have it use the calibrated profile b

    I have been having a issue with getting the colors on my monitor to match the colors fro my print lab. I now have the monitor calibrated to match the prints but when I open elements it doesn't use the same colors. If i have it use the calibrated profile by changing the color management settings, the color picker no longer shows true white or black. How do I get elements 12 to honor the new calibrated settings?

    Ok so I've done what you said and this is what it's come back ....
    I don't know that these are the errors , but they're the things which don't look right ...
    Throughout the shut down there is a recurring line ;
    It says ;
    Com.apple.launchd 1 0x100600e70.anonymous.unmount 301 PID still valid
    Then there are 2 more which I think are related ;
    Com.apple.securityd 29 PID job has I overstayed its welcome , forcing removal.
    Then the same with fseventd 48 and diskarbitrationd 13
    Oh and on Launchd1 : System : stray anonymous job at shut down : PID 301 PPID13 PGID 13 unmount...
    Then the last process says "about to call: reboot (RB_AUTOBOOT).
    Continuing...
    And stops ...
    Hope this means something to you ... Thanks again for your help so far :-)

  • Issues with using the output redirection character with newer NXOS versions?

    Has anyone seen any issues with using the output redirection character with newer NXOS versions?
    Am receiving "Error 0x40870004 while copying."
    Simply copying a file from bootflash to tftp is ok.
    This occurs for both 3CDaemon and Tftpd32 softwares.
    Have tried it on multiple switches - same issue.
    Any known bugs?
    thanks!
    The following is an example of bad (NXOS4.1.1b) and good (SANOS3.2.1a)
    MDS2# sho ver | inc system
      system:    version 4.1(1b)
      system image file is:    bootflash:///m9200-s2ek9-mz.4.1.1b.bin
      system compile time:     10/7/2008 13:00:00 [10/11/2008 09:52:55]
    MDS2# sh int br > tftp://10.73.54.194
    Trying to connect to tftp server......
    Connection to server Established. Copying Started.....
    TFTP put operation failed:Access violation
    Error 0x40870004 while copying tftp://10.73.54.194/
    MDS2# copy bootflash:cpu_logfile tftp://10.73.54.194
    Trying to connect to tftp server......
    Connection to server Established. Copying Started.....
    |
    TFTP put operation was successful
    MDS2#
    ck-ci9216-001# sho ver | inc system
      system:    version 3.2(1a)
      system image file is:    bootflash:/m9200-ek9-mz.3.2.1a.bin
      system compile time:     9/25/2007 18:00:00 [10/06/2007 06:46:51]
    ck-ci9216-001# sh int br > tftp://10.73.54.194
    Trying to connect to tftp server......
    |
    TFTP put operation was successful

    Please check with new version of TFTPD 32 server. The error may be due to older version of TFPT server, the new version available solved this error. Files are getting uploaded with no issues.
    1. Download tftpd32b.zip from:
    http://tftpd32.jounin.net/tftpd32_download.html
    2. Copy the tftpd32b.zip file into an empty directory and extract it.
    3. Copy the file you want to transver into the directory containing tftpd32.exe.
    4. Run tftpd32.exe from that directory. The "Base Directory" field should show the path to the directory containing the file you want to transfer.
    At this point, the tftpserver is ready to begin serving files. As devices request files, the main tftpd32 window will log the requests.
    Best Regards...

  • I have noticed an issue with utilizing the "stream" function on iOS 7. If you choose to just stream the movie by hitting the play button it seems to actually start downloading (which is fine) but if you are say halfway thru the movie and stop you can clea

    I have noticed an issue with utilizing the “stream” function on iOS 7. If you choose to just stream the movie by hitting the play button it seems to actually start downloading (which is fine) but if you are say halfway thru the movie and stop you can clearly see that storage has been reduced under the usage, yet under the “videos” tab it still states “No Data” the only way to delete what you have partially downloaded is to fully download the video, which is fine but there is no way to tell what videos have been partially downloaded (I.e which occurs a lot when your child switches between movies using the so called “stream” function). This becomes troublesome once the capacity of the ipad is almost met and you have no way to delete this data since you may have several videos that have started to be viewed (hence partially downloaded). Apple needs to somehow make it truly streaming or provide an update so the storage can be managed. The only way I have been able to remove partially downloaded videos is by doing a total software restore. (The video data that is in question when connected to my MacBook shows up in iTunes as “other”) if you have any insight into this issue it would be greatly appreciated. Thanks.

    Here are the screenshots for what it's worth.
    Not sure why I can't post them in the original post.<br>
    <sub><b>Mod edit: See [https://bugzilla.mozilla.org/show_bug.cgi?id=718813 bug 718813]</b></sub>
    '''Again, when I set my DNS server to automatically detect the servers both problems disappear and I have no issues at all.'''
    IMO opendns is either doing this on purpose (unlikely) or they're under some sort of attack/being used to attack the specific torrent sites although I'm open to other explanations. I believe using the automatic setting for DNS is using my own ISP's DNS servers (which again, work fine... but still...)
    I'd rather not use Google's public DNS servers as Google is to commercial these days and I think there's potential privacy issues.
    '''Again I have changed the setting for DNS servers back and forth several times to duplicate/verify the issue(s)... and the issues only happen with the opendns servers.'''

  • OBIEE 11g (11.1.1.5.0) - Issue with starting Node Manager

    Hi,
    Have anyone faced an issue with starting Node Manager in OBIEE 11g (11.1.1.5.0)? OS is 64 bit Linux, WebLogic is 10.3.5. I used the software-install method and followed by running config.sh. Everything completed successfully. I updated the catalog and rpd location in the FMW control screen.
    To get it activated I bounced services and when I try to start Node Manager it gives below error --
    <Aug 30, 2011 2:02:42 PM CDT> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
    <Aug 30, 2011 2:02:42 PM> <SEVERE> <Fatal error in node manager server>
    java.io.IOException: Unsupported cypher suite: TLS_RSA_EXPORT_WITH_RC4_40_MD5
    at weblogic.nodemanager.server.SSLListener.init(SSLListener.java:82)
    at weblogic.nodemanager.server.NMServer.start(NMServer.java:206)
    at weblogic.nodemanager.server.NMServer.main(NMServer.java:377)
    at weblogic.NodeManager.main(NodeManager.java:31)
    Aug 30, 2011 2:02:42 PM weblogic.nodemanager.server.NMServer main
    SEVERE: Fatal error in node manager server
    java.io.IOException: Unsupported cypher suite: TLS_RSA_EXPORT_WITH_RC4_40_MD5
    at weblogic.nodemanager.server.SSLListener.init(SSLListener.java:82)
    at weblogic.nodemanager.server.NMServer.start(NMServer.java:206)
    at weblogic.nodemanager.server.NMServer.main(NMServer.java:377)
    at weblogic.NodeManager.main(NodeManager.java:31)
    + set +x
    I see the same issue reported in ML OBIEE 11g - Node manager fails to start upon upgrade [ID 1329442.1] and WebLogic Server: Node Manager Startup is Failing with java.io.IOException: Unsupported cypher suite [ID 1329260.1] I tried to modify commEnv.sh. But it didnt help me.
    Please let me know if anyone have faced similar issue and what exactly did you do to resolve it.
    Cherrish Vaidiyan
    Edited by: Cherrish on Aug 30, 2011 3:14 PM

    Hi,
    There are Two types of Cipher suites --- Certicom Cipher Suite and SunJSSE Equivalent Cipher Suite. And with Weblogic 10.3.5, you are using Sun JSSE Cipher Suite, and by default Node Manager uses the Certicom Cipher Suite.
    In the nodemanager.properties, Add CipherSuite=SSL_RSA_EXPORT_WITH_RC4_40_MD5, save and restart Node Manager.
    Reference Metalink Note: WebLogic Server 10.3.x: Getting "Unsupported Cipher" Exceptions When Starting Node Manager [ID 1307325.1]
    Cherrish Vaidiyan

  • Having an issue with passing the text of a link to a session variable.

    I am having an issue with passing the text from a link to a session variable. I am adding this html as a literal for each item in the list that i have populated with a query.
    List<Literal> lit = new List<Literal>();
    for (int i = 0; i < posts.Count; i+=4)
    Literal someLit = new Literal();
    someLit.Text=
    @"<div class='row'>" +
    "<div class='col-md-12'>" +
    "<div class='panel'>" +
    " <div class='panel-body'>" +
    " <!--/stories-->" +
    " <div class='row'> " +
    " <br>" +
    "<div class='col-md-2 col-sm-3 text-center' id='javascript'> <h3>" +
    " <a href='#' runat='server' onserverclick='UserProfile_Click'>" + posts[i + 3] + " </a>" +
    "</h3>" +
    " </div>" +
    " <div class='col-md-10 col-sm-9'>" +
    "<h3><a href='Thread.aspx' runat='server' onserverclick='MyFuncion_Click'> " + posts[i] + " </a></h3>" +
    " <div class='row'>" +
    " <div class='col-xs-9'> " +
    posts[i + 1] +
    " </div>" +
    "<div class='col-xs-3'></div>" +
    posts[i + 2] +
    " </div>" +
    "<br><br>" +
    " </div>" +
    " </div>" +
    " <!--/stories-->" +
    " </div>" +
    " </div>" +
    " </div><!--/col-12-->" +
    " </div>" +
    "</div>";
    lit.Add(someLit);
    for(int i=0; i<lit.Count; i++)
    this.Controls.Add(lit[i]);
    I use one of the list positions as the text for a link in two different spots. For now, lets only talk about the line:
    <a href='#' runat='server' onserverclick='UserProfile_Click'>" + posts[i + 3] + " </a>
    Since I am generating these controls at pageLoad, I can't make them <asp:Linkbutton>s. And since they are anchor elements, I don't have access to an onCommand attribute or onservercommand attribute.
    All I want to do is access the content from inside the specific link tags that I generate on link click and set it as a session variable. That's what I would like my UserProfile_Click function to do. I cant commandargs it in like i can with a linkbutton's
    OnCommnad attribute, however.
    My fear is that the onserverclick attribute resolves so something else on pageLoad normally and since I am generating it the way I am similar to the way a <asp:linkButton> resolves to a generated JavaScript.
    Any help?

    @Brunellus
    For questions related to ASP.NET use the ASP.NET forum http://forums.asp.net     
    You should get more, better and faster answers on the other forum.  Thanks, ahead of time.
    Best Regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I have bought a used macbook, to bad i do not have the admin password. is there any way to bypass this issue with out the Mac OS X disk? (without loosing my obtained files?)

    i have bought a used macbook, to bad i do not have the admin password. is there any way to bypass this issue with out the Mac OS X disk? (without loosing my obtained files?)   I NEED HELP BADLY PLEASE....

    What version of the Mac OS X are you running. Go to the Apple in the upper left corner and select About This Mac and post the version.

  • Issue with getting the entire spooled job into the pdf document

    Hi All,
    My scheduled job runs fine and completes successfully but it appears to have some issues with getting the entire spooled job into the pdf document which it sends to a an end user.Has anyone encountered it before.Your kind assistance would be appreciated.
    Thank you.
    Regards,
    John

    Hi,
    Please read below link for your query:-
    http://help.sap.com/saphelp_nw04/helpdata/EN/85/54c73cee4fb55be10000000a114084/content.htm
    Regards,
    Anil

  • Issue with Removing the Patch Set Software 9.2.0.8

    Hi experts,
    I have issue with removing the patch set software 9.2.0.8
    I'm working on solaris box recently ugraded to 9.2.0.8 from 9.2.0.7. however i want to downgrade now. I have followed the document 4547809 mentioned. Now the real issue is when i restored the oracle_home (9.2.0.7) and execute sqlplus /nolog here is error message shown
    bash-2.05$ sqlplus /nolog
    bash: /oracle/test/920_64/bin/sqlplus: No such file or directory
    bash-2.05$ lsnrctl
    bash: /oracle/test/920_64/bin/lsnrctl: No such file or directory
    Please help
    thanks in advance

    Hi,
    Thanks for reply you are right
    ls -l /oracle/test/920_64/bin/sqlplus was not exist. However i copied everything from the backup.
    I'm trying again
    cp -r bk_test_home/* /oracle/test/920_64/*
    still i couldn't the file however it exist in bk_test_home. please suggest
    Thanks and regards

  • I am having issues with adjusting the duration of time for each still frame and transition in imovie 11.  Each time that I adjust these times, the app does not accept the change, and automatically enters its own time. Am I doing something wrong?

    I am having issues with adjusting the duration of time for each still frame and transition in imovie 11.  Each time that I adjust these times, the application does not accept the change, and instead automatically enters its own time. Is there a work around this? Or am I doing something wrong? Please Help!
    Thank you,
    lagrl

    Have you tried turning off automatic transitions ? Choose file - project properties and follow the dialogue box to change duration with a slider.  iMovie also doesn't allow a transition to be more than 50% duration of the clip its attached to. In other words if the clip is 4 seconds the transition cannot be more than 2 seconds and remember that relates to the first clip as the following clip (right side) is pulled back to overlay it.
    Does this help.  Perhaps you already know this ?

  • Has anyone else had issues with dropping the wifi connections since upgrading to Yosemite

    has anyone else had issues with dropping the wifi connections since upgrading to Yosemite

    Looking at the Yosemite forum, it is obvious that this is a very common issue.  You might want to post in that forum for help and advice.
    OS X Yosemite

  • Issues with getting the slide button to work after upgrade to iOS 7.02 and 7.03

    Ever since upgrading to iOS 7.02 and 7.03 having issues with getting the slide button to work to open up iPad 2.  Happened last week and was able to restore it to new and get it to work again and it worked great until one week later (this morning) doing the same thing.  Have tried restoring iPad to new 3 times (via itunes) and still unable to get the slide button to move so can use the iPad.  IPad able to charge, able to restore, able to sync with itunes even able to recover but not able to get past first screen where you have to slide to access iPad.  Any help would be greatly appeciated.  Live about 300 miles from nearest Apple store.

    I am beginning to wonder whether there isn't some weird problem with that Home button.
    Try this: Settings > General > Accessibility > AssistiveTouch = On
    This will place a button on the iPad's screen.
    You can move this button anywhere on the screen.
    This button gives you - amongst many other things - a soft Home button.
    To turn your iPad on, you can use the Sleep/wake button or move a small magnet across the bezel of the iPad where the volume controls are.
    If you use the magnet, then: Settings > General > Lock / Unlock = On
    Now should not need to press the Home button anymore.
    If this method allows you to use your iPad without a hitch, then suspect hardware problems with the Home button.

  • Hi am having issues with getting the list of users from the Active Director

    Hi am having issues with getting the list of users from the Active Directory, can anyone help me with this!

    Hi Jason,
    Try this:
    1.  In Ultiboard select Tools>>Netlist Editor>>Pins, press the Delete button
    2.  Select all nets in the Select the Net to Delete dialog and then press the Delete button.  This will clear all nets in the layout, don't worry all traces, parts are still on the design.
    3.  Go to Multisim and select Transfer>>Forward annotate to Ultiboard.    This will add all nets that you removed back and it should fix the pin problem
    Tien P.
    National Instruments

Maybe you are looking for

  • Windows Bootcamp no longer bootable

    Hi, I installed windows XP onto my MacBookPro about six months ago and everything was working fine.  I haven't used it for a couple months.  I decided I wanted to use Windows today and when I turned on my computer and held down the alt/option key, it

  • How do I turn off auto-numbering?

    I want to turn off auto-numbering in iWeb. I tried doing it in the Inspector under Text/lists by selecting "none" but that didn't work. Can anyone help?

  • Problems after changing to Windows 7 Enterprise

    Hi there everyone this is my first post. I have a HP Touchsmart PC IQ790.uk which has been a fantastic machine that Ive had since late 2008. This year I had the OS upgraded from Windows Vista Home Premium to Windows 7 Enterprise. Since making this ch

  • Conflict with Illustrator CS3?

    I was just wondering if anyone had heard of any conflicts occuring between flash studio 8 pro and Illustrator CS3. I'd hate to buy CS3 just to find out files were not compatible with one another. Any help would be appreciated.

  • Something added a Yahoo toolbar to Firefox, how do I get rid of it?

    A Yahoo toolbar and search was added to Firefox. I suspect I missed a box I needed to uncheck when something updated.