How to save loggedinuser in the cdt ?

hi  i need to display the logged in user in the text field and must save the name into the cdt .

Please follow the Screenshot

  Discussion posts and replies are publicly visible

Parents Reply
  • The saveInto property only occurs if there is some kind of interaction with the field. In this case, the field is read only, so there's no interaction (hence why the value doesn't get saved).

    The best way to think about doing this is what kind of action makes sense for saving these values. I'd suggest using the "Add Timesheet" link in order to populate the value, since the user must use that link to add a row. Here's how you can set up the dynamic link:

    addRowLink: a!dynamicLink(
      label: "Add Timesheet",
      saveInto: a!save(
        target: ri!timeline,
        value: append(
          ri!timeline,
          type!Timesheet(employerName: loggedInUser())
        )
      )
    )

    Another common way to save this data is on button click, since you can also guarantee that the user will click the button to submit the form.

Children