This is a very common requirement that Siebel Developer stumble upon. The requirement is to make the field read only based on the view so that the people who are assigned to this view using responsibilities are given read or write access.
Example Requirement: Make the field “Status” readonly for the view “Opportunity List Admin View” but all other views should have this field non-readonly.
Without wasting more time here are the steps to achieve this:
- In Siebel Tools select the Application in the object explorer.
- Select the Application you are using. For Example: Siebel Field Service
- Right Click and Edit Server Scripts
- Under Application_PreNavigate event set the profile attribute. Look at the code below. ActiveViewName is the profile attribute that is being set. The code will look something like this.
function Application_PreNavigate (DestViewName, DestBusObjName)
{
this.SetProfileAttr(”ActiveViewName”, DestViewName);
return (ContinueOperation);
}
Many people have an argument that it might not be a good idea to define it under the application and instead define this attribute under the View, but I think that it is better to have at the application level as I don’t have to define for multiple views and I can reference it from anywhere. Small scripts won’t affect anything.
- Create a calculated field under the BC.
- Field Name: CalcReadOnlyFlag
- Calculated Value: IIf (GetProfileAttr(”ActiveViewName”) = “Opportunity List Admin View”, “Y”,”N”) where “Opportunity List Admin View” is the name of the view for which you want to make readonly.
- Field Name: CalcReadOnlyFlag
- Create a BC user property
- Name: Field Read Only Field: Status (Name of the field for which you want Read Only)
- Value: CalcReadOnlyFlag (This is the calculated field that you created above)
- Name: Field Read Only Field: Status (Name of the field for which you want Read Only)
Compile and Test. It is as easy as mentioned above. Until my next post take care and have fun.
Related posts(Auto Generated):





August 7th, 2008 at 7:41 am
Hi,
Nice post. This is something we have tried in the past. But the drawback is that the view name is harcoded into the calculated field. We had a lot of such requirements, so we took care of it using personalization. Now, we only need to add the view names there and there is no need of a srf compile
August 7th, 2008 at 4:51 pm
Hi Ranjith,
If I understand your comment correctly, you defined a conditional expression for views under Admin-Personalization. I totally agree with you. Though I been to these views, somehow it never occurred to me doing it this way. Thanks for this GREAT Tip!
February 25th, 2009 at 6:31 pm
I would extend the functionality by using a LOV to find if the view is Read only or not.
but in the end i would take into acount that using that kind of script too much can be detrimental.
it could placed in the applet if there are too much applets wit that functionality.
just my 2 cents.
March 3rd, 2009 at 12:00 pm
Want to populate field value into read only field.
Req:- Based on user responsibility I want made field read-only or editable.
I). If user having “xyz Responsibility”, in service request detail applet ‘State field’ should be editable, for all other responsibilities State field should be read only.
II). When the state field read-only for other responsibilities I want to populate a value into State field.
I done the 1st part of the requirement. How to achieve IInd part of the requirement. I appreciated for your response.
March 3rd, 2009 at 10:58 pm
Do u mean predefault a value in state field? if so create a calculated field and use this field in predefault value.
March 19th, 2009 at 11:35 am
Hi Sridhar ,
if i want to disable the buttons like new and delete on application level for a particular responsibility, how i can do this .
Regards
March 19th, 2009 at 6:18 pm
Hi Kiran,
As there is M:M relation ship between Responsibility and an User it will be hard to check this without Scripting.
I would recommend using profile attributes and using that under BC Events. Let me know if you find a better way of doing it.
May 31st, 2009 at 6:49 am
thanks for you
July 2nd, 2009 at 6:41 am
Hi,
There are 2 controls -(fields) on applet level which are showing as read only though the Read Only property is not clicked.
I have also checked at the BC level and there also the Read Only property is not clicked.These two fields are based on an Implicit join.
I have to make those fields editiable on the applet level..kindly advise
Nishant
July 2nd, 2009 at 5:15 pm
Did you check the BC Field User Properties? check and let me know.
July 21st, 2009 at 3:06 pm
Hi Sridhar,
I couldn’t get how this requirement could be done by using using Personalization Views. From my understanding Personalization views can be used to conditionally make a particular view visible to a user or not. How can it be used to determine if a particular field will be available in read only mode in a view or not?
Also why din’t we simply copy the original applet and make a new applet with Status field as read only and base our Opportunity List Admin View on that new applet.
July 22nd, 2009 at 5:12 am
for your first question you are correct. that was my oversight. dont know what I was thinking.
for the second one yes it is doable your way. depends upon requirement. this is just giving you an example. just giving an example. Instead of Active View Name we could use position using this example.
Regards,
Sridhar
July 30th, 2009 at 10:44 am
I have a scenario in which:
There are 2 mvf on a view.
The two mvf(Field 1 and field 2-on Action BC) point to the same MVG Applet(on different BC-x)
there is a link between Action/x.
Problem is when we try and set any value in Field 1,it also gets set to field2(since both are on same BC and uses the same link)
Our scenario is that when field 1 is set to a value,then field 2 should not be populated with the same value,and we should be able to populate Field 2 by again clicking on the MVG applet and selecting a new record.
Technically speaking i know its not possible:(,but can there be a way this could be done.Please suggest.
NB:I tried making a new MVL-didnt work
tried making a new Link-didnt work
tried making a clone of MVG applet for the two fields-didnt work
Please suggest
Thanks
Nishant
July 30th, 2009 at 6:08 pm
Hi Nishant,
I appreciate you participating on this website, but your comment or question has no relevance to this blog post.
Please post your questions in the forums section. You will get better response from everyone over there instead of here.
Thanks,
Sridhar
May 5th, 2011 at 5:44 pm
Attractive section of content. I just stumbled upon your web site and in accession capital to assert that I get in fact enjoyed account your blog posts. Anyway I will be subscribing to your augment and even I achievement you access consistently rapidly.
July 17th, 2011 at 7:18 am
Often times consumers are layered this way. There’s a thing completely different beneath the than what’s on the surface. Yet at times, there’s one third, perhaps deeper level, and this one is just like the top part surface one.
August 1st, 2011 at 2:37 am
Howdy outstanding blog! Does running a blog like this require a lot of work? I’ve virtually no understanding of programming however I was hoping to start my own blog in the near future. Anyhow, should you have any suggestions or tips for new blog owners please share. I know this is off topic however I just wanted to ask. Kudos!
August 8th, 2011 at 9:56 pm
I will right away take hold of your rss feed as I can’t find your e-mail subscription hyperlink or newsletter service. Do you’ve any? Kindly let me understand in order that I may subscribe. Thanks.
August 15th, 2011 at 4:58 pm
I really enjoyed flicking through this. I believe I will that a look through your other posts!
September 19th, 2011 at 9:54 am
The other day, while I was at work, my sister stole my iPad and tested to see if it can survive a twenty five foot drop, just so she can be a youtube sensation. My apple ipad is now destroyed and she has 83 views. I know this is totally off topic but I had to share it with someone!
September 29th, 2011 at 6:28 pm
With havin so much content do you ever run into any issues of plagorism or copyright infringement? My website has a lot of exclusive content I’ve either created myself or outsourced but it looks like a lot of it is popping it up all over the internet without my authorization. Do you know any ways to help stop content from being stolen? I’d genuinely appreciate it.
October 16th, 2011 at 11:09 am
Sorry for long post, I enjoyed reading your article, will come back again.
October 26th, 2011 at 5:52 pm
As expected you did an great job evaluating the question and finding the right solution. I will stay tuned for more releases on your site.
November 3rd, 2011 at 7:04 pm
Good day! This is kind of off topic but I need some help from an established blog. Is it hard to set up your own blog? I’m not very techincal but I can figure things out pretty fast. I’m thinking about making my own but I’m not sure where to start. Do you have any tips or suggestions? Appreciate it
November 8th, 2011 at 9:21 pm
Enlightening publish, bookmarked your weblog in curiosity to find out a lot more!
November 9th, 2011 at 12:28 pm
great day, your internet site is genuinely unquie. Anways, i do appreciate your function
December 5th, 2011 at 4:55 pm
Simply wish to say your article is as astounding. The clearness in your post is just cool and i could assume you are an expert on this subject. Fine with your permission allow me to grab your feed to keep up to date with forthcoming post. Thanks a million and please continue the rewarding work.
January 20th, 2012 at 6:37 am
Hey! I’m at work browsing your blog from my new iphone! Just wanted to say I love reading your blog and look forward to all your posts! Keep up the great work!
January 22nd, 2012 at 4:08 am
I can not participate now in discussion it is vitally occupied. I will return I will necessarily express the opinion.
January 25th, 2012 at 10:06 pm
i like this post greatly. ill be checking laterfor future readsthanks.
February 4th, 2012 at 6:21 pm
I understand that there are a lot of spam lately. Apparently it’s pretty difficult for people to grasp the concept that relationships can be mutually rewarding. I can leave a meaningful awesome comment and add content and substance to one of your articles and you will give me a link in exchange. There are too many takers out there and they aren’t willing to help people out. Take take take! .