Change 'Created' column/field value

I have a business requirement of changing the date of 'created' column/field of selected
document/s in a document library(it has to be changed to current system date). This has to be done by adding a custom button to the ribbon and providing authorization to the button. Please let me know if this is possible?

Hi,
Please refer to the following article.
http://www.learningsharepoint.com/2011/06/13/using-javascript-js-file-in-commandaction-of-custom-ribbon-button-sharepoint-2010/
In the above article, command action is JavaScript function. For example.
<CommandUIHandler
Command=”AboutButtonCommand”
CommandAction=”javascript:ChangeDate();“/>
Create a script file and refer to your command action.
//Referencing the Script
<CustomAction
Id=”AboutFilesButton.Script”
Location=”ScriptLink”
ScriptSrc =”/_layouts/RibbonScripts/ChangeDate.js”/>
You can add the following function to the "ChangeDate.js" file.
function ChangeDate()
var ctx = new SP.ClientContext.get_current();
var list = ctx.get_web().get_lists().getByTitle("CM");
var items = SP.ListOperation.Selection.getSelectedItems(ctx);
var item = list.getItemById(items[0].id);
item.set_item("Created", "2/13/2015"); //change the date
item.update();
ctx.executeQueryAsync(
function () {alert("Created date changed") },
function () {alert ("Error")}
Hope this works for you.
Please don't forget to mark it as answered, if your problem resolved or helpful.

Similar Messages

  • Click a report button to change a report field value

    Hello All,
    I need to create a report where when a user clicks a report button its image changes and a field relating to that record also changes from "N" to "Y"
    I had a look at this Denes's example located on this link
    http://htmldb.oracle.com/pls/otn/f?p=31517:133:7078361971556070::NO
    The only thing lacking here is the ability to change a record field when the user click the image.
    Would it be possible to change the record field value when the function is called ?
    Hope this makes sense
    Frank

    Hi Jing,
    I don't think it is easy, here is a sample that allows you to choose the page size and orientation (which are different master pages), Adobe LiveCycle Designer Cookbooks by BR001: Season Planner (or Year Planner) PDF Template
    It effectively defines the form against each master page and recalculates the widths and heights when the page selected is made, but I don't know of another way.
    Regards
    Bruce

  • Who has changed the Custom Field value?

    Dears,
    Need to know the information regarding how to fetch that who has changed the Custom field value from PWA/MPP.
    Example:
    There is a PDP (say ProjectInfo):
    There is a Custom Field added to that PDP (say Project Status = In Progress).
    Now for ProjectA, someone has checked out and changed the Custom Field "Project Status" from "In Progress" to "Closed".
    I need to fetch the information regarding who has changed that Custom field.
    In which direction should I move: Event Handlers, PSI???? Any other stuff?
    Thanks & Regards,
    Shravan

    Hi Shravan,
    I'm not a developer but I do know that you can use an event handler pushing the resource name and date in custom fields.
    Another way is to use a 3rd-party tool like
    FluentPro Audit Tool.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • Changing/Creating Country Field in Address from ESS

    Friends,
    I am using country version 99 and working on new Implementation of ESS on ECC6.0.
    Can any body help me with the following:
    -  I am not able to Change/Create Country Field in Address from ESS
    I got the solution. I need to do the Following:
    - viekn field in IT0003 ishould not be empty
    - Need to work on report RPUFACEVIEKN and the feature IVWID
    Can any one help me how to do this?
    Thanks in Advance,
    Preethi

    Hi,
    Please check the threads.
    Personnel Information----Tab
    java.lang.NullPointerException
    Re: PC_UI Switch in T77S0 Table and T582G
    PG162 after upgrade
    Re: action  chanage
    Thanks & Regards,
    Sandip

  • How to create a field value as constant while creating eCATT scripts

    Hello Guru's,
    I am updating thousands of records using eCATT.  How should i declare a field value as constant while creating a eCATT script it self,  so that it automatically picks that value and  update the records. I should not mention the field value in the upload file.
    Full points for the answer,

    Dont parameterize the value that you would like to keep as constant. Pass the default value to that feild while reocrding .

  • While adding custom field in urgent change-Create new field button in AET is not coming

    Dear All,
    we have requirement to add some custom fields in urgent change document. while adding custom fields using AET, create new field button is not coming.
    Thanks in advance. points will be awarded.
    Rahul

    Hi Jignesh,
    Thanks for your valueble inputs, it really helped me to understand the process.
    I checked in Web UI configuration for urgent change document as you mentioned but still that button is not coming.
    In transaction BSP_WD_CMPWB, i have created enh. set: Z_ENHANCEMENT_SET.
    Can you tell what to selelect in application and page popup which comes after selecting Enhance component button. Actually i tried but i am not able to add new record in conf.
    Thanks in advance.

  • How  to retrieve a column field value from an ADF table ?

    All,
    I have a backing bean where I have bounded a field of an ADF table.
    I would like, in the bean, to read the value of that field so that I can use it inside a task flow router.
    The question: how to read a value from a ADF table column field ?
    In the bean I have the getter and setter of the RichInputText ADF table field. But when I type:
    System.out.println("the name is: " + this.getName().getValue());
    or
    System.out.println("the name is: " + this.Name().getValue());
    I get a null pointer exception.
    Thanks in advance,
    Sergio.

    Thanks Marvin, but this is not really what I'm looking for. Or at least, it does not sounds like to be :)
    I need to get the value contained in a row cell of an ADF table.
    Let's say the table (two rows, three cells) contains these values:
    "table_A", "123", "John"
    "table_B", "456", "Peter"
    When I click on the first row, I need the value: "table_A". Once I got that value, I extract the last char, in this case: "A", and then I call a specific task flow from a task flow router (specified in the task flow router Cases property).
    When I click on the second row, the same process applies, only the router now points to another flow view.
    So to summarize, I need to get the value of a row cell in an ADF table. How to do that from within a javaBean in JDeveloper 11g Release 2 ?
    This is what I have in the bean; so far I've bounded the related row cell (herkunft) to the bean. Each time I select a row on the ADF table, the function setHerkunft() runs - I see that from within the JDeveloper console - but when I try to get its value, I get a null value - hence the surrounding if statement.
    package bean;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ValueChangeEvent;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    +public class taskFlowBean {+
    public RichInputText herkunft;
    public static String taskFlowView = "C";
    +public taskFlowBean() {+
    System.out.println("taskFlowBean constructor call");
    +}+
    +public void setHerkunft(RichInputText herkunft) {+
    System.out.println("set herkunft");
    this.herkunft = herkunft;
    if (this.getHerkunft().getValue() != null )
    System.out.println("herkunft is: " + this.getHerkunft().getValue());
    +//here taskFlowView will set accordingly with the herkunft value.+
    +}+
    +public RichInputText getHerkunft() {+
    System.out.println("get herkunft");
    return herkunft;
    +}+
    +public String getTaskFlowView() {+
    System.out.println("get taskFlowView ! : " this.taskFlowView);+
    return this.taskFlowView;
    +}+
    +}+
    Regards,
    Sergio.

  • Calendar Item : Created By field value should be copied to Attendees

    How do i make Created By  field copied to Attendees.
    In SharePoint designer, i would hide the attendees field so that the created by field is copied to attendees.
    It is already copied into attendees but when we have group calendar and we populate multiple name then whenever we add event, the event is registered for all the people which i dont want.
    So, i want to hide the attendees column and copy the created by column to the attendees.
    How do i achieve it.
    Thanks

    Create a workflow that runs every time an item is created or updated.
    on the workflow, update current item, set field "Attenddees" = CurrentItem.CreatedBy.

  • How to capture changes of custom field value

    Hi
    I am the project server 2010 administrator. i have 2 columns below
    1. task finish date
    2. myfield (task level custom field)
    when ever user made changes in task finish date then "myfield" task level custom field should capture the old values
    Is this possible in PSI or Event handler or Macros

    You would need to create an event handler.
    http://msdn.microsoft.com/en-us/library/office/gg615466(v=office.14).aspx
    kashif

  • "Modified By" Field Value is same "Created By" field value after the workflow completion.Sp 2010 workflows

    Hi All,
    I have a work flow A attached to List List1
    I have Added an item(now created by and modified by are same)
    Next Person B modified
    Ideally created by value and modified by value should be different, but they are same after the workflow completion
    This is very strange as i am not modifying  modified by field any where
           Please let me know any one has faced similar problem
    Thanks
    Ravi
    Ravi

    The workflow will run as the person who initiated it. As such if the workflow starts when an item is created then it'll be running as the user who created the item.
    When the workflow changes anything the 'modified by' field will be updated to show the identity the workflow is running under. I think that explains your behaviour?
    To change it you could use an impersonation step but that would simply replace one name with another. I don't think you've got access to the 'SystemUpdate()' method in workflows which would allow you to avoid updating the modfiied by and modified date fields.

  • Change Condit.origin field value from C to A in sales order

    Hi,
    We have to maintain Condit.origin field in Item-Conditions-Details in Sales Order.
    Path -
    Open a sales order, now db click on one line item and select conditions tab. Now db click on JMOD condition. After that you will see the Item-Conditions-Details. Now please see the Condit.origin under Control data heading.
    In my system, it is automatically selecting C - Manually entered and it is non-changeable. How can i change it to A - Automatic pricing.
    Plz guide..

    We are creating Condition record in VK11 with below shown inputs:
    Condition Type - JMOD
    enter
    Select Sales organization radio button and enter
    now we are creating a new Excise condition entry.
    Sales Organisation.........Proc. Stat.......Amount........Unit.......Valid From.........Valid to......Tax Code..
    1000...............................01..................10000...........INR........01.03.2010.......31.03.2010........A0
    and save.
    when we are creating new sales order...we don't see any changes in item condition's...C is still there...
    plz guide...

  • XSLT mapping to change the DOCREL field value.

    Dear All,
    There is an IDOC to IDOC scenario where both the inbound IDOC and the outbound IDOC is the same. There is no change in any values of any field except the DOCREL field. The version number should change from 6.02 to 7.3.
    I need to write a XSLT mapping program to meet the criteria. As I am new to XSLT mapping, any suggestion is welcome.
    Thanks and Regards,
    Rana Brata De

    Hi,
    Try putting the desired DOCREL value in the "Seg. release in IDoc type" field in the partner profile of the sender system. This should help you avoid the costly XSLT preparation and the transformation being executed for each message.
    Hope this helps,
    Greg

  • Change hidden form field value

    hi everyone...i'm hoping someone can help me figure out how
    to change the value of a hidden field in a form. i have a page
    setup where users pay a website fee. since the fee is always the
    same, i have the amount setup in a hidden field in my form. my
    question is, i'd like to use promo codes. so i'll add a box in my
    form that says "enter promo code." then there's a link in the form
    that says "apply promo code." i'm thinking that link needs to
    refresh my page and take the value entered by the user in the promo
    code form field and place it in the url. that way i can write a
    cfif statement to change the value of the hidden field. the problem
    is, i can't figure out how to "refresh" the page and take the value
    out of the form field and place it in the url. hope this makes
    sense. maybe someone can offer a better way to do this? i'd truly
    appreciate any help anyone can offer. thanks!

    You would change the amount on the processing page with
    ColdFusion (after the form is submitted), but prior to the CFHTTP
    call. You really should familiarize yourself with CFHTTP (check
    online documentation). It sounds like it is exactly what you need.
    The format of your application would be something like:
    promocode.cfm:
    ====================
    <form name="someform" method="post"
    action="process.cfm">
    <input type="text" name="name">
    <input type="text" name="address">
    <input type="text" name="promocode">
    <input type="hidden" name="order_price"
    value="#OrderValue#>
    </form>
    process.cfm
    ======================
    <!--- Apply promo code --->
    <cfif form.promocode eq "Promo1">
    <cfset form.order_price = .75 * form.order_price>
    </cfif>
    <cfset sales_tax = .1 * form.order_price>
    <!--- Send data to processor gateway --->
    <cfhttp url="https://www.myProcessor.com/gateway/"
    method="POST">
    <cfhttpparam type="FORMFIELD" name="price"
    value="#form.order_price#">
    <cfhttpparam type="FORMFIELD" name="tax"
    value="#sales_tax #">
    <cfhttpparam type="FORMFIELD" name="cc_number"
    value="#cc_num #">
    </cfhttp>
    <!--- Check response --->
    <cfif FindNoCase("Success Text", CFHTTP.fileContent)>
    Good Response
    <cfelse>
    Bad Response
    </cfif>

  • Changing descriptive flex field value

    I have looked and looked through the flexfield functions in the administrative responsibilities and cannot find the field I'm looking for to change the label for a flexfield. The navigation path to get to the flexfield is below:
    AR RECEIVABLES MANAGER responsibility > COLLECTIONS > CUSTOMER ACCOUNTS > ENTER CUST # and find > CLICK CUSTOMER BUTTON > CLICK DFF FIELD IN UPPER RIGHT TO VIEW FLEXFIELDS
    Can someone tell me how I can find the descriptive flexfield's name (Help->Diagnostics maybe?) and search for this thing to change it? Which fields do I need to search for in which form? I have tried searching everything I know to search.
    Thanks!

    Let me try to help you.
    Why I did was drilled down to DFF in Application Developer Responsibility.
    1) Flexfields --> Descriptive --> Register.
    2) Query for "Receivables" in Application Field and "Customer Information" in the Title field.
    If you wana see the segments for the particular DFF
    1) Flexfields --> Descriptive --> Segments.
    2) Query for "Receivables" in Application Field and "Customer Information" in the Title field.
    3) Segments Button. Before you change the name the segment or add additional segment Uncheck Freeze Flexfield Definition
    Let me know if its good enough.
    Sachin

  • Change process order 'Created By' field

    Hi,
    I am creating process order by planned orders through transaction COR7.
    My requirement is to change 'Created By' field.  The transaction update the Created By field with login id.
    Is there any way to  change this field with userid other than login id.
    I have already checked all the user exits used in this transaction.
    Regards,
    Seema Naharia

    Hi,
    Is the document which you want to change the “Document Created By”  referred by others?
    Is the versioning or workflow turned on in the document library ?
    Are there some other  influences  if you delete the file and upload it again?
    If the answer is “No”, I suggest you to delete the file and add again in code.  Then you can change the “Author” column of the document
    as the method what Steve.Curran said.
    SPDocumentLibrary targetLib = (SPDocumentLibrary)web.Lists["your documents"];
    SPFile file = targetLib.RootFolder.Files["your file"];
    byte[] fileBins= file.OpenBinary();
    file.Delete();
    SPUser createBy=web.EnsureUser("your user account");
    DateTime created=new DateTime (2010,1,1);
    SPUser modifiedBy=web.EnsureUser("your user account");
    DateTime modified=new DateTime (2010,1,1);
    targetLib.RootFolder.Files.Add(file.Name, fileBins, createBy, modifiedBy, created, modified);
    Hope it’s helpful to you.
    I think I can.

Maybe you are looking for

  • NoClassDefFoundError at runtime

    Hi, everybody: I am a new commer to Java programming. I recently downloaded and installed the Java JDK 1.3.1 version on my Windows 98 and Windows 2000 computers without any installation problem. I wrote a very simple program and compiled from command

  • Acrobat 9 Form works via email but not uploaded to website

    Hi all. I need to be able to have people go to a url, fill out a form and then e-mail it to the company. The e-mailing part works perfectly if I e-mail the form to myself but when it's uploaded to the company's website nothing happens. Is it possible

  • IDoc to IDOC, Message Mapping settings

    Hi! I am going to implement IDoc to IDOC scenario. The IDOC should be send from SAP ECC 6.0 system, client 100 to the same system in client 200 via SAP XI. I have chosen the message type MATMAS05. Questions - What is the minimal message scenario (MAT

  • Errors in Map class

    Hello Everyone. Well I working on a program that uses Map class and I have some errors. They are listed as. on line 110 Type safety: The method put(Object, Object) belongs to the raw type HashMap. References to generic type HashMap<K,V> should be par

  • [SOLVED] temperatures in conky

    I'm having trouble getting conky to display my CPU temps. sensors says this: # sensors it8718-isa-0290 Adapter: ISA adapter in0: +1.38 V (min = +0.00 V, max = +4.08 V) in1: +2.13 V (min = +0.00 V, max = +4.08 V) in2: +3.26 V (min = +0.00 V, max = +4.