ChangeApproveSwitch - POHeader Not Availble

Hi , I am adding a Button just to check how the changeapproveswitch works in the PO screen so , I used Button On Click to use rest-erp

but for now it gives me an error that PO Header is not available even i’am adding the parameters

any suggestion ?

Is PO really the name of your dataset? Shouldn’t that be POHead?

I’m afraid I’m not quite following what you are looking to achieve but if you are wanting to duplicate the Approve rest-erp call then you could have a look at the ColumnChanging_Approve event:

Note %value% is the proposed value as this is the columnChanging event, hope this helps.

i’am using the standard dataview and the data set id is just PO , also tried with POHeader but gives me same error

Hi Neil , i looked for this but the ds not applied to the ColumnChanging_Approve event: and in request parameters i’am adding the same parameters

OK, I understand now the reason you are getting POHeader not found is because the POHeader will not be dirty on an onClick event, as nothing has changed.

However, I think there might be an issue within Application studio as it should be showing “dirtyRows”: POHeader within the properties (it was blank).

Could you try adding POHeader to this property see whether it makes a difference?

I did this but unfortunately, it gives me the same error :melting_face:

i don’t know if this means that method doesn’t know which row from the poheader or what

@Eslam_Mohamed Ok, I think that property is non functional I have raised an issue with the team to review as it should be an array object supporting multiple views / conditions.

However, what you might have to do for your scenario is perform another event before the rest-erp event which performs a row-update on POHeader.RowMod and set the column to ‘U’, so that the POHeader row becomes dirty.

WOW, Now it worksss , MANY MANYYY Thanksss :clap:t2::clap:t2::heart:

1 Like