457
Views
3
Comments
error CS0103: The name 'xxx' does not exist in the current context
Application Type
Traditional Web

Hello, we have a very strange problem when trying to publish a module, it tells us the following:

Compilation Error.

Actions.ActionCustomerBudget_Opportunities.cs (168,104): Error CS0103: The name 'ssENProbability' does not exist in the current context

target.ssOpportunityDetail.ssProbabilityInfo = new STProbabilityInfoStructure (null) {ssProbabilityId = ssENProbability.ssId};

State: Second stage compilation


Actually what we are doing is quite simple. We have an aggregate and a complex structure and we want to make a ListAppendAll with the result of the aggregate to the complex structure. And it gives us the following error. Also it only happens when we try to fill in two fields of the structure. If we don't fill them in, it's perfect

If, on the contrary, we do a loop and use a listAppend it does not fail us but it is not the best for performance.
We do not understand the failure itself, the flow is something common that we would do for any application

I attach the oml to see if you can help me

BudgetCS.oml
2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Cris,

This is unexpected, and be sure to report it to OutSystems Support. However, I would also try to see if you can get rid of the error by removing the mapping for Opportunity.ProbabilityInfo, as it is a 2nd-level mapping. I've seen those go wrong before, so if it does compile without that mapping, then at least that's what causing it (something you could then relay to OutSystems). Doesn't help you in the end, but at least OS can fix this problem.

As a workaround (if indeed the above is the problem) you could remove the ProbabilityInfo attribute and add the ProbabilityId and DecimalNumber to the parent Structure.

UserImage.jpg
Md Abiruzzaman

Try changing the names of some of the attributes of the data structure OpportunityTable. Specifically, rename the Id (OpportunityTable->Opportuniy->Id) to something like OpportunityId, and rename the ProbabilityId to something else as well (Try not to use Id here). This is what was causing the problem for me. Renaming this immediately solved the same problem when I was facing it.

2020-03-10 08-50-23
Sven Persijn

Though this is an old post, I want to post the solution I found. Probably, this problem is caused by an assign of a list with different definitions. My solution was to use a ListAppendAll instead of an assign.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.