1) Set text box font property to ”BC C39 2 to 1 Medium”
2) set expression of textBox as “"*" & First(Fields!HeatNumber.Value, "DS") & "*"”
1) Set text box font property to ”BC C39 2 to 1 Medium”
2) set expression of textBox as “"*" & First(Fields!HeatNumber.Value, "DS") & "*"”
We can add range on enum type field like this
public void executeQuery()
{
this.query().dataSourceTable(tableNum(CMSProspectStudentAssessmentTable)).addRange(fieldNum(CMSProspectStudentAssessmentTable , AssessmentStatus)).value(queryValue(CMSAssessmentStatus::AssessmentScheduled));
super();
}To Lock r hide range on the form we have Status method of QueryBuildRange
public void executeQuery()
{
QueryBuildDataSource qbds;
QueryBuildRange qbr;
qbds = this.query().dataSourceTable(tableNum(CMSProspectParentTable));
qbr = qbds .addRange(fieldNum(CMSProspectParentTable , ParentId));
qbr.value("anyParentId"); //two dots are considers as empty string in ax
//qbr.status(0);
//qbr.status(1);
qbr.status(2);
} The following values are possible for the status:
| Value | Staus |
|---|---|
| 0 | Status Open. |
| 1 | Status Lock. |
| 2 | Status Hide. |
Use following code to add range of empty or null string in any of the table , datasource field
public void executeQuery()
{
QueryBuildDataSource qbds;
QueryBuildRange qbr;
qbds = this.query().dataSourceTable(tableNum(CMSProspectParentTable));
qbr = qbds .addRange(fieldNum(CMSProspectParentTable , ParentId));
qbr.value(".."); //two dots are considers as empty string in ax
}Two dots are considered as empty string in axqbr.value(".."); Create COC of form's data source and add this code in ExecuteQuery method that datasource
[ExtensionOf(formDataSourceStr(SalesTable , SalesLine))]
final class KA_SalesLineDS_Extension
{
public void executeQuery()
{
this.query().dataSourceTable(tableNum(SalesLine)).addRange(fieldNum(SalesLine , InvoiceGenerationDate)).value(SysQuery::value(dateNull() + 1) + ' .. ' + SysQuery::value(today()));
}
}I am going to show you How You can add range in any default dimension .
If it it standard form where you want to add range then you have to create COC of that form's dataSource which contains DefaultDimension Field.
In my example I am adding range in Default Dimension "Project" in Revenue Recognition Schedule(RevRecDefferredLine) Form . I want to show just that particular record whose projectId matches the string control named "ProjIdFilter" whice I added in my form through form extension
Create the COC of RecRecDefferredLine form's datasource "NetDefferredLine" beacase my default dimension field is in NetDefferredLine datasource and paste below code
[ExtensionOf(formDataSourceStr(RevRecDeferredLine , NetDeferredLine))]
final class MZNKARevRecDeferredLineDS_Extension
{
public void executeQuery()
{
FormRun fr = this.formRun();
FormStringControl projectIdFilter = fr.design(0).controlName(formControlStr(RevRecDeferredLine , ProjIdFilter));
DimensionProvider dimensionProvider = new DimensionProvider();
dimensionProvider.clearDimensionRangesFromQuery(
this.query());
dimensionProvider.addAttributeRangeToQuery(
this.query(),
this.name(),
fieldStr(RevRecDeferredLine, DefaultDimension),
DimensionComponent::DimensionAttribute,
ProjectIdFilter.valueStr(),
"D05_ActivityName");
next executeQuery();
}
} dimensionProvider.clearDimensionRangesFromQuery(
this.query()); dimensionProvider.addAttributeRangeToQuery(
this.query(),
this.name(),
fieldStr(RevRecDeferredLine, DefaultDimension),
DimensionComponent::DimensionAttribute,
ProjectIdFilter.valueStr(),
"Project");To change Sales Invoice control document's design based on condition use following code. Here I have created COC of salesInvoiceControl...