• Bharathimohan
  • SMARTIE
  • 614 Points
  • Member since 2012
  • Technical Architect


  • Chatter
    Feed
  • 22
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 0
    Questions
  • 139
    Replies
Hello,

I am reposting this question in order to have a complete view on my solution

My use case.
1) Export of data
2) Export should be weekly once
3) Data should be saved somewhere for atleast 1 month

I tried to use dataloader CLI but i cant even install it. Well, I will arrive sucess at some poitn of time.

Once i install dataloader,

1) how to install scheduler
2) I also want to delete old exported files, how will i be able to acieve it.
3) Is there any other way alternative to dataloader CLI, wher i could acieve my requirement for free and not paying heavy money to external apps




 
Hello,

I have a Visualforce page constructed on a custom object.  I am using the standard controller for that object.  I also have an Approval Process associated with the object.  I am able to pull in the approval history with the <apex:relatedList List="ProcessSteps"> function.  However, I would like to customize the related list to make it a bit more user-friendly. I know I can use <apex:facet> to control the header, footer, and body, but is there any way to pull in the different columns of the approval history?  (e.g., {!processinstance.Status}, {!processinstance.AssignedTo}, etc.)

Hi,

 

 How to implement the queue sharing(assignment rules) for a private custom object, Is it possible to implement assignment rules for a custom object apart from "Leads" and "Cases" , Please let me know

 

Thanks in Advance

Hello there,

 

I have a strange problem with <apex:outputPanel>, rendered="" attribute. In my controller, I have an Integer variable. On first load of the VF page, the value is non-negative. I have a search functionality, that causes to call {!onLoad} method. This method makes the value to 0(zero).  Now, when I try to rerender that outputPanel, its does't re-render even though the value of the variable is zero or negative.

 

Please help.

 

Thank you in advance.

 

This is VF <apex:outputPanel> :

 

<apex:outputpanel rendered="{!IF(volResultSide > 0, false, true)}">
<tr class="EvenRow" height="40px" style="padding-top:16px;padding-left: 15px;padding-right: 4px">
<td class="column">No Volunteers found!</td>
</tr>
</apex:outputpanel>

  • April 03, 2013
  • Like
  • 0

Greetings to everyone!

 

On my VF i have a commandlink and it looks like this:

        <apex:commandLink value="Delete" action="{!del}">
            <apex:param name="idtodel" value={!pitem.merchandise.id}"/>
        </apex:commandLink>

 In my Apex controller i want to implement deletion like this:

    public PageReference del() {
    Id IdToDel=System.currentPageReference().getParameters().get('id');
    Item__c ItemToDel = [SELECT all
                         FROM Item__c
                         WHERE id = IdToDel];
    PageReference curPage = ApexPages.currentPage(); 
    curPage.getParameters().put('success','true');
        curPage.getParameters().put('id',Apexpages.currentPage().getParameters().get('id'));
        curPage.setRedirect(true);
        return curPage; 
            
    }

and i get an error "unexpected token: 'IdToDel' at line 7 column 40"

Hi,

 

I am trying to give only read permission to few of the members of account teams or opportunity teams but the only value available in Access dropdown is "Read/Write"

 

How do i give only read permissions in this case

  • November 26, 2012
  • Like
  • 0

Hi,

 

Why document.getElementById('{!$Component.ZoomName}') is always returning null?

 

We have an apex page where an outputText (id="ZoomName") is defined. In javascript we want to change the value of ZoomName, but {!$Component.ZoomName} is always returning null.

 

 

<apex:outputText value="30 dias" id="ZoomName" styleClass="chronoline-zoom-text"/ >

....

 

 <script type="application/javascript">

.....

    function loadZooms(){
       
        var zoomRecord = new Object();
        var zoomArray = new Array();
       
        zoomRecord.Id = 0;
        zoomRecord.Name= "60 dias";
        zoomRecord.visibleSpan= 5184000000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        zoomRecord = new Object();
        zoomRecord.Id = 1;
        zoomRecord.Name= "30 dias";
        zoomRecord.visibleSpan= 2592000000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        zoomRecord = new Object();
        zoomRecord.Id = 2;
        zoomRecord.Name= "15 dias";
        zoomRecord.visibleSpan= 1296000000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        zoomRecord = new Object();
        zoomRecord.Id = 3;
        zoomRecord.Name= "7 dias";
        zoomRecord.visibleSpan= 604800000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        zoomRecord = new Object();
        zoomRecord.Id = 4;
        zoomRecord.Name= "1 dia";
        zoomRecord.visibleSpan= 86400000;
        zoomArray[zoomRecord.Id] = zoomRecord;
       
        if (document.getElementById('{!$Component.ZoomName}') != null) {
            document.getElementById('{!$Component.ZoomName}').value = zoomArray[defaultZoom].Name;
        }
       
       
        return zoomArray;      
   
    }

..........

 

    zooms = loadZooms();
    buildChronoline();

  </script>

 

Many Thanks,

Altran

  • November 26, 2012
  • Like
  • 0

string typename='account';

Schema.SObjectType targetType = Schema.getGlobalDescribe().get(typeName);

sObject obj=targetType.newSObject();

 

here i want to create an instance for account dynamically.

How is it possible.

 

Hi 

 

 Our requriement is 

 

Displaying Suffix of the Chemical Formula in VFpage 

 

Ex:  C6H5NH2

 

Here the suffix  are 6,5,2 

 

I need to display   these suffix  as  shown below

 

C6H5 NH2

 

 

Thanks

 

 

 

  • November 20, 2012
  • Like
  • 0

Hi All,

 

I have a pageblock table in a visualforce page say created for object Opportunity …

 

Inside  the page block table I created another one table for object Product…..

 

I used Map like Map<Oppty,List<Product>> to populate Opportunity values and corresponding product values in to the table

 

and the table is editable to add new values……..

 

In Edit Mode ,I have added “AddRow” link to add new rows in the table and Delete Row link to delete a particular row in the  table….

 

Since I am using using the Map in the page block table I am not able to write a method for “Delete Row” link ...

 

Please anyone suggest..

 

 

Can we modify the object name after the workflows and validation rules are created. Does it effect the workflows?

Hi 

I need your advice to the following problem:

I have the Fields Owner and Responsible on the account and on the opportunity object. When I define an opportunity, I need to fill in these fields with the values from the Account automatically.

With workflow it is not possible to make this. The fields are lookup fields to the User object.

I suppose this is possible with trigger.

 

Does anyone have advices and experiences with similar topic?

  • October 31, 2012
  • Like
  • 0

Can any one tell me what is Max length of dynamic SOSL/SOQL query?

 

I am building dynamic query where I am adding fields dynamically. I don't know that when my query will fail due the long query.

 

Is there any limit on length of query?

 

Thanks

Purushottam

  • October 31, 2012
  • Like
  • 0

Hi Guys,

 

In Opportunity Object for some page layouts in my organization in record detail page the field lable is "Closedate" when i edit the same layout the same field label is like "Expected close date". How this happens?

 

Is it depends on any other settings or open / closed status of an opportunity? or any other ?

 

 

I have 2 picklist fields(Available fields and Selected fields) and Add button in between the fields.

 

values in Available fields:

 

 Account

 contact

 Opportunity

 

If i select the Account value in Available fields and then by clicking on the Add button it (Account value) should move to Selected fields.How to acheive this?

 

Thanks in Advance.

 

  • October 30, 2012
  • Like
  • 0

Hi All,

 

I have one Custom object called Salary__c, this object was hidden(no access) for a user using profile.

But i want to show a salary__c record which was created by HR manager and shared(owned by that user) to that user.

It is possible? If yes, can u plz suggest me to achieve this.

 

 

 

Thanks,

Hussey

 

Any body knows the API name of the junction object Opportunity Product?

 

I can see this object in the the schema builder but it seems like I am not able to use this object trough the API.

Anyone?

  • October 29, 2012
  • Like
  • 0

We have a custom button that draws into a VisualForce Page.  I want to move this button from the Detail Page and add it to the List view of it its parent record.  This would enable me to perform this action for multiple records at once.

The issue I am having is when I edit the button to change from "Detail Page Button" to "List Button".  When List Button is selected, the VisualForce Page previously used is no longer an option under Content.  Is there some coding that I need to change to allow this switch, or is there a setting on the Page or Class that need to edit?

I am a Sys Admin with just enough Coding knowledge to keep myself out of trouble but not enough to be an effective developer.

  • October 27, 2012
  • Like
  • 0

Hi there,

 

I have 2 questions:

1. When I am editing a contact, I would like to indicate the name of the company the contact is from but I can't find a "company" field in the edit panel

 

2. Is there a company field available in the API contact object?

I can't find a field to relate with a company name here: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_contact.htm

 

Many thanks for your help

I have a custom button which is supposed to send an email, but I'm getting the following error when I click it:

"A problem with the OnClick JavaScript for this button or link was encountered: missing ; before statement"

My button executes the following OnClick Javascript&colon;

{!REQUIRESCRIPT("/soap/ajax/23.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/23.0/apex.js")}

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

mail.setTargetObjectId({!Case.AccountId});
mail.setTemplateId('00XD0000001SLYh');
mail.setBccSender(false);
mail.setToAddresses({!Case.SuppliedEmail});
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
}

 
I can't see a missing semicolon?
Someone please shed some light on this for me as I can't move forward until this is resolved.

Hi Team,

I have question about running report. In my org, I'm an admin. I created a report which want to show to the subordinate. I create a seperate folder for him. But when I login as him, he can't run my report and he has run report permission. I'm wondering is that the people in the lower position can not run the report which created by user who in the upper position? 
 
Hi,
I have a picklist field on account object,using search button I am able to filter the records by selecting a picklist value.
but now i want to use the same picklist value as multi-select  picklist. 
can any one help me in resolving the issue.

Vf code:
<apex:page controller="ACCsearch">
  <apex:form id="form">  
        <span>Name</span>
        <apex:inputText value="{!searchstring}" label="Input"/>        
        <apex:selectList value="{!Typeoptions}" label="Type" size="2" multiselect="true" >
            <span>Type</span>
            <apex:selectOptions value="{!selectedType}"></apex:selectOptions>
        </apex:selectList>
            <apex:commandButton value="Searchrecords" action="{!search1}"/>
                <apex:pageBlock title="Inst Records" id="Block1">
                <apex:pageBlockSection id="section" collapsible="true" title="TABS">                
                    <apex:pageBlockTable value="{!Instlist}" var="inst" >
                        <apex:column value="{!inst.Name}"/>                                            
                        <apex:column value="{!inst.Type}"/>        
                    </apex:pageBlockTable>                    
                </apex:pageBlockSection>    
        </apex:pageBlock>           
    </apex:form>
</apex:page> 

apex code:
public class ACCsearch
{
    public list<Account> Instlist{get;set;}
    public string searchstring{get;set;}
    public string Typeoptions{get;set;}
    public ACCsearch()
    {
        string strqry ='select Name,Type  from Account';
        Instlist=Database.query(strqry); 
    }
    public list<Selectoption> GetselectedType()
    {
       List<SelectOption> options = new List<SelectOption>();           
       Schema.DescribeFieldResult fieldResult =Account.Type.getDescribe();
       List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();           
       options.add(new SelectOption('None','--None--'));
       for( Schema.PicklistEntry f : ple)
       {
          options.add(new SelectOption(f.getLabel(), f.getValue()));
       }       
           return options;
    } 
     public void search1()
    {  
        string strqry ='select id,Name, Active__c,Type from Account where id !=null ';
        if(Typeoptions!='None')
        {
           strqry =strqry +'and Type LIKE \'%'+Typeoptions+'%\'';
        }
        if(searchstring!='')
        {
           strqry =strqry +'and Name LIKE \'%'+searchstring+'%\'';
        }
        Instlist=Database.query(strqry);  
   }         
}
{!REQUIRESCRIPT("/xdomain/xdomain.js")} 
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")} 
{!REQUIRESCRIPT("/support/console/33.0/integration.js")} 

var a = {!LEN( $Setup.New_Opportunity_Settings__c.RecordTypeId__c )}; 

if (a > 0) { 
window.parent.navigateToUrl('/006/e?retURL={!Contact.Id}&RecordType={!$Setup.New_Opportunity_Settings__c.RecordTypeId__c}&{!$Setup.New_Opportunity_Settings__c.ContactFieldNameId__c}={!Contact.Name}&{!$Setup.New_Opportunity_Settings__c.PrimaryContactFieldId__c}={!Contact.Id}&accid={!Account.Id}'); 
} else { 
window.parent.navigateToUrl('/setup/ui/recordtypeselect.jsp?ent=Opportunity&retURL={!Contact.Id}&save_new_url=/006/e?retURL={!Contact.Id}&{!$Setup.New_Opportunity_Settings__c.ContactFieldNameId__c}={!Contact.Name}&{!$Setup.New_Opportunity_Settings__c.PrimaryContactFieldId__c}={!Contact.Id}&accid={!Account.Id}'); 
}

This is an onclick javascript button that is on a contact page layout, allowing the user to create a new opportunity.  Seems to work most of the time but occasionally it doesn't, with the error "missing ) after arguments list".  Wondering if anyone knows why this would happen on some contacts not others.
We have over 200 layouts, and want to export a list of all Fields (with their Read Only/Required property, API name) for all Page Layouts. What is the best way to achieve this? Is it eclipse or is there better tool? thanks.
Here is my question please help me :

 <!-- <apex:commandButton action="{!onSend}" disabled="{!sendDeActive}" value="Send Text Message" /> -->
                
  <apex:commandButton rendered="{!(SMScount >= 2)}" disabled="{!sendDeActive}"  action="{onSend}" value="Send Text Message"  />
                
        
                  <apex:commandButton rendered="{(SMScount >= 3) || (!optOut) ||(desplayError = True ) }" action="{onClear}" value="Clear"  />

I have 2 buttons as you see above:
Clear 
Send Text Message

Clear and Send Text message should not be shown if the SMSCount=>3, (SmsCount is a label field which is running and incrementing +1 everytime when you send message).

I tried to write a code please help me in that peice of code that it will not show us the these two buttons if the Smscount>=3, or whenever its going to be after the 3 it will not show the these buttons, please help  me i am very new in it
Hello,

I am reposting this question in order to have a complete view on my solution

My use case.
1) Export of data
2) Export should be weekly once
3) Data should be saved somewhere for atleast 1 month

I tried to use dataloader CLI but i cant even install it. Well, I will arrive sucess at some poitn of time.

Once i install dataloader,

1) how to install scheduler
2) I also want to delete old exported files, how will i be able to acieve it.
3) Is there any other way alternative to dataloader CLI, wher i could acieve my requirement for free and not paying heavy money to external apps




 
Hi Folks,

After running test class, am able to see the percentage of the code covered, but unable to see covered code lines in developer console or any where.

Let me know if any body got this issue, and wat is the get rid of this issue.

Thank you in advance..
Hi,

I want to display Grand Total Amount of amount field in expensive object. 

Please help me to achieve this.
User-added image

**VF Page:**

<apex:page controller="ExpensesClass" >

<apex:form >
<!-- Need this variables for totals generation -->
<apex:variable value="{!0}" var="total1"/>

<apex:pageBlock >

<apex:pageBlockTable value="{!expensesList}" var="e" rendered="{!isTableExit}" >

<apex:column value="{!e.Date__c}"/>
<!--<apex:column value="{!e.Item__c}"/>-->
<apex:column >
<apex:outputLink target="_blank" value="/{!e.id}">{!e.Item__c}</apex:outputLink>
</apex:column>

<apex:column headerValue="Amount">
<apex:outputField value="{!e.Amount__c}" />
<apex:variable var="total1" value="{!e.Amount__c+total1}" />
<apex:facet name="footer">
               Total: <span class="t1"></span>   
</apex:facet>
</apex:column>
        
</apex:pageBlockTable>
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputLabel value="Grand Total Amount:"/>
<apex:outputText value="{!totalsum1}"/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
<script>
    // Here we will set the generated subtotals to the footer cells
    
    document.getElementsByClassName('t1')[0].innerHTML = '{!total1}'; 
</script>
</apex:form>
</apex:page>

**Class:**
public class ExpensesClass {
public string nameQuery{get;set;}
public List<Expense__c> expensesList{get;set;}
public Boolean isTableExit {get;set;}
public Date fromdate {get; set;}
public Date todate {get; set;}
public list<AggregateResult> totalsum {get;set;}
public integer totalsum1{get;set;}

//public List<Expense__c> expensesList {get; set;}
public ExpensesClass(){
totalsize=[Select count() From Expense__c];
totalsum=new list<AggregateResult>();
//totalsum=[Select sum(Amount__c) From Expense__c];
}

public PageReference executeSearch(){
string str='%'+nameQuery+'%';
if(nameQuery==null || nameQuery==''){
    //errormessage ='Name cannot be null or empty. Please Try Again.';
    ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please Enter Owner Name'));
}else{
expensesList=[Select id, Item__c, owner.name,Amount__c, Date__c From Expense__c where owner.name LIKE:str Limit:limitsize Offset:offsetsize];
}

return null;
}

public Void gettotalsum1(){
AggregateResult[] groupedresult=[Select sum(Amount__c) From Expense__c];
object totalsum1=groupedresult[0].get('total');
//return totalsum;
}
}

Thanks in advance 
Sain
 
  • August 25, 2015
  • Like
  • 0
I am having some trouble with permissions when trying to open up a visualforce page that generates a PDF.  The onclick code is here:

var quoteId = "{!REVVY__MnQuote__c.REVVY__SalesforceId__c}";
var status = "{!REVVY__MnQuote__c.REVVY__Current_Status__c}";

window.open('/apex/PMnCustomTemplateCostSheet?quoteID=' + quoteId, '_blank', 'toolbar=0,location=0,menubar=0');

I would assume that the user's profile would just needs read and or create access to the Quote and its line items but still is denying access to the users with insufficient access.  Am I missing something simple here?

Thanks.
  • August 24, 2015
  • Like
  • 0
Hi when  use sortable() function of jquery on code where list comes on page load like on 
<apex:page standardController="Contact" extensions="extContactList">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"/>
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css"/>
   
     <style>
#sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
#sortable li { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 18px; }
#sortable li span { position: absolute; margin-left: -1.3em; }
</style>

<script>
$(function() {
$( "#sortable" ).sortable();
$( "#sortable" ).disableSelection();
});
</script>

    <ul id="sortable" >
        <li class="ui-state-default"> First Name - Last Name - Id</li>
    <apex:repeat value="{!ContactList}" var="c">
        <li class="ui-state-default"> {!c.FirstName} - {!c.LastName} - {!c.Id} </li>
   
    </apex:repeat>
    </ul>
   
</apex:page>

It works perfectly but when i fetch the list after some action and rerender my list sortable() for drag and drop does not works as expected ?...please help me in this ASAP
Hi,

I have create a visualforce page with controller. I have create a button "send" when click this button that time i have call the email template. In my email template i have use " Component". But that time <c:PricelistFAELcontroller1 Serviceid="{!relatedTo.id}" ServiceSheet="{!relatedTo}"/>.
b
ut here my id, and type not populate in visualforce page into visualforce email template. How to pass id,object type into visualforce page into visualforce email component. Any one konow reply me.
I am unable to create a test class for wrapper.
Class:
global class ProductWrapper {
public Boolean isSelected {get;set;}
public PricebookEntry PBE{get;set;} 
    //creating a constructor
    public ProductWrapper(PricebookEntry PBE,Boolean isSelected)
    {
        this.PBE= PBE;
        this.isSelected= isSelected;
    }
    
}
Test class:
@istest
public class TestProductWrapper 
{
    static testMethod void productWrapper1() 
    {
        /*********************
        //insert Quote Line Item
        *********************/
        Product2 prod = new Product2(
			 Name = 'ENGEH16-2P',
			 ProductCode = 'ENGEH16-2P',
			 Item__c = 'ENGEH16-2P',
             Discount_Code__c='A',
			 isActive = true,
            Dealer_Price__c=100 
		);
		insert prod;
        system.debug('Product2 Id='+prod.id);
        /************************
         * Get standard pricebook
         * ************************/
         Id priceBookId2 = Test.getStandardPricebookId();
        /******************************
        //create price book entry
        ***************************/
        PricebookEntry PBE= new PricebookEntry();
        //PBE.Name='ENGEH16-2P';
        //PBE.Pricebook2Id=pb.Id;
        PBE.Pricebook2Id=priceBookId2;
        PBE.Product2Id=prod.id;
        PBE.UnitPrice=100;
        PBE.UseStandardPrice=false;
        PBE.isActive = true;
        Insert PBE; 
        boolean isSelected =True;
        /*******************************
         * Creating a constructor
         * *****************************/
		ProductWrapper TestPW = new ProductWrapper();
        TestPW.ProductWrapper(PBE, isSelected);
        
    }
}
I am getting an error message on second last line
ProductWrapper TestPW = new ProductWrapper();
Constructor not defined: [ProductWrapper].<Constructor>()
Any suggestions?



 


license limits

I have made all other users inactive for an activity in Trailhead thinking that would free up Salesforce licenses.  I have since switched all users for free licenses with the expection of 3:  System Administrator, Marketing Coordinator and Account Manager.  (This is for 'controlling access to fields' in Trailhead under the basic developer track.)  I keep getting that I have maxed license limits.  How do I resolve this? 
I can't seem to get a clear answer to this problem via Google search.  What is the best way to prevent trigger recursion with Data Loader in Bulk mode?  For example, consider needing to load 500,000 records and there is an After trigger updating the same records that caused the trigger to fire.  Any advice?

I'm trying to complete the trailhead challenge for Automating Process with the Lightning Process Builder and keep getting this error:
The record couldn’t be saved because it failed to trigger a flow. 
A flow trigger failed to execute the flow with version ID 30161000000CcPC.

I don't have any accounts in my setup, is that the problem?  Do I need to prepopulate the data before configuring the Process Flow?

My Process is doing this:

Object: Account -> Start the process when a record is created or edited -> Recursion is enabled

Criteria for Executing Actions: Conditions are met -> (5 conditions) [Account].billingData[city,province,country,zip,street] _ Is changed _ boolean _ false

Actions: [Account].ChildAccounts _ No Criteria _ (5 conditions) billingData[city,province,country,zip,street] _ Reference _ (5 conditions) [Account].billingData[city,province,country,zip,street]

I am trying to create a custom field to map my to with marketing automation tool to that will tell my if there is an open event on an account. So specifically an event, not an open task. Essentially I want to build a list off of this to exclude those contacts at these accounts from receiving automated emails. This is an indicator that my sales team has a scheduled conversation with them. Has anyone done this before?

 
My goal is to provide a field on the Account that lists all the products that have been sold from the various Opportunities.  I am looking for the best solution to achieve the goal.

I'm trying to complete the trailhead challenge for Automating Process with the Lightning Process Builder and keep getting this error:
The record couldn’t be saved because it failed to trigger a flow. 
A flow trigger failed to execute the flow with version ID 30161000000CcPC.

I don't have any accounts in my setup, is that the problem?  Do I need to prepopulate the data before configuring the Process Flow?

My Process is doing this:

Object: Account -> Start the process when a record is created or edited -> Recursion is enabled

Criteria for Executing Actions: Conditions are met -> (5 conditions) [Account].billingData[city,province,country,zip,street] _ Is changed _ boolean _ false

Actions: [Account].ChildAccounts _ No Criteria _ (5 conditions) billingData[city,province,country,zip,street] _ Reference _ (5 conditions) [Account].billingData[city,province,country,zip,street]

I have created a custom field and set its attribute "Unique" to true. Is it possible to throw a trigger or have some popup message or a workflow rule that prevents a user from unchecking that attribute.

 

Please help!