Results 1 to 3 of 3

Thread: workorder ServiceCompleted and user rights

  1. #1
    Join Date
    May 2007
    Posts
    36

    workorder ServiceCompleted and user rights

    Hi,

    when using the workorder ServiceCompleted=true to indicate that a workorder should have the Service Completed box set to true a user cannot unselect it.

    Have the following piece of code:

    Guid gWOItemID=new Guid(DetailReport.GetCurrentColumnValue("ID").ToString());

    //now that we have the Item, now can fetch the workorder from the woitem id
    Workorder w = Workorder.GetWorkorderByRelativeNoMRU(RootObjectTypes.WorkorderItem, gWOItemID);

    w.ServiceCompleted = true;

    which works, no worries.

    However if a user wishes to unselect via the normal Ayanova GUI (i.e. not via code) they get a warning message that they do not have the rights to do this (even though they normally do). To unselect we have to run a code with the ServiceCompleted set to false.

    I suspect that its somehow related to user rights. Any ideas, not a major issue since we have a work around.

  2. #2
    Join Date
    Aug 2005
    Posts
    186

    Re: workorder ServiceCompleted and user rights

    Hi Martin, so correct me if I'm wrong but the issue is not api related at all but boils down to some users are not able to set service completed to false in workorders using AyaNova windows application UI?

    If so then this should be directed to support if it's not working as it should.

    To help clarify (and since this is in the programming forum ) here is the exact code for the property in the workorder object which is checked by AyaNova UI to determine if the user can change service completed or not:

    public bool IsServiceCompletedEditable
    {
    get
    {
    if (Rights < SecurityLevelTypes.ReadWrite) return false;
    if (Closed) return false;
    return true;

    }
    }

    As you can see there is no particular right for service completed, it only checks to ensure they have read/write rights to the workorder itself and that the workorder is not closed. Closed on the other hand has it's own right but that should not apply here.

  3. #3
    Join Date
    May 2007
    Posts
    36

    Re: workorder ServiceCompleted and user rights

    Thanks,

    you are right regarding the problem.

    I need to do a bit more work here regarding what precisely is happening. We run Ayanova under Citrix and unsure whether this might be causing the problem.

    This case can be closed.

    Thanks for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •