Can we update fiscal year settings using apex code?

I have a situation in that suppose one condition is satisfied then a month let say ‘April’ is set as Fiscal Year Start Month, otherwise ‘Jan’ is set. I have to do this by apex code, not from the setup|administration|company profile.
Can we do so by using apex code?

Answer

As you can see in the SFDC Objects doc, SObject FiscalyearSettings is not creatable, updateable, or deleteable

describeSObjects(), getDeleted(), getUpdated(), query(), retrieve()

nor for that matter is Period

describeSObjects(), getDeleted(), getUpdated(), query(), retrieve()

While it is true that there are some sobjects that can’t be updated via DML in APEX, but can be updated via REST API. However, these two Sobjects are not in that set. As you can imagine, changing these could cause havoc on an org

Attribution
Source : Link , Question Author : user2275344 , Answer Author : cropredy

Leave a Comment