Backend
1. Variables
ensure var VarTextObjectTypeAccount kind: text
deploy: fixedOnDeploy
value: "Account"
2. AccountSheet
ensure spreadsheet: AccountSheet
withFields: [
"Refresh",
"Id",
"Name*",
"AccountNumber",
"Phone",
"BillingState",
"AccountSite",
"Type",
"Industry",
"Owner"
]
ofTypes: [button, text, text, text, mobileNumber, text, text, pickText, pickText, pickText]
removeRoleSet: [Owner]
readRoleSet: [Owner]
insertRoleSet: [Owner]
updateRoleSet: [Owner]
ensure form EntityAccount commentRoleSet: [Owner]
ensure section: Details
ensure field Refresh
icon: "RefreshRounded"
btnPosDoNotInline: true
btnPosToolbar: true
buttonKind: normal
actionCloseAside: true
targetType: invokePlugin
plugIn: SalesforcePlugin
pluginApi: SyncDetail
ensure field Id
permissionMatrix: {
'defaultPermission': 'invisible'
}
ensure field Type
plugIn: SalesforcePlugin
pluginApi: GetObjectDropDownPickList
ensure field Industry
plugIn: SalesforcePlugin
pluginApi: GetObjectDropDownPickList
ensure field Owner
plugIn: SalesforcePlugin
pluginApi: GetUsers
ensure section: Other
permissionMatrix: {
'defaultPermission': 'invisible'
}
ensure field FormMode kind: text
ensure field RowId kind: rowId
ensure field GetAccountDetailButton kind: button
buttonKind: normal
targetType: invokePlugin
plugIn: SalesforcePlugin
pluginApi: GetAccountDetails
ensure visibilityRule AccountDetailVisibilityRule
condition: "<root>
<and>
<stmt>Details.Id has value</stmt>
<stmt>Other.FormMode == ${var:VarTextFormModeEdit}</stmt>
<stmt>Details.Id has changed</stmt>
</and>
</root>"
ensure actionMapIfTrue MakeGetDetailButtonClick
comp: Other.GetAccountDetailButton
visibilityAction: click
visibilityActionOn: field
ensure visibilityRule RefreshButtonVisibilityRule
condition: "<root>
<and>
<stmt>Details.Id has value</stmt>
<stmt>Other.FormMode has no value</stmt>
</and>
</root>"
ensure actionMapIfTrue MakeRefreshButtonVisible
comp: Details.Refresh
visibilityAction: visible
visibilityActionOn: field
ensure actionMapIfFalse MakeRefreshButtonInvisible
comp: Details.Refresh
visibilityAction: invisible
visibilityActionOn: field
ensure var VarMappingAccountToSyncDetailInputForm kind: mapping
deploy: fixedOnDeploy
fromForm: EntityAccount
toPlugin: SalesforcePlugin
toForm: SyncDetailInputForm
fieldMappingMap: {
'map': {
'${f:Details.Id}': 'Id',
'${var:VarTextObjectTypeAccount}': 'ObjectType'
}
}
ensure var VarMappingAccountToDropObjectDownPicklistInput1 kind: mapping
deploy: fixedOnDeploy
fromForm: EntityAccount
toPlugin: SalesforcePlugin
toForm: DropObjectDownPicklistInput
fieldMappingMap: {
'map': {
'${var:VarTextObjectTypeAccount}': 'ObjectType',
'${constant:text.Industry}': 'DropdownFieldName'
}
}
ensure var VarMappingAccountToDropObjectDownPicklistInput2 kind: mapping
deploy: fixedOnDeploy
fromForm: EntityAccount
toPlugin: SalesforcePlugin
toForm: DropObjectDownPicklistInput
fieldMappingMap: {
'map': {
'${var:VarTextObjectTypeAccount}': 'ObjectType',
'${constant:text.Type}': 'DropdownFieldName'
}
}
ensure var VarMappingAccountToRecordIdInput kind: mapping
deploy: fixedOnDeploy
fromForm: EntityAccount
toPlugin: SalesforcePlugin
toForm: RecordIdInputForm
fieldMappingMap: {
'map': {
'${f:Details.Id}': 'Id'
}
}
ensure var VarMappingAccountDetailToAccount2 kind: mapping
deploy: fixedOnDeploy
fromPlugin: SalesforcePlugin
fromForm: AccountDetail
toForm: EntityAccount
fieldMappingMap: {
'map': {
'${f:Details.Name}': 'Details.Name',
'${f:Details.AccountNumber}': 'Details.AccountNumber',
'${f:Details.Phone}': 'Details.Phone',
'${f:Details.BillingState}': 'Details.BillingState',
'${f:Details.AccountSite}': 'Details.AccountSite',
'${f:Details.Type}': 'Details.Type',
'${f:Details.Industry}': 'Details.Industry',
'${f:Details.Owner}': 'Details.Owner'
}
}
ensure form EntityAccount
ensure section: Details
ensure field Refresh
pluginInputMappingVar: VarMappingAccountToSyncDetailInputForm
ensure field Type
pluginInputMappingVar: VarMappingAccountToDropObjectDownPicklistInput2
ensure field Industry
pluginInputMappingVar: VarMappingAccountToDropObjectDownPicklistInput1
ensure section: Other
ensure field GetAccountDetailButton
pluginInputMappingVar: VarMappingAccountToRecordIdInput
pluginOutputMappingVar: VarMappingAccountDetailToAccount2