Paging in X++.
For paging in X++ Query. There are three steps required. Rest of Query Code is same.
We have to set following things in Query data source
Set Sort field in Query data Source.
Paging position property of QueryRun is set to true.
Add page range with starting position and number of records in QueryRun
Here is code snippet
QueryBuildRange qbr,qbrStartDate,qbrEndDate; QueryBuildDataSource qbd; IAPageSize EnumPageSize; QueryRun qr; Query query = new Query(); Int pageSize = 2; qbd = query.addDataSource(TableNum(ProjPlanVersion)); qbd.addOrderByField(fieldNum(ProjPlanVersion,HierarchyId)); qr = new QueryRun(query); qr.enablePositionPaging(true); CurrentPageNumber =1; startingposition = CurrentPageNumber * pagesize; qr.addPageRange(startingposition, totalRows); while(qr.next()) { Info (“”); }
检查特权。
SecurityUserRole securityUserRole;
SecurityRolePrivilegeExplodedGraph securityRolePrivilegeExplodedGraph;
SecurityPrivilege securityPrivilege;
select firstonly securityUserRole
join securityRolePrivilegeExplodedGraph
where securityRolePrivilegeExplodedGraph.SecurityRole == securityUserRole.SecurityRole
join securityPrivilege
where securityPrivilege.RecID == securityRolePrivilegeExplodedGraph.SecurityPrivilege
&& securityUserRole.User == curUserId()
&& securityPrivilege.Identifier == “” X++创建预警
static void CreateAlertUsingCode(Args _args)
{
EventInbox inbox;
;
inbox.initValue();
inbox.ShowPopup = NoYes::Yes;
inbox.Subject = "This is the Alert subject";
inbox.Message = "This is the Alert message";
inbox.AlertedFor = "This alert is just information no links are available";
inbox.SendEmail = false;
inbox.UserId = curuserid();
inbox.TypeId = classnum(EventType);
inbox.AlertTableId = tablenum(Address);
inbox.AlertFieldId = fieldnum(Address, Name);
inbox.TypeTrigger = EventTypeTrigger::FieldChanged;
inbox.CompanyId = curext();
inbox.InboxId = EventInbox::nextEventId();;
inbox.AlertCreatedDateTime = DateTimeUtil::getSystemDateTime();
inbox.insert();
}
https://www.theaxapta.com/2012/11/create-alert-using-x-codes.html
图片 base64
\<img src="data:image/png;base64,XXXXX" alt="图片示例"/>