This is because the Method Of Payment is PDC in your case and when making customer payments using PDC, click the Postdated checks tab on the customer payment journal tab and enter the PDC details there. In the Maturity date field, enter the future date when the postdated check is due for payment and that will solve your issue.
Below is X++ Code to get Company name , Phone and fax in D365FO. You can try in Job to check to values. CompanyInfo Company; ; Company = CompanyInfo::find(); info(strFmt("Company Name : %1", Company.Name)); info(strFmt("Company Phone : %1", Company.phone())); info(strFmt("Company Phone : %1", Company.telefax()));