Thursday, 15 August 2013

Readonly field conditionally

Greetings from Urdhva Tech!!

I came across an interesting question today on Forum, which raised my eyebrow and led me to implement and write a blog!

So, here we go!!

AIM: Make Work Phone read-only of a Contact for certain role users!

Step 1: As it is SugarCRM's module, copy modules/Contacts/views/view.edit.php to custom/modules/Contacts/views/view.edit.php or edit if it already exists at custom/modules/Contacts/views/view.edit.php

In function display() add following piece.

function display(){ // add this if function display doesn't exist 
                global $current_user;
                // check if current user is in specific role
                // code taken from thread
                $IS_AM = in_array("<ROLE NAME>", ACLRole::getUserRoleNames($current_user->id));
                    $this->ev->ss->assign('readOnly', 'readonly = "readonly"');
                    $this->ev->ss->assign('readOnly', '');

                parent::display(); // add this if function display doesn't exist
} // add this if function display doesn't exist

Step 2: Open custom/modules/Contacts/metadata/editviewdefs.php, if doesn't exist, go to Studio > Contacts > Layouts > Edit View and press Save and Deploy.

Give custom code to the field, phone_work,

'customCode' => '<input type="text" class="phone" tabindex="0" title="" value="{$fields.phone_work.value}" maxlength="100" size="30" id="phone_work" name="phone_work" {$readOnly}>',

Repeat step 2, for Quick Create.

Do Quick Repair and rebuild! See it working smoothly, every time!!!

If you wish this to happen only while editing a record, add a condition to if($IS_AM && !empty($this->bean->id))

For many such blog articles in future, subscribe today to get it delivered to your INBOX!

Wednesday, 7 August 2013

When every customer matters

Greetings from Urdhva tech!

What an exciting time to be a business owner! When we need to embrace things that can make a difference just to remain competitive. The one technology ready to take front stage is Responsive Customer Self Service Portal which has Web and Mobile compatible as it is most needed in today’s technical era.

Responsive Customer Self Service Portal can become part of the digital face of your firm. It becomes one of the connection points between you and your customer. In this fast paced time of instant access to data and high demands on immediate service, a portal can offer your firm a high tech solution for one more contact point with your client with smart devices like, iOS, Android, Blackberry. This additional connection with your client’s costs you very little time and money. This fast paced world has taken away some of the personal service in the world of business, thus the portal returns one way to express personal service. Use of portals is on the rise, and this digital connection point is an opportunity you need to take advantage of.

Responsive Customer Self Service Portal not only connects your business and your customer, but also provides a means of important data transfer at 24x7. An integrated Case/Bug management module in Portal helps you to grab the opportunity to turn your brand's customers into fans.

Taking advantage of Responsive Customer Self Service Portal make customer portals extremely important to firms of all sizes, which is where they log into your branded portal. More advanced client portals create an environment to sell more services to existing customer. A good portal allows other messaging as well. Our Customer Portal allows Request a Call or Meetings. Embracing these new changes can also create a better life/work balance, ultimately, reducing the time, cost and stress by serving best customer experience.

Portal can provide a place, for transparent information display, which the customer needs when calling for service. This digital connection is a reflection of your services and firm, so don’t miss this opportunity to connect with your customer with Advance Responsive Customer Self Service Portal.

Try demo

User name: demo
 Password: demo

Urdhva Tech Pvt. Ltd. Powered by Blogger.

Urdhva Tech

My photo
SugarCRM Consultants Contact us at Skype : urdhvatech

Search This Blog

Stay connected Socially


Total Pageviews

Popular Posts