Re: Madatory Field by c
c
Thu May 08 16:06:17 CDT 2008
Hi,
you can get the current user
a) via a javascript webservice call
b) via the unsupported "remotecommand" (this works only in version 3 I
think)
Best regards,
Christoph
"Rob Mottram" <RobMottram@discussions.microsoft.com> schrieb im Newsbeitrag
news:7EB64459-84A9-40E1-8D1D-4DD4ED81EC4C@microsoft.com...
> You can use the following code to make a field required or not required in
> javascript
>
> var CRM_REQUIRED_LEVEL_NORMAL = 0;
> var CRM_REQUIRED_LEVEL_RECOMMENDED = 1;
> var CRM_REQUIRED_LEVEL_REQUIRED = 2;
> //Make Required
> crmForm.SetFieldReqLevel('fieldname', CRM_REQUIRED_LEVEL_REQUIRED);
> //Make Normal - Not Required
> crmForm.SetFieldReqLevel('fieldname', CRM_REQUIRED_LEVEL_NORMAL);
>
> Using this in the onload of a form will allow you to make a field required
> or not depeding on other fields on the form. What I don't know how to do
> is
> get the username in javascript to know which users should have the field
> required or not required.
>
> I hope this might help you on your way.
>
>
> Rob
>
> "Faiz Amir" wrote:
>
>> You have mentioned it to make it mandatory for all users. I want to make
>> it
>> madatory for only one user.
>>
>> "Robert Rybaric" wrote:
>>
>> > It is a property of the attribute (field) itself. Go to the attributes
>> > and
>> > change it there.
>> >
>> > Regards,
>> >
>> > Robert
>> >
>> >
>> > "Faiz Amir" wrote:
>> >
>> > > Dear All,
>> > > Is it possibel to make a field mandatory for a user? If through
>> > > javascript
>> > > is there a generic format available