Sunday, July 19, 2026
Get base enum lables insted enum ids in SSRS report
Wednesday, July 8, 2026
Get workflow LastApprover and Lastapproval datetime through code
WorkflowTrackingStatusTable wfTrackingTable;
WorkflowTrackingTable wfTracking;
select firstonly wfTrackingTable
order by wfTrackingTable.CreatedDateTime desc
where wfTrackingTable.ContextTableId == tablenum(tablename)
&& wfTrackingTable.ContextRecId == _purchTable.RecId;
select firstonly wfTracking
order by wfTracking.CreatedDateTime desc
where wfTracking.WorkflowTrackingStatusTable == wfTrackingTable.RecId
&& wfTracking.TrackingType == WorkflowTrackingType::Approval
&& wfTracking.TrackingContext==WorkflowTrackingContext::WorkItem;
Date POApprovalDate = DateTimeUtil::date(wfTracking.CreatedDateTime);
str POApprovedBy = HcmWorker::find(HcmWorker::userId2Worker(wfTracking.user)).name();
Tuesday, July 7, 2026
SSRS report
To make values empty while opening contract and making last given values empty
code:-
In controller class :-
protected void prePromptModifyContract()
{
super();
MyContract contract = this.parmReportContract().parmRdpContract() as MyContract;
if (contract)
{
contract.parmFromDate(dateNull());
contract.parmToDate(dateNull());
contract.parmPRNumber(null);
}
}
Sunday, July 5, 2026
Maintenance mode in d365fo
Scenario:- Generally For activating some configurations maintenance mode is required .
This can be done in two ways
1) From LCS
2) SQL procedure
We discuss here 2 step
SQL procedure
Step1) First of all , run this script
select * from SQLSYSTEMVARIABLES where PARM = 'CONFIGURATIONMODE'
result :- value field 0=normal and 1= maintenance mode
Step2) To turn into maintenance mode run the below script
update SQLSYSTEMVARIABLES SET VALUE = 0 where PARM = 'CONFIGURATIONMODE'
Step3) DO iisreset in commandprompt
Step4) do db sync
visualstudio>extensions>syncorinzedb
Step 5) Now after db sync env will be in maintence mode
Note:- after activating and put maintenance mode back to normal by following same procedure but with 0
Wednesday, July 1, 2026
Navigate to a specific legal entity through code
code:-
appl.setDefaultCompany(Legalentitycode, false);
Wednesday, June 24, 2026
Get product receipt details from posted invoice
code:-
sql:-
select DISTINCT vendPackingSlipTrans.PACKINGSLIPID from vendInvoiceTrans
inner join vendInvoiceJour
on vendInvoiceTrans.PurchID = vendInvoiceJour.PurchId and
vendInvoiceTrans.InvoiceId = vendInvoiceJour.InvoiceId and
vendInvoiceTrans.InvoiceDate = vendInvoiceJour.InvoiceDate and
vendInvoiceTrans.NumberSequenceGroup = vendInvoiceJour.NumberSequenceGroup and
vendInvoiceTrans.InternalInvoiceId = vendInvoiceJour.InternalInvoiceId
inner join vendInvoicePackingSlipQuantityMatch
on vendInvoicePackingSlipQuantityMatch.InvoiceSourceDocumentLIne = vendInvoiceTrans.SourceDocumentLine
inner join vendPackingSlipTrans
on vendPackingSlipTrans.SourceDocumentLine = vendInvoicePackingSlipQuantityMatch.PackingSlipSourceDocumentLine
and vendInvoiceJour.LEDGERVOUCHER='pass your journal vocuher'
and also if you want reverse like if you have grn get invoices then code
sql:-
select vendPackingSlipTrans.DATAAREAID,vendPackingSlipTrans.ORIGPURCHID,vendPackingSlipTrans.PACKINGSLIPID,vendInvoiceTrans.INVOICEID from vendPackingSlipTrans
inner join vendInvoicePackingSlipQuantityMatch
on vendPackingSlipTrans.SourceDocumentLine = vendInvoicePackingSlipQuantityMatch.PackingSlipSourceDocumentLine
inner join vendInvoiceTrans
on vendInvoicePackingSlipQuantityMatch.InvoiceSourceDocumentLIne = vendInvoiceTrans.SourceDocumentLine
and vendPackingSlipTrans.ORIGPURCHID='passpurchid'and vendPackingSlipTrans.DATAAREAID='pass dataareaid'
Monday, May 11, 2026
Assign roles through ssms in d365fo
Step1;- Here my Role name I want to assign is System admin
SELECT RecId,* FROM SecurityRole WHERE Name = 'System administrator';
step 2:- User name here is sai and pass recid from above to below query
insert into SECURITYUSERROLE (USER_, SECURITYROLE, ASSIGNMENTSTATUS, ASSIGNMENTMODE)
VALUES ('sai', 171,1,1);
Thats it!! refresh and check
For deleting of roles through SSMS
Step1:-SELECT RecId,* FROM SecurityRole WHERE Name = 'System administrator';
pass recid from above to below query
Step 2:-DELETE FROM SECURITYUSERROLE WHERE USER_='sai'and SECURITYROLE=171;
Thank you!!
get mainaccount ledger dimension recid from mainaccount
Info(strFmt("%1",LedgerDimensionFacade::serviceCreateLedgerDimension(LedgerDefaultAccountHelper::getDefaultAccountFromMainAccount...
-
Scenario:-Today we see in this blog how to create App Registration in Azure for D365fo integrations that might be import integration or ex...
-
Scenario :-In this blog we will see import a file through recurring integrations via Logic Apps Step1:-Go to D365fo Data management wor...
-
In this blog we see all about Workflows development in D365fo Output as shown in below Step1:- Create a base enum with elements as shown in...