Question
Editiable grid save selected and newly added data field in new rule input of different record type
Hi I am trying something like this , I have editable grid for which data will be populated from local!data of type AB recordtype , I want to edit the row data and select them and save into another recordtype thorugh a rule input , I want to add new row also but when i try the rule input is getting updated but the grid row is not created and when i try to edit the pouplated data its not getting saved. I know im missing something I am a beginner so can anyone guide me achive my requirement?
a!localVariables(
local!datatype: a!queryRecordType(
recordType: {
'recordType!{479ce76d-f462-432e-80f8-34a12cfb2725}RPM Candidate',
},
fields: {
'recordType!{479ce76d-f462-432e-80f8-34a12cfb2725}RPM Candidate.fields.{6f148197-c427-48b6-a52c-0f8c403c81e2}id',
},
pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 100)
),
a!sectionLayout(
label: "",
contents: {
a!gridLayout(
label: "Editable Grid",
labelPosition: "ABOVE",
headerCells: {
a!gridLayoutHeaderCell(label: "CandidateId"),
},
columnConfigs: {
a!gridLayoutColumnConfig("ICON"),
},
rows: {
a!forEach(
items: local!datatype.data,
expression: a!gridRowLayout(
id: fv!index,
contents: {
a!integerField(
readOnly: false(),
label: "CandidateId",
value: fv!item['recordType!{479ce76d-f462-432e-80f8-34a12cfb2725}RPM Candidate.fields.{6f148197-c427-48b6-a52c-0f8c403c81e2}id'],
saveInto: ri!record['recordType!{32995c06-561c-49ee-b80d-ed0f4f196a63}RPM Interview Details.fields.{145ec156-2b46-4a8d-9329-746d1108a3af}candidateId']
),
}
)
)
},
selectable: true,
selectionValue: ,
selectionSaveInto
addRowLink: a!dynamicLink(
label: "Add Plan",
value: 'recordType!{32995c06-561c-49ee-b80d-ed0f4f196a63}RPM Interview Details'(
'recordType!{32995c06-561c-49ee-b80d-ed0f4f196a63}RPM Interview Details.fields.{145ec156-2b46-4a8d-9329-746d1108a3af}candidateId':null,
'recordType!{32995c06-561c-49ee-b80d-ed0f4f196a63}RPM Interview Details.fields.{b7099aba-ad0d-489f-a68d-5457c3203bf7}feedback': ""
),
saveInto: ri!record
),
shadeAlternateRows: true
),
a!buttonLayout(
primaryButtons: {
a!buttonWidget(
label: "save",
saveInto: a!save(
ri!record['recordType!{32995c06-561c-49ee-b80d-ed0f4f196a63}RPM Interview Details']
),
submit: true,
style: "SOLID",
loadingIndicator: true,
)
},
)
},
)
)