cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the default value for Indicator as True in Extension BO

Former Member
0 Kudos

Hi experts ,

                I have extended the standard Opportunity BO screen with one field of data type indicator and given the value as true ad below

                                                  [Extension] businessobject AP.CRM.Global:Opportunity {

                                                            element Check_Ind : Indicator = true ;

        But still i can see the front end indicator value as False (Indicator unchecked) , my target is to make the indicator get checked initially when i open the screen .

                                        Could you guys let me know how can i make the indicator value as true by default .

Accepted Solutions (1)

Accepted Solutions (1)

former_member190818
Active Contributor
0 Kudos

Hello Lokesh,

The default value should be set as true as you had given in definition. Strange !!!

Ok.. let's try by setting it in Workflow rules using field update on every create.

Regards,

MB

Former Member
0 Kudos

Hi Mohan Babu K J ,

                         Thanks for  your reply . As After modify event is not getting triggered when i open the  opportunity screen . So i cant set the value as true by default .

Regards ,

Lokesh Sai  .

Answers (1)

Answers (1)

sunil1101
Advisor
Advisor
0 Kudos

Hi

I tried in my system and I can see this defaulted value is checked in QuickCreate UI. In quick create where you can create a new records so UI sends defaulted value,\ but in Thing Inspector UI (TI) you can see only saved records from database, for already created opportunity, newly added Checkbox is empty in database.

Regards

Sunil

.

Former Member
0 Kudos

Hi Sunil Kumar Maurya ,

                                     You are correct . Is there any other way to set  the indicator value as true for already created opportunities in TI screen ?????

Regards ,

Lokesh Sai .

sunil1101
Advisor
Advisor
0 Kudos

Hi

You have to update it manully or

you can write a absl script which query already created Opportunity and they assign it as true.

Obiviously you have to run script only once.

Regards

Sunil

Former Member
0 Kudos

Hi ,

      For writing absl script After modify event is not getting triggered when i open an opportunity and mainly my requirement is i shoud not set the value  manually .

Regards ,

Lokesh Sai .

sunil1101
Advisor
Advisor
0 Kudos

If you have written your logic in after modify of Opportunity xbo then

Open any oportunity in edit mode, change value of any field and press enter it will trigger after modify,

but after_modify event will  not update records or indicator value becuse it will not commit in database.

You can write your logic in before save and edit an opportunigy record click on save it will save the record, make sure it should not be locked by the current instance.

you can also write an action, and in controler tab for BOAction check the check box Save after execution.

Regards

Sunil

former_member190818
Active Contributor
0 Kudos

Hello Lokesh,

If you want the indicator to display checked based on some condition write the logic in BeforeSave event while creating or changing the opportunity. If this is a new extension field and that needs to be updated for the old opportunities as well the create MDR to update the existing opportunity.

The new ones will have your new logic to update the field.

Regards,

MB

sunil1101
Advisor
Advisor
0 Kudos

Hi

field is defaulted as constant so no logic is required until opportunity is  saved by webservice.

Whenever they create new opportunity and on save value will be saved in database.

Updating old opportunity where new field is added, this is only one time job so I dont thing MDR is a good option as I have suggested in previous reply two option

In-beforeSave query all old opportunity and and in forloop set the value true new field. Make sure this logic should run only one.

Regards

Sunil

Former Member
0 Kudos

Hi,

Another alternative is to extend the field to migration template, and do a mass data maintenance update.

Regards

KH