AX 2012: Convert string to TitleCase using str2CapitalWord function

AX 2012: Convert string to TitleCase using str2CapitalWord function

MCP · Azure DevOpsYour delivery board, readable by an agentMCP · DataverseOne consent, and the data layer opensMCP · Dynamics 365 F&OConnecting F&O to an agent Microsoft hasn’t documented
Requirement: Show customer name on report in TitleCase e.g. faisal fareed should display as Faisal Fareed
Solution: str2CapitalWord function does the trick and accomplished the requirement.

input string: "faisal fareed"
output string: "Faisal Fareed"

P.S. There is another function str2Capital which just converts the first letter of the first word e.g. "faisal fareed" will be converted to "Faisal fareed"
Previous article← CIL error "A parameter could not be serialised."
Discussion

Ask a question or leave feedback

This is a review interaction. The WordPress version will store, thread and moderate comments.

Thanks — submitted for moderation in this review.
Search the whole site · Ctrl/⌘ + K