Doc.getCurrentPhase doesnt return Executed phase

Hi All,
I have written a script on onLoad for a contract(2002 class). I have to enable/disable an extension collection based on the phase in which the contract is there. So i have written the following code.
phase=doc.getCurrentPhase().getDisplayName();
if(("Executed").equalsIgnoreCase(phase))
IapiDocumentLockManager.unlockField(session,doc,"Coll_attachment");
else
IapiDocumentLockManager.lockField(session,doc,"Coll_attachment");
But the problem is doc.getCurrentPhase().getDisplayName() is returning a value only when the contract is in draft stage. If the contract is moved to any other phase like supplier draft, waiting for approval or executed doc.getCurrentPhase().getDisplayName() is not returning anything.
Thanks in advance.

Hi Mudit,
Thanks for the reply....
I have tried with getCurrentPhase().getDisplayName(session) but it is throwing some exception. Instead tried getCurrentPhase().getDisplayName() then it atleast displayed Draft phase.
Is there anything we are missing like do we need to do anything from configuration?
Thanks,
Srikanth Emani

Similar Messages

  • Need to do one field as non editable once a document is moved to 'executed' phase.

    Hi All,
    I have a field called 'comment' in Contract document. And once the document is moved to Executed phase all the fileds becomes non editable. And since 'Comment' is free text my user wants to do it as editable even when the document is in executed phase.The phases include
    1.Draft
    2.Budget Owner Approval
    3.Financial Approval
    4.Procurement Approval
    5.Approved
    6.Digital Signature
    7.Executed
    I tried this both in post phase script as well as pre phase script and found it's not working. Please suggest your ideas. Is there any other place I need to add code.
    Postphase
    if (phase.equals("Executed"))
    logMsg.setLogMessage(" Executed START ");
    Logger.info(logMsg);
    //Changes done by me
    comments = doc.getExtensionField("NON_DIGSIG_COMMENT").get();
    logMsg.setLogMessage(" Comments are " + comments);
    Logger.info(logMsg);
    IapiDocumentLockManager.unlockField(session,doc,"NON_DIGSIG_COMMENT");
    //Changes ended
    parent = doc.getParentIBean();
    if (hasValue(parent))
    // get associated vlv value for phase
    ValueListValueIBeanHomeIfc vlvHome = IBeanHomeLocator.lookup(session, ValueListValueIBeanHomeIfc.sHOME_NAME);
    if (classinfo == 1004)
    {// parent is Master Agreement
    vlvBean = vlvHome.findUniqueByNameType("Executed Agreement",10);
    } // end if classinfo == 1004
    else
    vlvBean = vlvHome.findUniqueByNameType("Executed Agreement",1);
    } // end else
    if (hasValue(vlvBean))
    vlvLocalizedRef = vlvBean.getLocalizedObjectReference();
    // set parent status
    parObjRef = doc.getParentIBean().getObjectReference();
    parentHome = IBeanHomeLocator.lookup(session, parObjRef);
    parentHome.upgradeToEdit(doc.getParentIBean());
    doc.getParentIBean().setStatusRef(vlvLocalizedRef);
    logMsg.setLogMessage(" Parent Status updated to " + vlvLocalizedRef.getDisplayName() + " ");
    Logger.info(logMsg);
    parentHome.save(doc.getParentIBean());
    logMsg.setLogMessage(" Parent saved ");
    Logger.info(logMsg);
    } // end if hasValue(parent)
    logMsg.setLogMessage(" Executive Summary Approval END ");
    Logger.info(logMsg);
    Prephase
    if (hasValue(other_phase) && hasValue(phase) && phase.equals("Approved") && other_phase.equals("Executed"))
            logMsg.setLogMessage("Entering comment block");
            Logger.info(logMsg);
            //Changes by Lakshmi
            comments = doc.getExtensionField("NON_DIGSIG_COMMENT").get();
        logMsg.setLogMessage(" Comments are " + comments);
        Logger.info(logMsg);
        IapiDocumentLockManager.unlockField(session, doc, "NON_DIGSIG_COMMENT");
            if (!bypassCheck)
            ae.chainAtEnd(doc.createApplicationException("NON_DIGSIG", "zclm.contractdocument.advancetoexecutedfromapproved"));
        } // end if (hasValue(other_phase) && hasValue(phase) && phase.equals("Approved") && other_phase.equals("Executed"))
    //Block added my me
        if (hasValue(other_phase) && hasValue(phase) && phase.equals("Digital Signature") && other_phase.equals("Executed"))
            logMsg.setLogMessage("Entering comment block");
            Logger.info(logMsg);
            comments = doc.getExtensionField("NON_DIGSIG_COMMENT").get();
        logMsg.setLogMessage(" Comments are " + comments);
        Logger.info(logMsg);
        IapiDocumentLockManager.unlockField(session, doc, "NON_DIGSIG_COMMENT");

    I agree with the definition of a position - that it's an occurrence of a job in an Organization. And I also couldn't agree with you more: that defintion shouldn't preclude you from moving the position around the company with re-orgs etc.
    Sadly that's a limitation of Oracle HRMS and there is no way to change the Organization of a position. You'll just have to streamline your processes to clone positions instead. Here, Position Copy is your friend:
    *HRMS Manager > Work Structures > Position > Position Copy
    There are also other tools that may help. Check out:
    Need To Change the Organization Associated with a Position [ID 375483.1]
    Does that help?

  • After successful install, all my adobe cc docs, when open, change pointer arrow, i-beam and window to oversize. When doc closes all return to normal size. I'm on a PC. Screen res set to medium 1920x1200. Any ideas how to fix?

    After successful install, all my adobe cc docs, when open, change pointer arrow, i-beam and window elements to oversize. When doc closes all return to normal size. I'm on a PC. Screen res set to medium 1920x1200. Any ideas how to fix?

    Ok thanks Linxup I would recommend posting in the respective forums for each of those software titles as opposed to the Creative Cloud Download & Install forum.  The relevant forums are as follows:
    InDesign - InDesign
    Illustrator - Illustrator

  • Not able to check-in file after contract document in executed phase

    Hi All,
    I am trying to attach the final signed document to contract document after EXECUTED phase.
    The default behaviour shown on application is, when Contract Document is in EXECUTED phase, Check-in, Check-out is disabled on edit(pencil icon). Also, delete option is still enabled(Trash Icon). It should be disabled.
    Please suggest how this can be resolved.
    Thanks,
    Saloni

    DMS Folks.....
    if you came across this type of error then let me know ...
    Am I missing any configuration ?
    For HTTP request (like portal/webdynpro) do we need HTTP content server or normal content server will work for same.

  • SDO_RELATE command with 'coveredby' option doesnt return record as expected

    Hi all,
    I use oracle spatial 10.2. I use sdo_relate to compare 2 tables' geometries. The case is table 1 has ~2000 records, each is a retangle and has sdo_geometry field. 'Table 2' is transient geometry defined by sdo_geometry to a rectengle.
    The definition of the table 2 is:
    SDO_GEOMETRY(2003, NULL,NULL, SDO_ELEM_INFO_ARRAY(1,1003,3), SDO_ORDINATE_ARRAY(-50,50, 50,-50)), 'mask=COVEREDBY') = 'TRUE';
    I am working in world coordinates.
    and the whole SQL for comparison is:
    select name from KMK.summary where sdo_relate(mbr,SDO_GEOMETRY(2003, NULL,NULL, SDO_ELEM_INFO_ARRAY(1,1003,3), SDO_ORDINATE_ARRAY(-50,50, 50,-50)), 'mask=COVEREDBY') = 'TRUE';
    The problem is that this command doesnt return any values, i.e no records are selected from table 1. I am sure that there are features that evaluate to true for 'mask=COVEREDBY'.
    here is one of them:
    SQL> SELECT SDO_AGGR_MBR(mbr) FROM kmk.summary where name = ' GETDB_GLOBAL_004065_00O';
    SDO_AGGR_MBR(SHAPE)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_
    SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3), SDO_ORDINATE_ARR
    AY(-50, -25.25, -48.25, -24.5))
    this teature's MBR goes to -50 and it should be selected.
    What do I wrong?
    Thanks

    Hi I will give it a try on Monday for the numwidth20
    I tried with inside mask and it returns the right number of records - only those that are completely within/inside the mask. Thisone record is still not selected.
    I use ARCGIS on the same table with SDE so I know what number of records to expect.
    When you did the test was GETDB_GLOBAL_004065_00O selected with coveredby mask?
    We are running v 10.2.0.3 could this make a difference?
    It seems to me that when the coordinates are evaluated the algorithm uses the following for comparison:
    (in case of coveredby/inside) it comapres every point to the mask pounts and if it is less than it returns FALSE, it doesn't check if is is equal as well to return TRUE. On the other hand it checks if it is more or equal and if it is returns TRUE. That is why it selects record that have one boundary on top of the search window but extent outside it.
    EDIT: It seems it is the precision. When I set it to 25 it returned -50.0000000003723 for the Xmin.
    Now, this table has been created from and ESRI shp file, imported to oracle using ArcSDE. Do you have any idea of shp files and how the precisions are utilized in oracle?
    Edited by: garnet on Mar 16, 2009 10:13 AM
    Edited by: garnet on Mar 16, 2009 4:31 PM

  • Pa_projects doesnt return any data

    HI,
    I'm using API PA_PROJECT_PUB.ADD_TASK to insert tasks data to PA_TASKS table
    The API returns me ' Invalid Project ' error message
    On exploring the procedure code I found that it is querying pa_projects table
    Also when I used the following in my toad
    begin
    fnd_client_info.set_org_context('204');
    end;
    select * from pa_projects -- it doesnt return any rows
    However the following query returns rows
    select * from pa_projects_all where org_id=204
    Can any one please help me how to populate pa_projects table or what data will be there in pa_projects
    Thanks for your help
    Regards
    Ravi

    Hi Sandeep,
    I followed the instructions mentioned , but I still get no rows returned
    Any more Suggestions ?
    Thanks
    Ravi

  • Word Docs have become Unix Executable Files!

    The subject says it. This has happened on both my wife's iMac G5, and my MacBook Pro. Some, not all, of our Word docs, (both using 2004, running OS X.4.7) have had their icons turned into a gray console, and in "Get Info" identify themselves as "Unix Executable File." When opened in Word, I get the option to open as if it were a foreign file, and typically, it opens with all formatting gone, and all kinds of bizarre characters at the beginning (and sometimes end) of the doc.
    Now, I can salvage the data, it seems, but is there some way to simply undo this damage without manually going through every file?
    I must say, this is exactly the kind of junk that I would expect to find on a PC. This is a stunningly bad problem, by far the worst I've experienced in almost 15 years of using Macs. I would assume that Apple is aware of this, and that they can:
    1) Explain what happened.
    2) Explain a quick and easy fix.
    Thanks to anyone (from Apple or otherwise) who can do 1 and 2 above.

    Jeffois,
    The first command I gave to you will render the directory in question, and all nested directories, inaccessible. The second command will make the diretories accessible again.
    There is a possibility that there are files in this directory structure which are not owned by you. Not likely, but I must make the assumption that these could be encountered when I give such commands "in the dark" as it were. In such a case, you would see an error regarding these files, thus the warning.
    You can return your directories to accessibility using the second command, regardless of errors you might encounter. If you do encounter errors, I will post a different form of the same commands that will work.
    Be prepared to deal with this problem any time you transfer files from a Windows-formatted volume. This is not a Windows problem, but rather one of differences between the two file systems. If you see a file show up with the executable icon, you might want to remove the execute bit right away. Unfortunately, there is no way to do this in the GUI, so you must resort to using Terminal.
    This shouldn't be too much of a problem. Just open Terminal, type this text with a traling space:
    <pre style="overflow:auto; font-family: 'Monaco'; font-size: 10px">chmod a-x</pre>
    then select all of the new files and drag them all into the Terminal window. This will create a rather long command line that includes the full path to every file you dragged in. Just press <RETURN>, and "POOF," no more execute bit!
    Scott

  • Exchange rate in header of acc.doc after posting return to vendor

    Hi Gurus,
    in accounting document, when i recalculated amount in doc.currency & amount in local currency in item line was not same with exchange rate in header section...Anyone can explain to me why this miscalculation can happen ?
    Thanks

    Hi Zafar,
    exchange rate in header of this acc.doc was take automatically from table OB08 & the problem is in item line this acc.doc which is generated automatically after posting return to vendor the calculation amount in local currency was not take the exchange rate from header but from exchange rate when GR ( FLow : mvt 101--> mvt 122 ). so this is normal behaviour or there are bug ?
    thanks in advance

  • No FI Doc created from return delivery transaction.

    Dear Guru,
    I did open PO for asset procurement. All processes from PO creation until LIV and payment were completed successfully. Depreciation was run for asset purchased for the period 9. After that period was closed successfully. In period 10, asset purchased in period 9 must be returned to vendor. I did issue credit memo and do return delivery (using MIGO). However, I found that FI doc was not generated and account was not posted. What is the cause and solution to the problem? Thank you very much.
    Cheers,

    Hai
    Try to reverse the depreciation documents first and then return the asset
    Regards
    lakshmi

  • ExecuteNonQuery doesnt return number of rows affected when used with PL/SQL

    ExecuteNonQuery doesn't return number of rows affected when used with PL/SQL but returns -1. The documentation says ExecuteNonQuery method of OracleCommand returns the number of raws affected but when used with PL/SQL, it returns -1 even the update statement successfully executes and affects multiple records with no exeptions thrown.
    However, if ExecuteNonQuery is used with update sql statement in the asp.net code it returns number of rows affected correctly. Does anybody know why ExecuteNonQuery behaves like this?
    I am using ODP.NET that comes with Oracle Client 11g. The version is 2.111.6.20 of ODP.NET, Oracle database server is 10g.
    Marat

    You can get the rowcount in the stored procedure via SQL%ROWCOUNT and then pass it out as a parameter.
    For example:
    SQL> create or replace procedure updatesal(v_deptno in number, v_rowsaff out number) as
      2  begin
      3  update emp set sal = sal * 5 where deptno = v_deptno;
      4  v_rowsaff := SQL%ROWCOUNT;
      5  end;
      6  /
    Procedure created.Cheers

  • PO selection criteria doesnt return the correct values!

    Hi all,
    We are working on SRM 5.0 (SP11),standalone scenario.
    The problem we are facing is that when some users execute the trasncn PROCESS PURCHASE ORDERS and enter any selection criteria,only the PO's with status 'held' are displayed.Also this problem occurs only for some of the users.For other users,the search returns all the PO's.
    The roles/authorizations/profiles are same for all the users who are using this transaction.
    The notes Note 1138911 - BBP_POC - Search issue in purchase order,Note 1128758 - BBP_POC: Search Issue in Purchase Order are applicable in our case as we are on SP11 but we are not able to understand why the search criteria is working for some users while  for others the list is not displayed properly.
    Has anybody faced a similar issue.All responses will be rewarded.

    Thanks for the feedback.
    I have created this as a report and therefore the subscreen is defined in a report include - not sure this is the best way to do this. I would be interested to knw how you got this to work?
    Did you create a function group and then a function module to create the subscreens?
    In this case did the search helps relating to the subscreen selection screen work?
    Appreciate your thought <<text removed by moderator>>.
    Cheers,
    Dannyboy?
    Edited by: Matt on Dec 7, 2008 8:23 PM

  • CVI_ActiveApp doesnt return second Application

    I'm using CVI_ActiveApp and CVI_AppGetProjectVersionInfo and so on to mess around with versions.
    The ppplications I built with CVI automation runs as part of the build process (get/set version in prj and in a header file).
    Everything works fine as long as there is only one CVI instance running. 
    If there is another CVI  instance running and the interisting one is the second, the run of my get/set version app fails (luckily it does) if the first instance has loaded another project than the second because CVI_AppGetAbsPathFromProject doesn't find the mentioned header file because CVI_ActiveApp returns a handle to the first app which project doesnt contain this file. 
    This confuses me, because the name contains "Active" which means to me that the app handle of the CVI instance is returned which is active (has focus, title bar looks like one of an active window).
    Is there a possibility to get the app handle of the app which is really active (as described before)?

    "Active" does not refer to the instance with window focus, but rather to the currently registered ActiveX server. Depending on whether your multiple running CVI instances are different versions, and the order in which they were launched, any one of them could be the "active" CVI instance. Unfortunately, your problem isn't just one of identifying the instance of CVI you're interested in. The real problem is that when multiple instances are running, there is only one particular instance that may be controlled through automation, and that may not be the one you want. This is a limitation of the CVI automation server, and unfortunately, I don't think there is a way around this. You could repeatedly call CVI_ActiveApp and CVI_AppExitCVI until CVI_AppGetAbsPathFromProject succeeds, but that may not be a satisfactory approach for you.
    Mert A.
    National Instruments

  • Using LIKE operator doesnt return results

    Hi
    I'm very new to SQL and databases in general. I have a vb.NET app in which I'm trying to send a SQL server to a SQL Server 2012 server.
    For testing purposes Im using SQL SErver Management studio. I have one query that works, but when I try to use the exact same query using wildcard in the statement, it returns no results even though I know for a fact that the table contains such values.
    This works:
    SELECT number
    FROM casenumber
    WHERE number = '100510'
    This, for some reason, does NOT work:
    SELECT number
    FROM casenumber
    WHERE number LIKE '100%'
    What am I doing wrong? Help, pretty please? Many thanks in advance!

    When you use WHERE number = '100510' to get your result, it is not right way to do it.
    When you ask Tsql question, you should provide your table DDL (table column and data type...).
    Since your number column is a float numeric type, you don't need to use quotes around it. You cannot use
    a string LIKE search with a number unless you convert the column to string type.
    The final query may give you the result you want but you still don't get the point for this question.
    To operate with the appropriate data type matters a lot in T-SQL. 

  • Why are mxml docs showing as Unix executables?

    Every time I save an mxml file, either from Flex builder,
    TextMate, or BBEdit its icon shows as a Unix executable (and it
    does indeed have execute set).
    Why is this, and how can I ensure it always just shows as a
    plain text file, which is what it is?

    I think Tom has nailed it. I took an old postscript type 1 outline font and stripped its resource fork. The Finder promptly displayed it as a UNIX executable. All the information is actually IN the resource fork, there isn't a data fork in those fonts. So if the Finder is showing the UNIX executable icon it means the resource fork got nuked somewhere along the way, and there is no data left for any font management program to import.
    Fonts cannot travel gracefully from OS 9 to Tiger by way of some other file system--the resource fork gets lost. If you still have them on their original drive try putting them in a folder and stuff or zip the folder, then burn the folder to a CD or put on thumb drive or something, and copy the stuffed/zipped folder to Tiger.
    Francine
    Francine
    Schwieder

  • Doesnt return to position on page when clicking on an article then returning

    when reading newspaper online if click on specific article to read it when you return to main paper it does not recognise where you were on the page before leaving it and returns to a random point on the page unlike chrome which drops you back where you left

    Hi 1757victor,
    These bugs have been filed on this as well:
    [Bug 942736 and Bug 1038642 - [B2G] Navigating back often returns you to the top of the page]
    I currently do not have an idea of when this will change, but it is assigned and looks like it is being worked on.

Maybe you are looking for

  • My 2011 17in macbook pro is running slow with no hints as to why?

    Earlier this week I was playing a game on my windows partition and noticed it was incredibly slow so I went to the osx partition and it was slow there as well. By slow I mean when I type it takes awhile for the text to show up or changing from progra

  • Code for capture digital data when change of state

    Dear Sir, I had written a program to capture the digital data when it change of state. It work well when I check the check box "Lock file for faster access". But error occur when it unchecked. Because I need to open the tdm file at the vi running, th

  • Transaction Isolation Level to Read UnCommited in Non OLTP Database

    HI, We are having a database which for NOT OLTP process. That is OLAP DB. Operation on that DB is only Select and (Incremental Insert - FOR DWH ) not Update/Delete and we are performing ROLAP operations in that DB. By Default SQL Server DB isolation

  • Cover Flow - From Shared Library

    Howdy all, I am sharing my iTunes library from one Mac, and accessing it from two other MAC's. The remote machines do not have access to the Cover Flow View for the shared library. Why? Is it possible to make that work? Thanks.

  • Order events by date in left panel ?

    I have just installed the trial version of aperture 3. I have imported my iPhoto library of 155gb with many events from a round the world trip. When I click on iPhotoLibrary and select browser I can see all my events in the main viewer panel and then