Skip to main content
stephenk0001
March 19, 2024
Question

Move app to new schema and get rid of CDTs.

  • March 19, 2024
  • 4 replies
  • 0 views

Hi team
We have moved an existing application to a new schema, and we are also getting rid of the old CDTs in order to use Record Types instead.

I need to know how to apply the 'type' function where the new schema name is SierraUniformMike and the recordtype name will be SUM Onboarding Case

'type!{urn:com:appian:types:PRE}PRE_OnboardingCase'(
  id: null,
  case: rule!DCM_newCase(
    reference: joinarray(
      {
        "PRE",
        text(
          rule!APP_default(value: now(), default: today()),
          "yymmdd"
        ),
        rule!APP_generateUUIDSegment(6)
      },
      "/"
    ),
    parentID: null,
    priority: null,
    milestone: rule!PRE_getCaseMilestoneByUUID(
      milestoneUUID: cons!PRE_UUID_ONBOARDING_CASE_MILESTONE_OPEN
    ),
    assignment: null,
    type: rule!DCM_getCaseTypeByUUID(
      uuid: cons!PRE_UUID_CASE_TYPE_ONBOARDING_CASE
    ),
    createdOn: now(),
    createdBy: loggedInUser()
  ),
  createdOn: now(),
  createdBy: loggedInUser()
)




OK, I hope this will explain a bit more:

The above expression is for the old schema, which uses CDTs.

The expression works properly in the old schema.

The revised expression will need to :

  • Create a new SUM Onboarding Case record (using a record type in the new SUM schema)
  • Create a new DCM case in the old schema, using the rule!DCM_NewCase expression
  • Populate my process with the resulting variables

I am not using an Action to create  the new SUM Onboarding Case

4 replies

konduruc733182
March 19, 2024

Hello [mention:43b7d4a83a2f4a89ab88fae153c3c34f:e9ed411860ed4f2ba0265705b8793d05] 

What does the above code snippet do? For casting from CDT to record type either use cast() or recordType!record_Name(fields:values).

Please give more detail on the code snippet provided above and what exactly is your requirement.

venkatrea696188
March 19, 2024

If you are using records you don't need type() , records are referenced using "record!" ?

record!XYZ_NAME(

record!XYZ_NAME.fields.id:1,

record!XYZ_NAME.fields.name: "stephen"

)

Is this you wanna know or am i missing something??

stefanhelzle0001
Brainy
March 19, 2024

Use the recordType! domain to create new record typed values.

stephenk0001
March 19, 2024

Thanks guys, there was a bit of confusion on my side. One of my colleagues has helped me resolve my issue.