function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Subject UnRequired Field in Standard Field

I can not save because the Field Subject in Interaction Log is  Required. I want to have some unRequiredit.



trigger PopSubject on Task (before insert) {
    //Set of SaleOrder Ids
    Set<Id> CaseID = new Set<Id>();
    for (Task Ta : {
        CaseID.add(Ta.WhatID); //A set of SaleOder 
     Map<Id, Case> pSale = new Map<Id, Case>([SELECT, a.subject FROM Case a WHERE IN :CaseID ]);
    for(Task fcon : Trigger.New){
        fcon.subject  = pSale.get(fcon.WhatID).subject;


 Thank you so much.




If a standard field is required, you have to provide it - there's no way around it that I'm aware of.