Set AD varaible through workflow Activity

So I was able to successfully unlock AD accounts using the below activity
<Activity id='3' name='UnlockAD'>
        <Comments>
          On Success do a global unlock .
        </Comments>
        <Action id='0' application='com.waveset.session.WorkflowServices'>
          <Argument name='op' value='checkoutView'/>
          <Argument name='type' value='Unlock'/>
          <Argument name='id' value='$(accountId)'/>
          <Argument name='subject' value='admin_user'/>
          <Argument name='authorized' value='true'/>
          <Return from='view' to='uview'/>
        </Action>
        <Action id='1'>
          <expression>
            <block>
              <set>
                <ref>uview.global.accountLocked</ref>
                <s>false</s>
              </set>
            </block>
          </expression>
        </Action>
        <Action id='2' application='com.waveset.session.WorkflowServices'>
          <Argument name='op' value='checkinView'/>
          <Argument name='subject' value='admin_user'/>
          <Argument name='authorized' value='true'/>
          <Argument name='view' value='$(myview)'/>
        </Action>
        <Transition to='Notify User'/>
      </Activity>However now I wish to set the AD "userAccountControl" attribute. I am using the same structure. my code is as follows:
<Activity id='3' name='UnsetNevExp'>
        <Comments>
         Set UserAccountControl to 512 .
        </Comments>
        <Action id='0' application='com.waveset.session.WorkflowServices'>
          <Argument name='op' value='checkoutView'/>
          <Argument name='type' value='User'/>
          <Argument name='id' value='$(accountId)'/>
          <Argument name='subject' value='adminuser'/>
          <Argument name='authorized' value='true'/>
          <Return from='view' to='neview'/>
        </Action>
        <Action id='1'>
          <expression>
            <block>
              <set>
                <ref>neview.global.userAccountControl</ref>
                <s>512</s>
              </set>
            </block>
          </expression>
        </Action>
        <Action id='2' application='com.waveset.session.WorkflowServices'>
          <Argument name='op' value='checkinView'/>
          <Argument name='subject' value='adminuser'/>
          <Argument name='authorized' value='true'/>
          <Argument name='view' value='$(neview)'/>
        </Action>
        <Transition to='end'/>
      </Activity>The trace looks like
            </Object>
          Application requested argument raiseViewErrors
        Returning from view to neview  = *object*
      Action
        Evaluating XPRESS
        Resolved reference neview.global.userAccountControl = 66048
        Assigning 66048 = 512
      Action
        Argument op = checkinView
        Argument subject = adminuser
        Argument authorized = true
        Argument view = *object*
        Calling application 'com.waveset.session.WorkflowServices'
          Application requested argument op
          Application requested argument view
          Application requested all arguments
          Application requested argument subject
          Application requested argument loginApplication
          Application requested argument loginApplication
          Application requested argument authorized
          Application returned =
            <WavesetResult>
              <ResultItem name='user' type='data' status='UI_MSG_SEVERITY_OK'>
                        <ResultColumns>
                          <List>
                            <String>UI_ATTRIBUTE</String>
                            <String>UI_OLD_VALUE</String>
                            <String>UI_NEW_VALUE</String>
                          </List>
                        </ResultColumns>
                        <ResultRows>
                          <List>
                            <List>
                              <String>userAccountControl</String>
                              <String>66048</String>
                              <String>66048</String>
                            </List>
                            <List>What am I doing wrong?
I have been at this for about 5 hours...Please help.

Ahh, a minor coding error!
Bad:
<set>
       <ref>neview.global.userAccountControl</ref>
       <s>512</s>
</set>Good:
<set name='neview.global.userAccountControl'>
      <s>512</s>
</set>

Similar Messages

  • Setting up of WF - BATCH for invoices released through workflow

    Hi all,
    i have set up the standard workflow for the Invoice Park and post which is working perfectly for the invoices. From the inbox the invoice is released by executing the work item. when i check the invoice document, the document is not getting posted, i believe there is a need to set up the user WF-BATCH, Could any body please advise as to how to set up the WF-BATCH so that the invoices get posted in the background.
    Thanks a lot in advance....

    Martin,
    Thanks for your reply. But, my question is, what and how can we tackle the witems that are struck.
    For example, in my case, the user has already taken decision from Portal side and he got a message that the approval task was successful and the witem is gone from his UWL. But, during this time, WF-BATCH was locked and so the "Result Processing" step that was done at the end of every witem execution, didn't happen. And hence the next witem also was not generated. But, if you see the wflow log, the witem status says, "COMPLETED". But if you expand the log for this step, then only we can see that the "Result Processing" was not completed by WF-BATCH.
    In this situation, will the SWPC be useful in troubleshooting the COMPLETED witems ? Pl clarify. I don't have access to SWPC right now and will definitely explore this.
    My biggest concern on this is, let us say, we have somany TRIP's in the middle of the approval process and the managers have already approved from their end. But, if the WF-BATCH is locked and no one noticed for a while, then it'll be a big task to identify each of these witems and Re-process them, even with SWPC,Right ?
    Please update on this.
    Thanks
    venu

  • Change in sender name of mail sended through workflow

    Hi All,
    I have requirement where we want to chage the sender name decription for mails which are going through workflow.When we send mails through send mail step in workflow it is taking sender decription name automatically as "GSAP E1B WORKFLOW SYSTEM".
    I have to change this decription to "OSIRIS Invoice". Is there any way to change sender name?
    We are using SENDTASKDESCRIPTION method of SELFITEM object in send mail step.
    Any help on this regards will be grate help...
    Regards,
    Rahul

    Hello Rahul,
    here, the sender's name is the user's name of the background user performing this task, i.e. usually WF-BATCH.
    If you do not have any other workflow scenarios running that could interfere here you could possibly just change that user's name.
    Otherwise you have to re-program the sendmail step to specifically set the sender description.
    Best regards,
    Florin
    P.S: Workflow issues have a separate forum:
    SAP Business Workflow

  • Problem in sending mail through workflow

    Hi All,
      I am trying to create a workflow. I created a workflow and once document is made, this workflow trigerrs and i am able to get user decision to my user id. once if i click on approve, mail should be triggered to my mail id. but mail is not coming to my mail id. i checked in SOST transaction, <b>mail status set to Transmitted.</b>, and not as sent .
    But i tested a sample test message from sbwp to my mail id and it is working fine. Only through workflow, sending message to outlook is not working. i checked my user in the system in SU01 transaction also, there also mail id is mentioned. what could be reason for not able to send mails through workflow.?
    Its urgent.
    Points will be awarded to all.
    Regards,
    vinoth

    Hi,
    Check that all the bindings have been done in proper way as it is configured.. Try to do the binding manualy..This could also be the problem..
    thank You

  • Unable to register custom workflow activity on MS CRM 2015 Online

    Hi All,
    I am trying to register custom workflow activity using plugin registration tool on MS CRM 2015 Online.
    Error says that 'No Plugin have been selected from list. Please select atleast one and try again'
    In short my assembly is not considered as custom workflow activity.
    I am giving my code let me know, If any thing is wrong.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Activities;
    using Microsoft.Xrm.Sdk;
    using Microsoft.Xrm.Sdk.Workflow;
    namespace Training.SamplePlugin
        public class SampleCustomworkflow : CodeActivity
            [Input("Birthday")]
            public InArgument<DateTime> BirthDate { get; set; }
            [Output("NextBirthday")]
            public OutArgument<DateTime> NextBirthDay { get; set; }
            protected override void Execute(CodeActivityContext executionContext)
                //Create the tracing service
                ITracingService tracingService = executionContext.GetExtension<ITracingService>();
                //Create the context
                IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
                IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();
                IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
                if (context.PrimaryEntityName.ToLowerInvariant() == "contact")
                    DateTime birthDate = BirthDate.Get<DateTime>(executionContext);
                    DateTime nextBirthDate = new DateTime(DateTime.Now.AddYears(1).Year, birthDate.Month, birthDate.Day);
                    //NextBirthDay.Set(executionContext, nextBirthDate);
                    Entity newContact = new Entity();
                    newContact.LogicalName = "contact";
                    newContact.Id = context.PrimaryEntityId;
                    newContact["new_nextbirthday"] = nextBirthDate;
                    service.Update(newContact);
    If code is correct then has somebody faced this kind of issue earlier, what is resolution.
    Thanks
    Apurv

    Have your signed your assembly ??
    Microsoft Dynamics CRM Training|Our Blog |
    Follow US |
    Our Facebook Page |
    Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

  • PDF upload through Workflow

    Hi All,
    case 1:
    is there any possibility to upload a pdf to an intranet through workflow?
    Case 2:
    when we upload a data in the excel or pdf, corresponding table should be get updated through workflow!
    pointers to this will be highly appreciated.
    Regards,
    Dinesh

    Hi,
    In a background activity step you do it. And if the path has to be given by the user then identify the path in a background step and
    send that to a method where you want to upload.
    If you want to go ahead using portal, the link that process through a Webdynpro application and upload it.
    Hope this would help to solve your issue.
    Regards
    Narin

  • Job Publication doesnt get changed data in Job Posting through workflow.

    Job Publication is not picking up the changed data in the Job Posting/Requisition through workflow.
    When I am changing the data in Job Posting and release it manually the changed data gets reflected in Job Publication but if I am releasing the Job Posting trough WF(automatically) then the Publication doesnt pick up the data.The workflows are working fine in the system still the problem exists.
    Thanks in advance for the reply.

    1-Log in portal with user id and pwd.
    2-Create a requisition initially.
    3-Create and release the Job posting(manually)
    4-Create and release the Job Publication(manually).
    5.Try editing the previous Job Posting and save it bu dont release the Job Posting manually.Now come to the personal page,when we again enter the same Job Posting ,the status of the Job Posting is set to "released" automatically by a Workflow.
    6.Now if we proceed for the Job Publication and try Displaying it,the edited changes in the Job POsting is not displayed.
    But if we have "released" the job posting manually then the changes are reflected in the Publication.
    The user wants to use the Workflow scenario and also wants the edited changes to be taken up by the Publication.
    Hope the following description helps out !
    thanks in advance.

  • Table Updation through Workflow

    Hi All,
              I have a scenario in my project in which a workflow is to be triggered when an entry is made in a table.
    Now this workflow has to read some data from some tables and then update some other tables.
    My doubt is it possible through workflows to update the tables? If yes is it advisable.Also how will the
    updation happen? Should methods for updation will be written in BO methods? Or should a task be called
    which does the same.
    Please suggest,
    Saket.

    Hi Saket,
    Yes it is possible!
    To trigger workflow from table updates you can use table level events. Refer to
    Re: WorkFlow when Data is changed in Table or program
    Also you can update a table from a workflow. To do this, create an Activity step in workflow. In this, you can call a BO method. This BO method would store the code to update the database table required.
    Just take care of the bindings between the method -> task -> workflow container.
    Hope this helps!
    Regards,
    Saumya

  • Custom Workflow Activity not showing in Plugin Registration

    Could anybody suggest what I am doing wrong here?
    I have created a Custom Workflow Activity using this sample
    Create a custom workflow activity. But this is not showing up as a plugin/activity type in Plugin Registration Tool. See image below:
    My sample code for the activity below:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Activities;
    using Microsoft.Xrm.Sdk;
    using Microsoft.Xrm.Sdk.Workflow;
    namespace TestCustomWorkflowActivity2
    public class SampleCustomActivity : CodeActivity
    protected override void Execute(CodeActivityContext executionContext)
    //Create the tracing service
    ITracingService tracingService = executionContext.GetExtension<ITracingService>();
    //Create the context
    IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
    IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();
    IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
    Platform
    Dynamics CRM 2013 On Premises v 6.1.2.112 (SP1 UR2 installed)
    Dynamics CRM 2015 Online
    .NET Framework version
    4.0
    Thanks and Regards,
    blog: <a href="http://technologynotesforyou.wordpress.com">http://technologynotesforyou.wordpress.com</a> | skype: ali.net.pk

    Hi,
    I can see only one difference with my code:
    I placed using detectives in namespace:
    namespace Crm_RTB_NewAcc.Workflow
    using System;
    using System.Activities;
    using System.ServiceModel;
    using Microsoft.Xrm.Sdk;
    using Microsoft.Xrm.Sdk.Workflow;
    using Microsoft.Xrm.Sdk.Query;
    public sealed class GetOrgLicense : CodeActivity
    // Define Inputs/Outputs
    [Output("Count")]
    public OutArgument<int> Count { get; set; }
    protected override void Execute(CodeActivityContext executionContext)
    //My code here
    Count.Set(executionContext, 5);
    Try to make same code. It working well. 
    Hi xjomanx,
    I just tried your suggestion, but still the class is not appearing in the plugin registration. Btw, could you please confirm what version of PluginRegistration you are using?
    blog: <a href="http://technologynotesforyou.wordpress.com">http://technologynotesforyou.wordpress.com</a> | skype: ali.net.pk

  • How to set field value in workflow SPD2013?

    Hi All,
    how to set field value in workflow SPD2013? Actually using Infopath, i need to update a field value through workflow.(Little differnt from SPD2010). How to do this?

    As Amit says, some elaboration here would be good.  You can use InfoPath as a form for either a list or a library and then set it to trigger a workflow upon item creation.  The workflow will consist a number of actions, one of which is the Update
    Field Item.
    More information on the available steps can be seen here.
    http://msdn.microsoft.com/en-us/library/office/jj164026.aspx
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • Posting Parked document through workflow

    Hello Experts,
    I have configured all the setting for document parking.
    I have posted the document through FV60, workflow has triggered to the 1st level. After the 1st level approval, it's triggered 2nd level approval as well.
    But after the 2nd level of approval, i am expecting to post the parked document. But it's not happening. Is there any other settings to post the parked document through workflow?
    Thanks
    Aswin

    Hi,
    Please go through the below wiki:-
    [http://wiki.sdn.sap.com/wiki/display/Snippets/ConfiguringparkingdocumentsworkflowinSAPsystem]
    Regards,
    SDNer

  • How to create installed base through workflow

    Hello everybody,
    We are doing a CRM implementation for a telkom company and we have a requirement as such.
    Suppose we are creating a contract for 10 products and then in the follow up transaction sales order I activate 5 of them.So my requirement is that we need to update the number of activated product in the contract as well..i.e- if 5 products are activated we need to ensure that in the contract this data is update.We want to achieve this functionality using workflows.Is there any method to created installed base components through workflow.
    Help would be sincerely appreciated.

    Hi N Panigrahi,
    I dont think there is no installed base component available for workflow for the scenario that you have explained.
    Regards
    Balaji E.

  • Email Notifications through workflow for all Approved and Rejected Orders

    hi,
    i have to send Email Notifications through workflow for all Approved and Rejected Orders to the user who have submitted the order for approval.how could it be done.please send ur solutions.
    regards
    yesukannan

    Hi,
    An option would be use Oracle Alert. Create an event based alert on the table where you have order approvals or rejections. This alert will be raised after inserting or updating this table. Create an action linked to this alert, and choose message as action type.
    This setup can be done under Alert Manager Responsibility.
    Regards,
    Ketter Ohnes

  • HT1689 I need to get my iPod to no longer be associated with the original i store account. My husband set it up through his account but now I have my own account. I don't want to go through his every time I want to make a change. how do I make this change

    I need to get my iPod to no longer be associated with the original i store account. My husband set it up through his account but now I have my own account. I don't want to go through his every time I want to make a change. how do I make this change?

    I am trying to stop using my I-pod under my husband's I-Tune account.  It was set up under his account and the only way I can use it under my account is to erase all of the songs my husband loaded on for me.  I had heard there is a duration that I-Pods are locked into to one account only, and I am trying to discover how I can use my account without having to erase everything on the I-Pod.  I know it sounds confusing but that's the way I-tunes have set it up.  thanks for asking.

  • Workflow Activity "Lookup Value" returns An error occured while enumerating the filter using [//WorkflowData/customvalue]

    I want to generate an Accountname using EmployeeID, FirstName and LastName via a workflow.
    I'm using the Granfeldt Workflow Activity Library (https://fimactivitylibrary.codeplex.com/)
    I'm using the FIM Powershell Workflow Activity (https://fimpowershellwf.codeplex.com/)
    Steps:
    Passing the EmployeeID, FirstName and LastName to the powershell Activity, generating a logonid based on logic.
    Add-PSSnapin FIMAutomation
    $EmployeeID = $fimwf.WorkflowDictionary.EmployeeID
    $Forename = $fimwf.WorkflowDictionary.Firstname
    $Lastname = $fimwf.WorkflowDictionary.Lastname
    'logic creating a custom logonid here
       ==> This works
    Returning data back to the workflow via that powershell script:
    $fimwf.WorkflowDictionary.Add('NewAccountName',$newlogonid)
       ==> This works
     Using Lookup Value Activity to read the Workflow data and update the [//Target/AccountName] fails.
    This gives an error:
           An error occurred while enumerating the filter 'string' .
    (where string is the actual generated userid that I've got back from the powershell script. Example dab2563)
    I tried with only [//WorkflowData], then this gives the error:
          Index was outside the bounds of the array.
    Any hints to solve this?    
    Kind regards,
    David

    The Lookup Activity is for looking up an object in the FIM Service. Seems like thats not what you're trying to accomplish.
    For updating the target of the workflow, just use the built-in Function Evaluator. The Lookup WF was not built for that and it is failing because you have not specified a valid XPAth lookup filter, such as /Person[AccountName='BillG']
    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

Maybe you are looking for

  • Change style property at run time

    Hi, I have one table with update icon(as column), if i click that icon of any row means it needs to change the table as editable. I don't know whether it is possible or not. If possible means please tell me how to do that. Thanks SAN

  • Run a mini displayport cable over a Thunderbolt port

    Hi I have a new imac with 2 thunderbolt ports - and I want to run a mini displayport cable over a thunderbolt port - is there any cable can solve this ?

  • BW Global Variables

    Hi All, Please help me out here. While executing any query in BEx, I get a selection screen which says "Current Calendar Day (SAP Exit)". It is defaulted to current date. This selection is not present in the query definition, and I dont expect it to

  • UDO update in matrix with conditions deletes data

    Hi, I have a form binded to a MasterData and MasterDataLines tables. I have three folders in this form. When I click a folder I set a conditions to the matrix datasource so that I can see only the relevant data for each folder. The problem is when I

  • Dot1x session timeout issue

    Hi currently we have an issue with our new dot1x authenticated WLAN. The clients get disconnected when the session timeout expires. As I have discussed with TAC the session timeout forces the client to reauth against RADIUS but should not disassoc hi