How make a field uneditable/readonly on click of a button
Summary: We have a required where if party data is published through button, relationship data should be uneditable or make it readonly on click.
Content (required): Account Relationships.
Version (include the version you are using, if applicable): 23D
Code Snippet (add any code snippets that support your topic, if applicable): Added code on AfterTransactionPosted, but not working.
if(PublishRemarks_c == 'Published to Registry')
{
def accCollection = Accounts_Accounts_CO_Rel_Tgt;
while(accCollection.hasNext())
{
def accCollectionRow = accCollection.next();
def accRelCollection = accCollectionRow?.AccountRelationshipsCollection_c
while(accRelCollection.hasNext())
{
def accRelCollectionRow = accRelCollection.next();
if(accRelCollectionRow.RelationEndDate_c != null)
{
return false;
}
if(accRelCollectionRow.RelationType_c != null)