Hi,
I have a portal in with an interface containing a grid.
The grid is populated through an integration calling an integration to a web API that execute a queryRecordType. The integration has one rule input, pagingInfo, that gets value from grid pagingSaveInto property. WebAPI receives a couple of query parameters, startIndex and batchSize, used to create a new pagingInfo object for the queryRecordType function.
It works smoothly when I test the interface form Designer, but once it is published in the Portal I get one of these errors whenever I try to get the grid interface. Sometimes I get error 1 and sometimes error 2 (clicking on the same button, it's curious), I cant find a pattern out of it so far.
Errors:
1) HTTP Code 500. Expression evaluation error [evaluation ID = BNS4C] in rule 'ct_portal_publishedtexts' at function a!gridField [line 50]: A grid component [label="null"] has an invalid value for "data". "data" must be sourced from a Record Type, a query, a list of Dictionary, a list of CDT, or a data subset. Received: DecisionOutputRestrictionLookup
2) HTTP Code 500. Could not decrypt bindings.
Some code snippets:
2) Portal home interface
a!localVariables( local!newLine: char(10) & char(10), local!name, local!email, local!aviso, local!screen: "main", { a!match( value: local!screen, equals: "publishedTexts", then: rule!CT_Portal_PublishedTexts(screen: local!screen), default: a!columnsLayout( columns: { a!columnLayout(), a!columnLayout( contents: { a!buttonLayout( secondaryButtons: { a!buttonWidget( label: "Ver textos publicados", validate: false, value: "publishedTexts", saveInto: local!screen ) } ) } ) } ) ) } )
1) Interface CT_Portal_PublishedTexts
a!localVariables( local!pagingInfo: a!pagingInfo(1,10), local!data: cast( typeof(a!dataSubset(startIndex: 1, batchSize: 1, data:{1,2})), rule!CT_GetPublishedTexts(pagingInfo: local!pagingInfo).result.body, ), local!text, { a!richTextDisplayField( value: { a!richTextIcon( icon: "arrow-left", link: a!dynamicLink( saveInto: if( isnull(local!text), a!save(ri!screen,"main"), a!save(local!text,null) ) ), linkStyle: "STANDALONE" ) } ), if( isnull(local!text), { a!gridField( emptyGridMessage: "No hay textos para mostrar", data: local!data, columns: {...}, pagingSaveInto: local!pagingInfo, borderStyle: "LIGHT", shadeAlternateRows: false ) }, { a!sectionLayout( contents: {}, ) } ) } )
2) Web API
a!localVariables( local!records: a!queryRecordType( recordType: 'recordType!{d74c7061-f193-4922-85bb-1b8b85db7b97}CT Text', filters: a!queryFilter('recordType!{d74c7061-f193-4922-85bb-1b8b85db7b97}CT Text.fields.{2f953619-9bfc-4cde-905f-2ca23df99c29}datePublished',"not null"), pagingInfo: a!pagingInfo( startIndex: http!request.queryParameters.startIndex, batchSize: http!request.queryParameters.batchSize, sort: a!sortInfo('recordType!{d74c7061-f193-4922-85bb-1b8b85db7b97}CT Text.fields.{2f953619-9bfc-4cde-905f-2ca23df99c29}datePublished',false) ), fetchTotalCount: true ), a!httpResponse( headers: { a!httpHeader(name: "Content-Type", value: "application/json") }, body: a!toJson(local!records) ) )
Just in case it is not clear enough, my intention is to show in a portal a readonly grid that takes data from a record (through a web api).
Any help will be appreciated
Thanks in advance
Discussion posts and replies are publicly visible
I appreciate the title of this thread. :-)
I haven't seen this error before; my first instinct would be to ask if you're calling a decision rule somewhere (which isn't supported in portals), but it seems pretty clear that you're not. The pattern of sourcing a grid from an integration result cast to a datasubset also should work (it's what I'd recommend in a portal) and I'm not spotting any obvious errors in your expressions.
Let me dig around a bit and see if I can find out more internally.